<html><head><meta http-equiv="Content-Type" content="text/html; charset=UTF-8"></head><body><div><font face="sans-serif">Shouldn't the normal be multiplied by the inverse transpose of the modelview matrix? (Only upper 3x3 portion)</font></div><div><br></div><div><br></div><div><br></div><div id="composer_signature"><div style="font-size:85%;color:#575757" dir="auto">Sent via the Samsung Galaxy S7 active, an AT&T 4G LTE smartphone</div></div><div><br></div><div style="font-size:100%;color:#000000"><!-- originalMessage --><div>-------- Original message --------</div><div>From: "Rowley, Marlin R" <marlin.r.rowley@lmco.com> </div><div>Date: 7/11/18 7:17 AM (GMT-07:00) </div><div>To: OpenSceneGraph Users <osg-users@lists.openscenegraph.org> </div><div>Subject: [osg-users] World space normal. </div><div><br></div></div>
<div class="WordSection1">
<p class="MsoNormal">I have a world space vertex computed as follows:<o:p></o:p></p>
<p class="MsoNormal"><o:p> </o:p></p>
<p class="MsoNormal">WorldVertex = osg_ViewMatrixInverse * gl_ModelViewMatrix * aVertex;<o:p></o:p></p>
<p class="MsoNormal"><o:p> </o:p></p>
<p class="MsoNormal">I would like to get the world space normal from this vertex. Is there an equivalent osg_* matrix that does the same thing?<o:p></o:p></p>
<p class="MsoNormal"><o:p> </o:p></p>
<p class="MsoNormal">I tried this:<o:p></o:p></p>
<p class="MsoNormal"><o:p> </o:p></p>
<p class="MsoNormal">NormalWorld = gl_NormalMatrix * gl_Normal; <o:p></o:p></p>
<p class="MsoNormal"><o:p> </o:p></p>
<p class="MsoNormal">But I know that is only putting the normal in view space.<o:p></o:p></p>
<p class="MsoNormal"><o:p> </o:p></p>
<p class="MsoNormal"><span style="font-size:10.0pt;font-family:"Arial",sans-serif;color:#1F497D">----------------------------------------<o:p></o:p></span></p>
<p class="MsoNormal"><span style="font-size:10.0pt;font-family:"Arial",sans-serif;color:#1F497D">Marlin Rowley<o:p></o:p></span></p>
<p class="MsoNormal"><span style="font-size:10.0pt;font-family:"Arial",sans-serif;color:#1F497D">Software Engineer, Staff<o:p></o:p></span></p>
<p class="MsoNormal"><img width="156" height="40" style="width:1.625in;height:.4166in" id="Picture_x0020_1" src="content://com.samsung.android.email.attachmentprovider/1/705/RAW" alt="cid:image002.jpg@01D39374.DEC5A2E0" onmouseover="imageMousePointerUpdate(true)" onmouseout="imageMousePointerUpdate(false)"><span style="font-size:10.0pt;font-family:"Times New Roman",serif;color:#1F497D"><o:p></o:p></span></p>
<p class="MsoNormal"><i><span style="font-size:12.0pt;font-family:"Times New Roman",serif;color:#1F497D">Missiles and Fire Control</span></i><span style="color:#1F497D"><o:p></o:p></span></p>
<p class="MsoNormal"><span style="font-size:10.0pt;font-family:"Arial",sans-serif;color:#1F497D">972-603-1931 (office)<o:p></o:p></span></p>
<p class="MsoNormal"><span style="font-size:10.0pt;font-family:"Arial",sans-serif;color:#1F497D">214-926-0622 (mobile)<o:p></o:p></span></p>
<p class="MsoNormal"><span style="font-size:10.0pt;font-family:"Arial",sans-serif"><a href="mailto:marlin.r.rowley@lmco.com"><span style="color:#0563C1">marlin.r.rowley@lmco.com</span></a></span><o:p></o:p></p>
<p class="MsoNormal"><o:p> </o:p></p>
</div>
</body></html>