Hi Alex, The OSG by default has small feature culling enabled, but this should only effect very small objects. Could this be the case?
You can set what type of culling you want in our application by the changing the CullingMode via the osg::CullSettings object. osg::Camera inherits from CullSettings so the usual way to control the culling mode is: viewer.getCamera()->setCullingMode(osg::CullSettings::VIEW_FRUSTUM_SIDES_CULLING); Robert. On 18 November 2014 09:07, Alex Malygin <[email protected]> wrote: > Hi, > > > I have problems with LOD and AutoTransform > I add 2 nodes and displays at a distance, but can not see anything. If > closer to the model, then everything starts to work. If you add only > AutoTransform, everything works. What could be the problem? > > > Code: > > osg::ref_ptr< osg::LOD > lod = new osg::LOD; > osg::ref_ptr<osg::Billboard> billBord = new osg::Billboard(); > billBord->setMode(osg::Billboard::POINT_ROT_EYE); > billBord->addDrawable( > createSquare(osg::Vec3(-15.0f,0.0f,-0.5f),osg::Vec3(30.0f,0.0f,0.0f),osg::Vec3(0.0f,0.0f,30.0f),osgDB::readImageFile("C:\\1.png")),osg::Vec3(0.0f,0.0f,0.0f) > ); > osg::ref_ptr<osg::AutoTransform> at = new osg::AutoTransform; > at->setAutoScaleToScreen(true); > at->setMinimumScale( 1.0 ); > at->setMaximumScale( 10000.0 ); > at->addChild ( billBord.get() ); > at->setAutoRotateMode(osg::AutoTransform::ROTATE_TO_SCREEN); > osg::ref_ptr<osg::Node> model = osgDB::readNodeFile("C:\\cow.osg"); > double radius = model->getBound().radius() ; > lod->addChild( model.get() , 0 , radius * 10 ); > lod->addChild( at.get() , radius * 10 , 1000000000 ); > > > > > ... > > Thank you! > > Cheers, > Alex > > ------------------ > Read this topic online here: > http://forum.openscenegraph.org/viewtopic.php?p=61661#61661 > > > > > > _______________________________________________ > osg-users mailing list > [email protected] > http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org >
_______________________________________________ osg-users mailing list [email protected] http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org

