[osg-users] Splitting a scene in osg

Sebastian Messerschmidt sebastian.messerschmidt at gmx.de
Sun Jun 21 09:06:20 PDT 2015


You can traverse the scene using a nodevisitor and build a quadtree from 
the drawables.
This is relatively complex, but Robert also pointed to the 
osgForest-example which give you an idea.
One option is to decorate separable "groups" by adding them to a 
osg::Group and let the osgUtil::Optimizer run with the SPATIALIZE_GROUPS 
option.
This will help you only if you have separable drawables/geometries.

If you need to split geometries, you will have to indeed split by 
testing against a plane (e.g. the middle plane of your potential volume) 
and sorting the triangles (there is a mechanism inside the osg to 
traverse the triangles) into distinct drawbles and put them in the 
appropriate bin.

Cheers
Sebastian
> Hey
> So i need this function to split an area
> Can someone give me a hint how to start with that ?
> Thanks in advance :)
>
> ------------------
> Read this topic online here:
> http://forum.openscenegraph.org/viewtopic.php?p=64137#64137
>
>
>
>
>
> _______________________________________________
> osg-users mailing list
> osg-users at lists.openscenegraph.org
> http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org




More information about the osg-users mailing list