[osg-users] How to improve frame rate when loading multiple buildings ??

Voerman, L. l.voerman at rug.nl
Thu Feb 23 00:25:49 PST 2017


Hi Vinoth,
First question:
are you running a debug build? For all your osgdem work you seemed to be
running a debug build - those are very slow.
we need more stats to begin on an answer to what could be optimized: maybe
every building has it's own stateset?
make a screenshot with the graphs and camera stats.
Laurens.

On Wed, Feb 22, 2017 at 7:51 PM, David Heitbrink <david-heitbrink at uiowa.edu>
wrote:

> I would try to look at instancing. The OSG Forest is a good example.
>
> 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.
>
> 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.
>
> ------------------
> Read this topic online here:
> http://forum.openscenegraph.org/viewtopic.php?p=70316#70316
>
>
>
>
>
> _______________________________________________
> osg-users mailing list
> osg-users at lists.openscenegraph.org
> http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.openscenegraph.org/pipermail/osg-users-openscenegraph.org/attachments/20170223/40470ad2/attachment-0003.htm>


More information about the osg-users mailing list