Normal Maps and Deferred Lighting

Started by
13 comments, last by SylHar 14 years, 4 months ago
Quote:... because inverse of TBN is used in forward rendering to bring light direction to texture space


in the link I provided, the 'standard' tbn matrix is use to 'bring light direction to texture space' not the inverse of tbn

I've always supposed that if you want to do normal mapping in view space then you're supposed to inverse the tbn matrix. But now b_thangvn is telling the opposite. That's why I'm confused.

Advertisement
I am using the TBN matrix to convert normals from a normal map (which are in tangent space) to eye space.
That's where I don't understand.

I use tbn to convert my light vector into tangent space, and the result is correct !

Is there more than one type of tangent/bitangent ? or is there a reason why both can be valid ? or else I'm just blind ?

Quote:Original post by flaviusxvii
I am using the TBN matrix to convert normals from a normal map (which are in tangent space) to eye space.


Quote:Original post by SylHar
I use tbn to convert my light vector into tangent space, and the result is correct !

Is there more than one type of tangent/bitangent ? or is there a reason why both can be valid ? or else I'm just blind ?


You are probably using then transpose of each others matricies.

The reason is that the TBN matrix is an rotation matrix. And the inverse of an rotation matrix is the same as the transpose of that same matrix.

if TBN =
T1 B1 N1
T2 B2 N2
T3 B3 N3

rotates a vector from tangent space to object space then

Transpose(TBN) =
T1 T2 T3
B1 B2 B3
N1 N2 N3

rotates a vector from object space to tangent space

[Edited by - AndreasL on December 11, 2009 6:20:22 AM]
thank, I understand now

This topic is closed to new replies.

Advertisement