Hi Lionel, MatrixTransform are relatively expensive on cull and draw so best used sparingly. The osgUtil::Optimizer has a FlattenStaticTransform to help apply transforms down onto the geometry below them to avoid this cost.
The other thing to do make sure you have a well balanced scene graph - one that has a quad tree hierarchy of group nodes as this helps accelerate the cull traversal, as flat scene graphs where one group contains hundreds of children doesn't allow for high level view frustum culling - the aim should always try to cull as high up in the scene graph as possible. The granularity of your scene graph is something else you can look at, at scene graph that is too fine grained will be expensive on cull and draw. Clumping local geometry together into a single osg::Geometry can help tremendously. Using texture atlas' can help enable the combining of separate geometries together. In SVN there is a new texture atlas build which is part of the Optimizer. Other trick you can deploy with the SVN version is to use the osgViewer::Viewer's ability to thread cull and draw separately by double buffering the rendering back end. Look for the discussion of DrawThreadPerContext on osg-users over the last few months. Robert. On 4/3/07, Lionel Lagarde <[EMAIL PROTECTED]> wrote:
Hi, While examining our simulation statistics, it appears that the main bottleneck it the culling stage. Our simulation data is composed of a terrain covered with objects (houses, individual trees, street lamp, ...). There is a lot of dropped objects (25000 for 16x16 km). Without these objects, the simulation runs at >300 fps. With the objects, the frame rate drop to <30 fps and the cull stage takes 50% of the frame rendering time. My question is: is there a way to improve the culling performances ? Every dropped object is made of a MatrixTransform and a ProxyNode (resolved at loading stage). The osgforest example shows that the MatrixTransforms aren't good for culling performances. Removes the transform nodes means to duplicate the external references. We can do that for low poly objects (like X trees) but not for all the objects. Profiling the application shows that the culling stage performances are bound to: - the number of transform nodes (because the polytope is rebuilt for each node) - the number of drawables Is it possible to cache the render leaves of the drawables (some kind of cull callback that attach the precomputed render leaf to the current render bin) ? Does someone has tried to do that ? _______________________________________________ osg-users mailing list [email protected] http://openscenegraph.net/mailman/listinfo/osg-users http://www.openscenegraph.org/
_______________________________________________ osg-users mailing list [email protected] http://openscenegraph.net/mailman/listinfo/osg-users http://www.openscenegraph.org/
