Hi Belthil,

The OSG by default updates the near/far planes per frame.  In your
case you probably have just two osg::Geometry and since the compute
near far is based on bounding boxes it'll end up having the bounding
volume entirely surround the eye point when you zoom in.  In this
situation only the far plane can be set according to the model, the
near plane has to be in front of your, but how far... the OSG resolves
this by using a minimum near/far ratio setting, so the near plane is
set to nearFarRatio * distanceFarPlane.

You can control the nearFarRatio yourself by doing:

 viewer.getCamera()->setNearFarRatio(0.000001); // try out various ratios.

You have to watch though, the lower the value, the lower the numerical
precision so you could end up with z fighting if you set it too low.

Robert.

On 5/21/07, belthil <[EMAIL PROTECTED]> wrote:

Hello!

    My scene counting a huge amount of points, the frustrum is set
automatically to quite big parameters. But if i have a tiny place in my
scene with another huge amount of points, that part is clipped by the
frustrum.
To be more precise, if i have a cube whose the size is 1e6 with 100000
points, and if i have another cube, at the center of the big cube, whose the
size is 1 with 100000 points too, that little cube is clipped when i'm close
to it.
So what i would like to do, is to travel inside the big cube of points as
well as inside the little one. What could be great is that the closer
distance the viewer is and the tinier the near plane is, or the further the
points are scaled.
Does OSG contains something that enables to do such a thing? Or is there
another easier solution to do that?

I thank you for all your help you could give me!

Belthil


 Créez votre adresse électronique [EMAIL PROTECTED]
1 Go d'espace de stockage, anti-spam et anti-virus intégrés.
_______________________________________________
osg-users mailing list
[email protected]
http://openscenegraph.net/mailman/listinfo/osg-users
http://www.openscenegraph.org/

_______________________________________________
osg-users mailing list
[email protected]
http://openscenegraph.net/mailman/listinfo/osg-users
http://www.openscenegraph.org/

Reply via email to