Hi,

You can disable the auto-compute near far and give a fix value for near and
far.

If this method don't solve your problem you can add a callback to your root
node in the scene using the setClampProjectionMatrixCallback method of the
cullvisitor and override the clampProjectionMatrixImplementation method in
the class ClampProjectionMatrixCallback. In my implementation I compute the
nearest point in the geometry to set the near plane and then adjust the far
plane depending of the near plane and the nearFarRatio.

This little hack work for my with very large terrains culling the far
objects in the scene instead of the nearest objects.

Cheers,

Maria.

On Mon, Jun 29, 2009 at 11:27 AM, Ren Liwei <[email protected]> wrote:

> Hi,
>  In my scene there is an earth and some small models on it.  Sometimes i've
> got a screenshot like the attachment when i turn auto-compute near far on.
>  I known that's becuase the auto-computed near plane is too far to let
> nearer primitives in. So i tried giving a very little nearfarratio and then
> it worked somewhat. But when i added an even larger sky sphere into the
> scene, once again i fall into trouble with near far.
>  So what should i do with near far when there are both very near(less then
> 1) and far away(far then 100000000) things to show in the secen.
>
> Thank you!
>
> Cheers,
> indif
>
> ------------------
> Read this topic online here:
> http://forum.openscenegraph.org/viewtopic.php?p=14637#14637
>
>
>
>
> _______________________________________________
> osg-users mailing list
> [email protected]
> http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org
>
>


-- 
María Ten Rodríguez
Instituto de Automática e Informática Industrial  http://www.ai2.upv.es
Ciudad Politécnica de la Innovación
Universidad Politécnica de Valencia
_______________________________________________
osg-users mailing list
[email protected]
http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org

Reply via email to