Hi Joan,

On Mon, Jun 6, 2011 at 9:30 AM, Joan Navarro <[email protected]> wrote:
> I have a Scene with a lot of containers representeds with boxes at this 
> point. I want to put in the scene a ton of them and each container is a PAT 
> node in my scenegraph.
>
> I just want to know wich are the best techniques to improve the frame rate in 
> this example.

Using lots of seperate box geometries and lots of seperate
PositionAttitudeTransforms will leads to a scene graph that has a
bottleneck in both cull and draw as there are simply too manage
seperate objects.  In the case of transform nodes they are
particularily expensive for the scene graph to traversal as each
transform node requires the view frustum to be transformed into the
subgraphs local coordinate frame - we've optimized this as much as we
can but in the end a transform node will always be more expensive that
just a straight node.

As a rule of thumb one can typically scale to having thousands of
transforms on screen at any one time without major performance
difficulties in cull, but scaling to ten's of thousands will introduce
a bottleneck.  The osgforest example has one subgraph path that tests
the peformance of transforms so have a look at this to see how things
scale.

Since transform are expensive if you have very large numbers of them
it's an obvious one to optimize away.  How to do it will depend a
great deal on your hardware constraints, the amount of data, whether
the data itself is a static geometry, and whether the transforms are
static, and just how many objects you have in the scene, whether the
geometries are identical etc.  Only you can answer these questions so
please dive in a bit deeper about these aspects and what peformance
you are looking for, what you are getting now.  Once others know a bit
more information we might be able to guide you.

Robert.
_______________________________________________
osg-users mailing list
[email protected]
http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org

Reply via email to