[osg-users] transforming normals

Paul Melis paul at science.uva.nl
Fri Mar 20 09:00:05 PDT 2009


Can Hosgor wrote:
> I'm writing a simple nodevisitor to compute the lightmap of a given node. This nodevisitor treats transforms and geodes specially, so that each vertex in the geometry is multiplied with the most recent transform matrix in order to obtain world coordinates. So far the above code works well except that i don't know how to transform the normals. Can I obtain the normal matrix directly from the transformation matrix, if so how? 
>   
If M is your transformation matrix then (M^-1)^T transforms your normals 
(that's the transposed inverse of M).

Paul



More information about the osg-users mailing list