Hi Miguel,

The OSG will try to do it's best at optimizing the near/far planes out
of the box, but it isn't a magic wand that solves all z fighting
issues.  There are a range of strategies that you can use to help
avoid z fighting, from using depth partitioning (see the
osgdepthpartion example) to tweaking your database to avoid issues.  I
can't say what would be most appropriate as I really don't know enough
about your particular apps needs.

Robert.

On Tue, Oct 20, 2009 at 8:06 AM, Miguel Lokida <[email protected]> wrote:
> Hi,
>
> Here 's my problem. My scenegraph contains some big an little objects.
> But when rendering, I have some Z fighting with coplanar triangles and also, 
> when I place my camera around a little object the znear is to big and my 
> object is cutted.
>
> So I have used setNearFarRatio with 0.00001. Like this my little object is 
> well int the frustum. But Zfighting appears with big coplanars objects.
>
> So I have tried to use setCullingActive(true) and setCullingMode( 
> osg::CullSettings::COMPUTE_NEAR_FAR_USING_PRIMITIVES )
>
> and commenting setNearFarRatio but nothing happens.
>
> So, I wonder if I could have access to the objects that are seen by the 
> camera (node visitor or something else), compute their importance in the 
> scene and use setNearFarRatio to avoid this problem of Z fighting.
> Typically this would be done in the camera callback (when changing camera).
>
> May be there is a better solution ?
>
> Thank you
>
> ------------------
> Read this topic online here:
> http://forum.openscenegraph.org/viewtopic.php?p=18423#18423
>
>
>
>
>
> _______________________________________________
> 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

Reply via email to