sidebar features
sidebar content

Go Back   Blender Artists Forums > General Forums > News & Discussion

Reply
 
Thread Tools
Zelouille's Avatar
Zelouille Zelouille is offline
Member
 
Join Date: Aug 2007
Location: Lorraine, France
Posts: 16
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.

Last edited by Zelouille; 28-Oct-07 at 03:38.
#1   Old 23-Oct-07, 01:00   
Reply With Quote


Gwenouille's Avatar
Gwenouille Gwenouille is offline
Member
 
Join Date: Mar 2007
Location: Dieppe
Posts: 793
Hmmmm seems very clever!
I don't know much about them so this is the place to learn !
Well done.
#2   Old 23-Oct-07, 08:03   
Reply With Quote
squareline's Avatar
squareline squareline is offline
Member
 
Join Date: Feb 2007
Posts: 353
I had tested it out, and i will further testing 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.

Last edited by squareline; 23-Oct-07 at 09:09.
#3   Old 23-Oct-07, 08:17   
Reply With Quote
Zelouille's Avatar
Zelouille Zelouille is offline
Member
 
Join Date: Aug 2007
Location: Lorraine, France
Posts: 16
Quote:
Originally Posted by squareline View Post
I had tested it out, and i will further testing 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.
#4   Old 23-Oct-07, 12:07   
Reply With Quote
squareline's Avatar
squareline squareline is offline
Member
 
Join Date: Feb 2007
Posts: 353
Awsome! I cant belive it it is woks perfectly! Thank you Zelouille !
my test:
#5   Old 23-Oct-07, 12:59   
Reply With Quote
jpbouza's Avatar
jpbouza jpbouza is offline
Member
 
Join Date: Jan 2007
Location: Buenos Aires
Posts: 954
Hi Zelouille!! Is it possible to make Displacement maps out of this technique??
#6   Old 23-Oct-07, 13:11   
Reply With Quote
Felix_Kütt's Avatar
Felix_Kütt Felix_Kütt is offline
Member
 
Join Date: Apr 2005
Location: Tallinn, Estonia, EU
Posts: 3,619
I LOVE YOU!

yes! finally! *whooh*
............................................
FunLinks: . . . . . . WikiUser: Fktt
superRandom = An Engineer's Guide To Cat's

Last edited by Felix_Kütt; 23-Oct-07 at 13:20.
#7   Old 23-Oct-07, 13:18   
Reply With Quote
BionicGordon BionicGordon is offline
Member
 
Join Date: Sep 2007
Posts: 84
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
#8   Old 23-Oct-07, 13:31   
Reply With Quote
ZanQdo's Avatar
ZanQdo ZanQdo is offline
Member
 
Join Date: Mar 2004
Location: Costa Rica
Posts: 810
thats some seriusly amazing node setup! thanks
............................................
- the lord of the rigs -

GraphicAll.org
#9   Old 23-Oct-07, 13:45   
Reply With Quote
jpbouza's Avatar
jpbouza jpbouza is offline
Member
 
Join Date: Jan 2007
Location: Buenos Aires
Posts: 954
Crazybump is not GNU, and I think the beta version is restricted to 800x600 output.
#10   Old 23-Oct-07, 13:49   
Reply With Quote
Zelouille's Avatar
Zelouille Zelouille is offline
Member
 
Join Date: Aug 2007
Location: Lorraine, France
Posts: 16
Quote:
Originally Posted by squareline View Post
Awsome! I cant belive it it is woks perfectly! Thank you Zelouille !
my test:
Hey great Feel free to post the result on your low poly character.

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".

Quote:
Originally Posted by jpbouza View Post
Hi Zelouille!! Is it possible to make Displacement maps out of this technique??
No, sorry. And i think you'll never can.
But i'll think it over...

Quote:
Originally Posted by Felix_Kütt View Post
I LOVE YOU!
Me too

