<div dir="ltr">Can you find a way to perform the transform on each object in a vertex shader and not have a unique state have to be calculated for each of the 200 objects?</div><br><div class="gmail_quote"><div dir="ltr" class="gmail_attr">On Tue, Oct 8, 2019 at 6:20 AM Gianluca Natale <<a href="mailto:natale@europe.altair.com">natale@europe.altair.com</a>> wrote:<br></div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex">
<div lang="IT">
<div class="gmail-m_2700963786699460416WordSection1">
<p class="MsoNormal">Hi all,<u></u><u></u></p>
<p class="MsoNormal">I have a performance issue in my scenegraph that I cannot completely understand.<u></u><u></u></p>
<p class="MsoNormal">My scenegraph is made by a main matrix transform, with these 2 children:<u></u><u></u></p>
<ul style="margin-top:0cm" type="disc">
<li class="gmail-m_2700963786699460416MsoListParagraph" style="margin-left:0cm">One geode that renders a big object on screen (the geometry in the drawable can take up to several thousands vertices);<u></u><u></u></li><li class="gmail-m_2700963786699460416MsoListParagraph" style="margin-left:0cm">One group node that in its turn has 200 children, each made by a matrix transform and a geode. The drawable in each of those geodes is very simple (no more than 100 vertices)<u></u><u></u></li></ul>
<p class="MsoNormal">It seems that this configuration allows me to have at most 50 fps.<u></u><u></u></p>
<p class="MsoNormal">I feel that this should be rendered much faster.<u></u><u></u></p>
<p class="MsoNormal"><u></u> <u></u></p>
<p class="MsoNormal">So I made some experiment. If I remove the 200 matrix transform attached to the group node I mentioned above,<br>
and directly apply the transformations to the vertices of the geometries in the 200 drawables of the small objects, performance improves a lot, till 100 fps.<br>
I investigatd a bit inside OSG code (I’m using OG ver.3.4.1), and apparently the only overhead due to the additional matrix transformations is a call to glLoadMatrix (I’m using the old ffp).<br>
How can you explain such an improvement?<br>
<br>
My real problem is that I would like to replace the 200 matrix transfromations with 200 auto-transform matrices, since I’d like those small objects to keep constant size on screen.<u></u><u></u></p>
<p class="MsoNormal">But if I do that, I cannot remove the 200 transformations at all, and I’ll end up with a bad performance.<u></u><u></u></p>
<p class="MsoNormal">Any idea about what I can try to make rendering of my scenegraph faster?<u></u><u></u></p>
<p class="MsoNormal"><u></u> <u></u></p>
<p class="MsoNormal">Thanks,<u></u><u></u></p>
<p class="MsoNormal">Gianluca<u></u><u></u></p>
</div>
</div>
_______________________________________________<br>
osg-users mailing list<br>
<a href="mailto:osg-users@lists.openscenegraph.org" target="_blank">osg-users@lists.openscenegraph.org</a><br>
<a href="http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org" rel="noreferrer" target="_blank">http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org</a><br>
</blockquote></div><br clear="all"><div><br></div>-- <br><div dir="ltr" class="gmail_signature"><div dir="ltr"><div><div dir="ltr"><div dir="ltr"><div style="text-align:center">Chris 'Xenon' Hanson, omo sanza lettere. Xenon@AlphaPixel.com <a href="http://www.alphapixel.com/" target="_blank">http://www.alphapixel.com/</a></div><div style="text-align:center">Training • Consulting • Contracting</div><div style="text-align:center">3D • Scene Graphs (Open Scene Graph/OSG) • OpenGL 2 • OpenGL 3 • OpenGL 4 • GLSL • OpenGL ES 1 • OpenGL ES 2 • OpenCL</div><div style="text-align:center"><span style="font-size:12.8px">Legal/IP •</span><span style="font-size:12.8px"> </span><span style="font-size:12.8px">Forensics •</span><span style="font-size:12.8px"> </span>Imaging <span style="font-size:12.8px">•</span><span style="font-size:12.8px"> </span><span style="font-size:12.8px">UAVs </span><span style="font-size:12.8px">• GIS • GPS • osgEarth • Terrain • Telemetry • Cryptography • LIDAR • Embedded • Mobile • iPhone/iPad/iOS • Android</span></div><div style="text-align:center"><a href="https://twitter.com/alphapixel" target="_blank">@alphapixel</a> <a href="http://facebook.com/alphapixel" target="_blank">facebook.com/alphapixel</a> (775) 623-PIXL [7495]<br></div></div></div></div></div></div>