Skip to main content
gamedev.net
🔒 Locked

incorrect normal mapping? (image)

Started by therealremi 2 replies 1.2k views
Original Post
therealremi
therealremi
Hi, I was trying to implement normal mapping using single directional light. The arrow in the image below shows the light direction. Shouldn't the leftmost quad be completely dark since the light shines on its back? Image Hosted by ImageShack.us How to fix that? Do the other ones look correct? (assuming their color is qual to: saturate( dot(light_vector, surface_normal) ); ?
Dragon_Strike
Dragon_Strike
have u made sure that the normals are correct? my guess would be that u have the same normal on the right and left one...
lordciriuz
lordciriuz
Hi,

The other squares seems to look correct. I agree with the previous post about to check if the left square has the same normals than the right one. As I can see, you are using the same normal map for the four squares. Is the normal map in object or tangent space?

Ariel Brunetto
Lord CiriuzAquadize Studios
therealremi
therealremi
The normal map is in tangent space. Actually I can export correct normals (and I know they are OK in my modelling program), but here I export the inverse of the TBN matrix (to transform light vector into tangent space). So if somebody can attest that this kind of error can be caused by the wrong inverse TBN matrix only... then I'll have to play with it.

[Edited by - therealremi on April 11, 2007 12:04:54 PM]

Topic Locked

This topic has been locked by a moderator. New replies are not allowed.

Sign in to reply to this topic.