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

Philip Hahn everphilski at gmail.com
Thu Oct 4 20:54:44 PDT 2007


Justin-

Thanks for the quick response. One note:

When using osgUtil::SceneView, so it doesn't get applied to the camera, it
gets applied to the scene itself, so...

  osgUtil::SceneView *scene = new osgUtil::SceneView;

  // stuff

  scene->setComputeNearFarMode(osg::CullSettings::DO_NOT_COMPUTE_NEAR_FAR);

just FYI. Thanks again.

Philip


On 10/4/07, Vican, Justin E. <jvican at draper.com> wrote:
>
>  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.2yet.  Something to the effect of:
>
>    osgViewer::Viewer viewer();
>
>>
>    viewer.getCamera
> ()->setComputeNearFarMode(osg::CullSettings::DO_NOT_COMPUTE_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
>
> _______________________________________________
> osg-users mailing list
> osg-users at lists.openscenegraph.org
> http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org
>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.openscenegraph.org/pipermail/osg-users-openscenegraph.org/attachments/20071004/481f4d3d/attachment-0003.htm>


More information about the osg-users mailing list