Hi Vincent,

My goal is to set this state in a callback, to allow changes when camera is near the plane : the culling is good without cheating... when camera is far from it, the culling/zbuffer makes stranges things, so I would make the necessary things to set the plane always visible...

Setting the node to always render without the z-buffer is not a fix, it's a workaround. It will introduce other problems when something else (a cloud perhaps) is on top of the airplane.

The result you're seeing is z-fighting, and is a result of poor z-buffer precision (you have too much distance between your near and far planes to have enough precision to represent the distance between two objects, so the z-buffer thinks object A is in front of object B when it's the opposite).

The fix is to fix your z-buffer precision problem. Do you disable automatic near/far calculation? You probably should not, since this would make sure that your near plane is at the top of your airplane, and your far plane is below your ground.

Or perhaps your ground is a very very large sphere where no part of the sphere can be culled away, so the far plane is actually behind the Earth (which is very far away relatively to the distance between the airplane and the ground)...

Look into these problems, and you'll be able to fix the real problem. Hope this helps,

J-S
--
______________________________________________________
Jean-Sebastien Guay    [EMAIL PROTECTED]
                               http://www.cm-labs.com/
                        http://whitestar02.webhop.org/
_______________________________________________
osg-users mailing list
osg-users@lists.openscenegraph.org
http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org

Reply via email to