[osg-users] World space normal.

shayne.tueller shayne.tueller at comcast.net
Wed Jul 11 09:08:06 PDT 2018


Shouldn't the normal be multiplied by the inverse transpose of the modelview matrix? (Only upper 3x3 portion)


Sent via the Samsung Galaxy S7 active, an AT&T 4G LTE smartphone
-------- Original message --------From: "Rowley, Marlin R" <marlin.r.rowley at lmco.com> Date: 7/11/18  7:17 AM  (GMT-07:00) To: OpenSceneGraph Users <osg-users at lists.openscenegraph.org> Subject: [osg-users] World space normal. 


I have a world space vertex computed as follows:
 
WorldVertex = osg_ViewMatrixInverse * gl_ModelViewMatrix * aVertex;
 
I would like to get the world space normal from this vertex.  Is there an equivalent osg_* matrix that does the same thing?
 
I tried this:
 
NormalWorld = gl_NormalMatrix * gl_Normal;  
 
But I know that is only putting the normal in view space.
 
----------------------------------------
Marlin Rowley
Software Engineer, Staff

Missiles and Fire Control
972-603-1931 (office)
214-926-0622 (mobile)
marlin.r.rowley at lmco.com
 

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.openscenegraph.org/pipermail/osg-users-openscenegraph.org/attachments/20180711/6db9b908/attachment.html>


More information about the osg-users mailing list