Last edited by Zelouille; 23-Oct-07 at 14:33.
#11   Old 23-Oct-07, 14:13   
Reply With Quote
Falgor's Avatar
Falgor Falgor is offline
Member
 
Join Date: Jul 2003
Location: Israel
Posts: 1,161
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 =)!
............................................
I'm friends with the King of the Universe
website @ www.falgor.net | try this custom theme for the forum!
my live music @ youtube
#12   Old 23-Oct-07, 14:35   
Reply With Quote
Felix_Kütt's Avatar
Felix_Kütt Felix_Kütt is offline
Member
 
Join Date: Apr 2005
Location: Tallinn, Estonia, EU
Posts: 3,619
hmm.. i think it could be grouped, but indeed, having savable node group presets would be awesome!
............................................
FunLinks: . . . . . . WikiUser: Fktt
superRandom = An Engineer's Guide To Cat's
#13   Old 23-Oct-07, 14:38   
Reply With Quote
BionicGordon BionicGordon is offline
Member
 
Join Date: Sep 2007
Posts: 84
Quote:
Originally Posted by jpbouza View Post
Crazybump is not GNU, and I think the beta version is restricted to 800x600 output.
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
#14   Old 23-Oct-07, 15:04   
Reply With Quote
squareline's Avatar
squareline squareline is offline
Member
 
Join Date: Feb 2007
Posts: 353
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)

#15   Old 23-Oct-07, 16:11   
Reply With Quote
Zelouille's Avatar
Zelouille Zelouille is offline
Member
 
Join Date: Aug 2007
Location: Lorraine, France
Posts: 16
Quote:
Originally Posted by Falgor View Post
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 =)!
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.

Quote:
Originally Posted by squareline View Post
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)
Great, the generated map seems to work fine.
Did you put the "Nor" cursor to 1.00 on the "Map To" panel ?
#16   Old 23-Oct-07, 17:40   
Reply With Quote
simhar simhar is offline
Member
 
Join Date: Jul 2006
Posts: 365
...

it shouldn't be too difficult to make a hard-code of it...

S.
............................................
Blender Internal Fan
#17   Old 23-Oct-07, 17:45   
Reply With Quote
Howitzer's Avatar
Howitzer Howitzer is offline
Member
 
Join Date: Jun 2004
Location: Little Rock, AR
Posts: 966
Quote:
Originally Posted by jpbouza View Post
Crazybump is not GNU, and I think the beta version is restricted to 800x600 output.
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.
............................................
Changed name to Hauzer
#18   Old 23-Oct-07, 18:10   
Reply With Quote
squareline's Avatar
squareline squareline is offline
Member
 
Join Date: Feb 2007
Posts: 353
Quote:
Originally Posted by Zelouille



Great, the generated map seems to work fine.
Did you put the "Nor" cursor to [B
1.00[/b] on the "Map To" panel ?
yes im use 1.00 for Nor value slider at "Map To" panel
#19   Old 23-Oct-07, 18:52   
Reply With Quote
bigkahuna bigkahuna is offline
Member
 
Join Date: Nov 2004
Location: North Carolina
Posts: 922
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?
#20   Old 23-Oct-07, 20:34   
Reply With Quote
Reply

Bookmarks

Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Forum Jump


All times are GMT. The time now is 14:43.


Powered by vBulletin® Version 3.7.3
Copyright ©2000 - 2010, Jelsoft Enterprises Ltd.
Logo and website design copyright © 2006 by froodee design bureau. All rights reserved.
Other Blender Sites
new icon Blender Homepage »
The official Blender homepage
new icon BlenderNation »
Fresh Blender News, Every Day
new icon Blenderart Magazine »
Blender articles, tutorials and images.
Blender Headlines
Featured Artwork
Short animation: Barrel by Phlopper
Woolly mammoth by sebastian_k
Photorealistic classic furniture by eMirage
Social BlenderArtists