[osg-users] relative size of objects in a scene graph

Vican, Justin E. jvican at draper.com
Thu Oct 4 13:27:47 PDT 2007


Hi Philip,

I had the exact same issue about a year ago.  When I added the earth to
a scene, my vehicle disappeared.  It has to do with OSG computing the
near/far clip planes.  When it does this, the smaller object often falls
outside of the computed viewing frustum.  Make sure that OSG is not
computing these for you.  In OSG 1.2, you could do this with:

   osgProducer::Viewer viewer();

   ...

 
viewer.getCullSettings().setComputeNearFarMode(osg::CullSettings::DO_NOT
_COMPUTE_NEAR_FAR);

 

I am upgrading to OSG2.2 this month, so I don't know how to do it in 2.2
yet.  Something to the effect of:

   osgViewer::Viewer viewer();

   ...

 
viewer.getCamera()->setComputeNearFarMode(osg::CullSettings::DO_NOT_COMP
UTE_NEAR_FAR);

 

 

Hope this helps,
Justin

 

 

From: osg-users-bounces at lists.openscenegraph.org
[mailto:osg-users-bounces at lists.openscenegraph.org] On Behalf Of Philip
Hahn
Sent: Thursday, October 04, 2007 3:46 PM
To: OpenSceneGraph Users
Subject: [osg-users] relative size of objects in a scene graph

 

Hey guys-

 Quick question, does the relative size of objects in a scene graph have
any effect on culling of objects?

 Basically I added a rather large object to a scene graph and now a
relatively small object no longer appears. The size difference is on the
order of 10^6. No code was changed in the visualization, save for adding
the larger node. If I manually reduce the size of the large object in
half the smaller one reappears, and no, according to the relative
positions reported by the PositionAttitudeTransforms it isn't
encompassed by the large object. 

 Thanks,

Philip Hahn

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.openscenegraph.org/pipermail/osg-users-openscenegraph.org/attachments/20071004/05e3d750/attachment-0003.htm>


More information about the osg-users mailing list