View Full Version : normal-transformation
08-12-2002, 03:44 AM
I'm trying to comprehend a little about how OpenGL works, i.e. about matrices and stuff. Now I've read something in a OpenGL-book, that I don't understand at all:
To make sure that the normals stay perpendicular to the polygons, they must not be transformed with the same Matrix like the points, but with the transposed of the inverse of the transformation-matrix.
What makes the normal different to any other point?
08-12-2002, 04:01 AM
Normals have a direction and a length.
Draw a circle with some nice normals pointing to the outside. Now squish the circle to an ellipse, aka. non-uniform scale.
How do you transform the normals to get them pointing away from the ellipse in a 90 degree angle from their footpoint's tangent to the ellipse? There you are, transposed inverse of the scale.
[This message has been edited by Relic (edited 08-12-2002).]
08-12-2002, 04:44 AM
if you take the transpose, translation doesn't affect the normals
if you take the transpose inverse, rotations stay the same
if you take the inverse, scaling inverses
if you take the transpose inverse, scaling inverses,rotations stays the same,and translation doesn't affect the normal.
the translation and rotational part makes sence from the first view (no trans, and rotation stays the same), the scaling, as suggested, look at the squished sphere, wich got an elipse. you have to scale by the inverse..
somewhere i've seen a paper explaining this all visually..
08-13-2002, 02:34 AM
thanks a lot, I understand now, that I cannot transform normals like the other points.
But if someone knows a site explaining the use of those kinds of matrices, I'd be glad to know.
I still know how to determine inverse, transpose, isotropic and anything about matrices, but I don't know what they are good for...
Thanks a lot,
08-13-2002, 06:04 AM
The OpenGL Programming Guide explains the matrix and trasformation basics in appendix F. "Transforming normals" takes a good piece of that appendix, more than "transforming vertices". http://www.opengl.org/discussion_boards/ubb/smile.gif
Search for "redbook.pdf" and download it.
I think Eric Lengyel has a really nice description of this in his book Mathematics for 3D Game Programming and Computer Graphics - which you can find at this link:
I also have a different description (less mathematically rigorous) of normal transformation from GDC 2001 that you can find at:
Hope this helps -
Powered by vBulletin® Version 4.2.3 Copyright © 2017 vBulletin Solutions, Inc. All rights reserved.