[osg-users] Large number of occluder nodes

David Heitbrink david-heitbrink at uiowa.edu
Thu May 31 08:00:42 PDT 2018


I am using OccluderNode:     
for each "building" in config file{
        auto &pnt_pair = vecs[i];
        osg::OccluderNode* onode = new osg::OccluderNode();
        osg::ConvexPlanarOccluder* occl = new osg::ConvexPlanarOccluder();
        osg::ConvexPlanarPolygon& polly = occl->getOccluder();

        vector<osg::Vec3> pnts;
        ... get pnts from current building in custom config file
        ... most often 4 points

 
        for (unsigned int j =0; j < pnts.size(); j++){
            polly.add(pnts[j]);
        }

        onode->setOccluder(occl);
        m_group->addChild(onode);
}

The performance without the occluders is bad. Basically the rendering of buildings is not bad, its pretty quick even without the occluders. Where we get in trouble is with the parked cars, pedestrians and various scene clutter. These are relatively small objects, and lots of them have transparency. 

We want to add some form of OIT which should help us to avoid having some many depth sorted objects, but we are not there yet.

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







More information about the osg-users mailing list