• Create Account

## importing blender normal maps object space

Old topic!

Guest, the last post of this topic is over 60 days old and at this point you may not reply in this topic. If you wish to continue this conversation start a new topic.

4 replies to this topic

### #1lomateron  Members

491
Like
0Likes
Like

Posted 26 February 2013 - 03:44 PM

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?

### #2MJP  Moderators

18208
Like
0Likes
Like

Posted 26 February 2013 - 04:00 PM

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.

### #3lomateron  Members

491
Like
0Likes
Like

Posted 26 February 2013 - 04:22 PM

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, 26 February 2013 - 04:24 PM.

### #4FLeBlanc  Members

3133
Like
0Likes
Like

Posted 26 February 2013 - 04:48 PM

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, 26 February 2013 - 04:52 PM.

### #5lomateron  Members

491
Like
0Likes
Like

Posted 26 February 2013 - 05:02 PM

(normal+1)/2

that's what i needed. thanks

Edited by lomateron, 26 February 2013 - 05:02 PM.

Old topic!

Guest, the last post of this topic is over 60 days old and at this point you may not reply in this topic. If you wish to continue this conversation start a new topic.