Re: [osg-users] Culling with custom clip planes

2015-10-26 Thread Robert Osfield
Hi Jannik, Just catching up with this thread, but am afraid my brain isn't yet clear enough this Monday morning to be able spot anything. I'm afraid I'm still a bit foggy brained, did a 38 mile, hilly and muddy ultramarathon at the weekend :-) For now I don't have anything else to add to your

Re: [osg-users] Culling with custom clip planes

2015-10-24 Thread Jannik Heller
Hi Robert, I have just noticed that approach of adding culling planes doesn't work 100% accurately. Some meshes that have their bounding box fully outside of the culling plane don't get culled. To test with please check the attached osgreflect.cpp. I added a culling plane so that everything

Re: [osg-users] Culling with custom clip planes

2015-10-24 Thread Jannik Heller
Oops, wrong file. Use this one please. -- Read this topic online here: http://forum.openscenegraph.org/viewtopic.php?p=65432#65432 /* OpenSceneGraph example, osgreflect. * * Permission is hereby granted, free of charge, to any person obtaining a copy * of this software and

Re: [osg-users] Culling with custom clip planes

2015-10-24 Thread Jannik Heller
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

Re: [osg-users] Culling with custom clip planes

2015-10-24 Thread Jannik Heller
Ok, setting on projectionCullingStack works fine for the whole subgraph, you just have to transform the plane to view space first: Code: virtual void operator()(osg::Node* node, osg::NodeVisitor* nv) { osgUtil::CullVisitor* cv = dynamic_cast(nv);

Re: [osg-users] Culling with custom clip planes

2015-04-10 Thread Jannik Heller
I have implemented the CullCallback way and it seems to work great. Thanks for the tip! Cheers Jannik -- Read this topic online here: http://forum.openscenegraph.org/viewtopic.php?p=63322#63322 ___ osg-users mailing list

Re: [osg-users] Culling with custom clip planes

2015-04-09 Thread Robert Osfield
Hi Jannik, You could add culling planes to the frustum during the cull traversal (see osg::CullingStack/osg::CullingSet or osgUtil::CullVisitor), or use the osg::ConvexPlanarOccluder support. Going the cull traversal route will be doing something I haven't done before but in principle you should

[osg-users] Culling with custom clip planes

2015-04-08 Thread Jannik Heller
Hi, In the osgreflect example a ClipNode is used to remove unwanted objects behind the reflection. Is there a way that in addition to clipping these objects, we could also cull them? Objects that are entirely behind the reflection obviously do not need to be rendered. From what I could tell in