[osg-users] Best way to cull object hidden by a mountain

Valerian Merkling niarkoleptik at gmail.com
Wed Jun 22 08:55:39 PDT 2016


Hi,

I'm working with OpenSceneGraph 3.4.0 on a kind of GIS app.

I'm rendering the ground using textured HeightField square. My scene graph is cut in two part, a group node with all the textured HeightFields, and another containing all my 3D objects (sorted in a quadtree).

I've got a lot of thoses textured heightfield squares, they come in different resolution, and will be soon put into a nice QuadTree with LOD. 

I would like to use Occlusion Culling to avoid to render object hidden behind those Heightfield.

As far as I know there is both OccluderNode and OcclusionQueryNode which can be used for culling.

I tried to use OccluderNode but I can't convert HeightField to ConvexPlanarOccluder.

Then I tried OcclusionQueryNode (root -> occlusionQueryNode -> QuadTree -> objects) but it seems to be too powerful : everything is culled, even the heightField part which is not inside the occlusionQueryNode ... :(

I came to realize that I barely understand how to use OcclusionQueryNode and OccluderNode, so I would like to have your advice : Is it a good idea to use one of thoses ? And how can I use them properly ?

Thank you!

Cheers,
valerian

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








More information about the osg-users mailing list