Tangent space normal pass

   12824   4   2
User Avatar
Member
3 posts
Joined: May 2016
Offline
Have searched the right answer for this issue now too many days, so I decided to ask here from the gurus!

So I would like to render a tangent space normal map pass, not world space as it is by default if I just turn on extra image planes and normal.
I need this map to use in Unreal Engine 4.
Right now I have to export .abc from Houdini to Maya and render the pass there.

I believe Mantra or the shaders doesnt support tangent space normal maps, so if anyone can help me to create a proper shader to use directly on my objects, that would be great too!
User Avatar
Staff
5285 posts
Joined: July 2005
Offline
Use the Bake Texture ROP with ‘Tangent Normals’ enabled, instead of the mantra ROP.
User Avatar
Member
3 posts
Joined: May 2016
Offline
twod
Use the Bake Texture ROP with ‘Tangent Normals’ enabled, instead of the mantra ROP.
But Isn´t Bake texture ROP only for baking normals to textures? I mean I try to avoid any extra work steps and want just to render my object from the camera as it is but with tangent space normals visible. I attach a picture (from Maya) to show what Im after.

Attachments:
tangentSpaceNormalMap.jpg (31.1 KB)

User Avatar
Member
9376 posts
Joined: July 2007
Offline
if that render is from camera then it looks more like object or world space N, rendering normals as tangent space doesn't make sense unless you are baking some hires detail, since you would just get constant blue {.5,.5,1}
(only when you capture a difference in tangent space (like lowres-hires), you would get some variation)

to output object/world space N you need to modify the shader, take N, transform to object/world space using Transform VOP, normalize (, if required fit from -1..1 to 0..1) and bindexport as vector variable of some name, like objN
then on mantra add new image plane for that variable

whether you use such map as tangent space normal map in Unreal or not is another thing
Tomas Slancik
CG Supervisor
Framestore, NY
User Avatar
Member
3 posts
Joined: May 2016
Offline
tamte
if that render is from camera then it looks more like object or world space N, rendering normals as tangent space doesn't make sense unless you are baking some hires detail, since you would just get constant blue {.5,.5,1}
(only when you capture a difference in tangent space (like lowres-hires), you would get some variation)

to output object/world space N you need to modify the shader, take N, transform to object/world space using Transform VOP, normalize (, if required fit from -1..1 to 0..1) and bindexport as vector variable of some name, like objN
then on mantra add new image plane for that variable

whether you use such map as tangent space normal map in Unreal or not is another thing
Thanks a lot Tomas, this actually helped me a lot to get closer and closer!
Although there is slight difference still in the shading. The way I get this result was that I use transform node To Space:camera, and then fit1 node to flip Z normal so that it was towards the camera. Im not sure is this the right procedure but now its almost the same as in Maya rendering.
Only thing is that there are some areas with total black color, and at the moment I havent figure out how to deal that.

Attachments:
camera_space_normal_maps.JPG (115.4 KB)

  • Quick Links