Generating Normal maps tangent space directly in Blender

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 :

It contains the directives in both English and French. Just select your language in the Text files.


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 :
Set the file path in the File Output node.

7. Check your folder :slight_smile:

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.

Hmmmm seems very clever!
I don’t know much about them so this is the place to learn !
Well done.

I had tested it out, and i will further testing :slight_smile: It works width smooth faces too?
Btw what is the difference the pixel and the vertex baking result? I changed the multires levels but the result will be the same.

  • Yes, it works with smooth faces too. You have to not enable the modifier during rendering.

  • It seems you confuse the “level” variable and the “render” variable. Mutlires “Level” needs to stay at 1 until the end (in order to not have the “no image to bake” message).
    It is the Multires “Render” you have to modify in order to bake the low resolution, or the high resolution mesh.
    Pixel baking > high res.
    Vertex baking > low res.

I will add some images to the first post.

Awsome! I cant belive it :eek::eek::eek: it is woks perfectly! Thank you Zelouille !
my test:

Hi Zelouille!! Is it possible to make Displacement maps out of this technique??

I LOVE YOU! :eek: :smiley:

yes! finally! whooh

you could convert the normal to a displacement in crazybump. thanks for the tut. ive been using the camera space normal maps baked from high poly which is aparently not as good

thats some seriusly amazing node setup! thanks

Crazybump is not GNU, and I think the beta version is restricted to 800x600 output.

Hey great :slight_smile: Feel free to post the result on your low poly character.:yes:

I think you save each map after baking them.
You can get a more neutral background (RGB : 0.5 ; 0.5 ; 1) in place of your clear blue if you save the hi_res map in an Alpha friendly type file (.tga for exemple).
You can get it too if you don’t save the maps in a file, just use them “on the fly”.

No, sorry. And i think you’ll never can.
But i’ll think it over…

Me too :stuck_out_tongue:

Hey… is it possible for someone to make a NODE of that whole node setup? I didn’t try it yet, but thanks for the innovation =)!

hmm… i think it could be grouped, but indeed, having savable node group presets would be awesome!

well i wasent sure what it was you wanted. but i know that you can take a normal map in crazybump and convert it to a displacement map

Thank you Zelouille i corrected it as you mentioned.

and the low poly character result rendered it in blender (use NMap Ts, Nor (negative) and Normal Map buttons)

Well, you can’t make groups into other groups. So, the trick is to to all ungroup (Alt G) then group all the nodes.

If i make that, it will become so boring to modify if i need it.

Also, nodes don’t make all. If you want to import the all method, you will need to append the material too (mat_uv_baker).

In sum, i think it’s more simple to append your mesh in my .blend file.

Great, the generated map seems to work fine.
Did you put the “Nor” cursor to 1.00 on the “Map To” panel ?

it shouldn’t be too difficult to make a hard-code of it… :smiley:


I used Crazybump to generate maps at a res of 2048x2048 just fine. It not being GNU has nothing to do with nothing.

Great method Zelouille, I had a feeling it was possible to do it with nodes.

[quote= Zelouille

Great, the generated map seems to work fine.
Did you put the “Nor” cursor to 1.00 on the “Map To” panel ?[/quote]

yes im use 1.00 for Nor value slider at “Map To” panel

Tres bien fait, merci beaucoups! Would it be possible for this to be done through a Python script? Then the whole process could be automated?