Hi, i’m Zelouille, member of the french community Blender Clan.
Please excuse my bad english writing. But be sure i will try to do my best :).
French people may want to read the french post.
After some headaches, i think i’ve succeed to generate Normal maps Tangent Space in Blender.
This method needs some bakes and much nodes.
Due to the complexity of nodes, I’ve decided to do a .blend file dedicated to this task. You just have to append your mesh, follow the directives and you shoud get your Nmap Tangent space.
So, there is the .blend file :
v.2007.10.24
It contains the directives in both English and French. Just select your language in the Text files.
Theory
Due to a bad level at mathematics it’s hard to me to explain how it works, but it’s quite clear in my head.
The hi-res map (nmap_pix) is multiplied by a matrix (U,V,Z) wich correspond to the rotation of each face.
This matrix is composed by 3 maps, but one is calculated by the others. nmap_v correspond to the V axis, nmap_vert to the Z axis.
Z axis (nmap_vert) represent the normals per face.
V axis (nmap_v) represent the Y axis of the texture uvmapped.
To get this map, i just used a flat coloured map (RBG = 0.5 ; 1.0 ; 0.5) applied in nmap_TS mode, and bake the normals. It return the Y axis for each face in the global space (camera space).
A screen of the nodes tree in an older version (which needed one bake more) :
How to use it
All the three maps you’ll have to create
must be the same size.
1. Importation of your own mesh in this .blend file.
File > Append or Link.
Careful, choose the mesh, not the object.
Select the “Cube” object.
In panel Editing > Link and Materials,
select your mesh in place of “ME:Cube”.
Go to the UV Face Select mode.
Multires/Level at 1 until the end.
2. Baking of High-Res map “nmap_pix” :
Set the multires_render at maximum.
In UV window, create a new image “nmap_pix”.
Bake the normals.
3. Baking of Low-Res map “nmap_vert” :
Set the multires_render at level 1.
In UV window, create a new image “nmap_vert”.
Bake the normals.
4. If your mesh is “Set Solid” (goto step 5 if it’s smooth) :
In panel Editing > Modifiers, enable the Edge Split modifier
during rendering (first button next to the modifier’s name).
5_ Baking of the “nmap_V” :
In panel Material > Texture, enable the “V” texture.
In UV window, create a new image “nmap_V”.
Bake the normals.
6. Settings of the Nodes :
In Node Editor window, load the maps in this order, up to down :
nmap_pix
nmap_V
nmap_vert
Set the file path in the File Output node.
7. Check your folder
The job of my .blend file ends here.
8. Set up the texture onto your object
Create a new texture,
load your normal map tangent space.
In the Shading > Texture buttons > Map Image panel,
enable the “Normal Map” button.
In the Material buttons > Shaders panel,
enable the Nmap TS button.
In the Map To panel
enable the Nor button, and set the nor slider to 1.00
I will edit this posts if you need more explanations.
As you see it’s a bit long, but, when you know good the “how to” it becomes quite fast.
You don’t have to rename the baked maps or save them (even it is a bit hazardous… Blender seems to forget unsaved maps after a while) if you want to go faster.