<div dir="ltr"><div>Hi <span style="font-size:12.8px">Vinoth,</span></div>First question:<div>are you running a debug build? For all your osgdem work you seemed to be running a debug build - those are very slow.</div><div>we need more stats to begin on an answer to what could be optimized: maybe every building has it's own stateset?</div><div>make a screenshot with the graphs and camera stats.</div><div>Laurens.</div></div><div class="gmail_extra"><br><div class="gmail_quote">On Wed, Feb 22, 2017 at 7:51 PM, David Heitbrink <span dir="ltr"><<a href="mailto:david-heitbrink@uiowa.edu" target="_blank">david-heitbrink@uiowa.edu</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">I would try to look at instancing. The OSG Forest is a good example.<br>
<br>
Instancing is were you tell the GPU to draw an object X number of times, and in the vertex shader you get a built in var gl_InstanceID, that tells you which item it is drawling (i.e. if you are drawling 100 versions, this will go from 0 to 99). So in the vertex shader you move each vertex to a new position, based the instance ID.<br>
<br>
You might have to get a little creative in terms of textures management/mapping so each building has a different texture. You could say create a large texture mosaic, and adjust the texture coordinates based on your instance ID.<br>
<span class=""><br>
------------------<br>
Read this topic online here:<br>
</span><a href="http://forum.openscenegraph.org/viewtopic.php?p=70316#70316" rel="noreferrer" target="_blank">http://forum.openscenegraph.<wbr>org/viewtopic.php?p=70316#<wbr>70316</a><br>
<div class="HOEnZb"><div class="h5"><br>
<br>
<br>
<br>
<br>
______________________________<wbr>_________________<br>
osg-users mailing list<br>
<a href="mailto:osg-users@lists.openscenegraph.org">osg-users@lists.<wbr>openscenegraph.org</a><br>
<a href="http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org" rel="noreferrer" target="_blank">http://lists.openscenegraph.<wbr>org/listinfo.cgi/osg-users-<wbr>openscenegraph.org</a><br>
</div></div></blockquote></div><br></div>