[osg-users] Culling with custom clip planes

Jannik Heller scrawl at baseoftrash.de
Sat Oct 24 14:33:43 PDT 2015


Hi,

The interaction of CullingSet, CullStack and CullVisitor is really confusing to look at, but I think I have a lead!

It seems like the added frustum plane is reset right here: https://github.com/openscenegraph/osg/blob/master/src/osg/CullStack.cpp#L214 when the cull visitor applies a transform.  So the approach of adding a plane in the CullCallback won't work on the whole subgraph.

Looking at the code if I change the frustum on the projectionCullingStack instead of modelViewCullingStack, it should persist for the whole subgraph... but then I have to specify my culling plane in projection space instead of model space, which is a bit annoying. I will keep looking for a solution.

------------------
Read this topic online here:
http://forum.openscenegraph.org/viewtopic.php?p=65433#65433








More information about the osg-users mailing list