inverse transpose matrix. what is that?

Started by
3 comments, last by Namethatnobodyelsetook 15 years, 8 months ago
im trying to do normal mapping, but what the F is inverse transpose matrix? im using shader code from here http://www.mdxinfo.com/tutorials/normalmapping.php. what i have to do with it? i tried to search but didnt find anything what would help :P thx.
Advertisement
The "inverse transpose" of a matrix M is matrix that results from first transposing M, and then finding the inverse of the result.

The inverse transpose of a matrix is often used to transform normals -- in this case, they're using the combined world-view matrix as the source matrix (M), so they're transforming the normals into view space, probably (I didn't read beyond finding out which matrix they are inverting).

Note that under certain conditions (if the matrix is orthogonal, e.g., basically contains no icky nonuniform scales) the matrix inverse is the matrix transpose, and the transpose of the transpose is the original matrix, so you may not need to do anything at all to obtain the desire matrix. That is however quite context specific to it would benefit you to do things the "proper" way before you worry about optimizations, as they can make the result wrong (sometimes in hard to detect ways).
oooh. there is some bump mapping but it is VERY WEAK, so i barely can see it.
Quote:
Note that under certain conditions (if the matrix is orthogonal, e.g., basically contains no icky nonuniform scales) the matrix inverse is the matrix transpose, and the transpose of the transpose is the original matrix, so you may not need to do anything at all to obtain the desire matrix. That is however quite context specific to it would benefit you to do things the "proper" way before you worry about optimizations, as they can make the result wrong (sometimes in hard to detect ways).


Actually, I was looking out for this answer. I've readed about it but I was not quite sure. Thank you for your answer.

In bone transformations can I use this method to transform normals ? I think, ny bone transform matrix are orthogonal. (They are consist of only translation and orientation transformations) Even if not so, if I normalize the output vector. Is it correct result ?

Thanks.
If you do uniform scales (scale x,y,z by the same amount), then normalizing is fine. Non uniform scaling, shears, and other things you likely won't ever do will require the inverse transpose method to get correct results.

While newer shader models have lots of constants, back in sm.1.1, with 96 constants, nobody used IT matrices. Nobody used full 4x4 matrices except for projection. Shortcuts can be used as long as you're aware of what limitations you're placing on yourself.

This topic is closed to new replies.

Advertisement