• Advertisement
Sign in to follow this  

importing blender normal maps object space

This topic is 1789 days old which is more than the 365 day threshold we allow for new replies. Please post a new topic.

If you intended to correct an error in the post then please contact us.

Recommended Posts

I dont understand how normal maps in object space are defined, when i see a normal maps in object space of a sphere i see it colored in rainbow,If the normals are in object space there should be a place in the normal map image were the colors are black because the normal vectors are pointing in the (-x,-y,-z) direction so negative values means black colors but i dont see the black parts in the normal maps of a sphere, why?

Can someone explain me how are normals in object space defined?

Share this post


Link to post
Share on other sites
Advertisement

If you store a normal map in an image format that doesn't have a sign bit, then you range compress the values so that they fit in the [0, 1] range. Then you'll typically reverse this process in the shader to get the normal value to use.

Share this post


Link to post
Share on other sites

So the sign is the only thing that gets out in the normals map? nothing else changes?(that doesn't fit the colors of the normal map of a sphere in object space)

Edited by lomateron

Share this post


Link to post
Share on other sites

You're not ever going to get pure black because (-1,-1,-1) isn't unit length. The darkest you would get would be about (54,54,54).

 

Edit: To clarify, the values are multiplied by 0.5 then add to 0.5 to do the range compression MJP talked about. So a normal of (-1,-1,-1) would normalize to (-0.57735, 0.57735, -0.57735), and after range compression would be (0.211325, 0.211325, 0.211325). In RGB colorspace, that equals (54,54,54). Similarly, the vector (1,1,1) normalized and compressed results in the color (201,201,201) so that would be the brightest shade of gray you would find in the normal map, and full white would not occur.

Edited by FLeBlanc

Share this post


Link to post
Share on other sites

(normal+1)/2 

 

that's what i needed. thanks

Edited by lomateron

Share this post


Link to post
Share on other sites
Sign in to follow this  

  • Advertisement