Eric Pouliquen wrote:
> I've read a lot on this forum about rendering geometry on top of a scene (HUD 
> style), but I would like some details on how to render geometry "in the 
> background".
> I'm writing a small nodekit which is a "Far Object" and I have some problems 
> with zbuffer and Near/Far planes calculations to avoid precisions problems...
> * If I'm right, I only need to use the setRenderBinDetails to a very negative 
> value to be sure the node is rendered first of all.
> * I don't see how to deal with Zbuffer problem now... Obviously, I want to 
> see my far nodes in the scene, but I want to avoid Z precision issues when 
> rendering medium sized geometry near of the camera, so how do I manage this ? 
> I think I need to keep the automatic Near/Far calculation if I want to see 
> the nodes, but after rendering them, I need to clear the Zbuffer, what is the 
> good method to achieve this ? using a ClearNode ? 
> As my far node is designed to be a nodekit, I maybe need to avoid the use of 
> a local camera as I see in discussions, because it could be introduce 
> performances pb with many far nodes isn't it ?

  My solution was to introduce a custom drawable in a renderbin ordered between 
the "far
node" and the rest of the scene. This custom drawable simply clears the GL Z 
buffer. This
makes sure all "real scene" geometry appears atop the "far node" geometry.

  This works well as long as the "far node" stuff doesn't need to be 
geometrically very
far away (for parallax reason -- like if it was a moon or something) that it 
screws up the
automatic near/far plane computation.

> thanks a lot,
> Eric

-- 
Chris 'Xenon' Hanson, omo sanza lettere                  Xenon AlphaPixel.com
PixelSense Landsat processing now available! http://www.alphapixel.com/demos/
"There is no Truth. There is only Perception. To Perceive is to Exist." - Xen
_______________________________________________
osg-users mailing list
[email protected]
http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org

Reply via email to