I Robert -- No, I don't think stencil applies here. Chris might not have
described the rendering task precisely. What he is trying to do is a sort of
smart depth partition, in which he knows that part of his scene graph is
always the background, and another part of always the foreground. So if he
can just clear depth after rendering the background, he has all that he
needs.

Now that I see how similar this is to depth partitioning, I wonder if slave
cameras are the way to go? They will both have the same view (but probably
different near/far planes).

Paul Martz
Skew Matrix Software LLC
http://www.skew-matrix.com
+1 303 859 9466

-----Original Message-----
From: osg-users-boun...@lists.openscenegraph.org
[mailto:osg-users-boun...@lists.openscenegraph.org] On Behalf Of Robert
Osfield
Sent: Thursday, May 14, 2009 2:38 AM
To: OpenSceneGraph Users
Subject: Re: [osg-users] Multiple ClearNodes in a scene,or 2D layering of 3D
geometry

Hi Chris,

On Thu, May 14, 2009 at 1:01 AM, Chris 'Xenon' Hanson <xe...@alphapixel.com>
wrote:
> The Goal: Render both of them, but with object A _always_ obscured by 
> object B, regardless of what their Z values (which are mostly
> coincident) would normally dictate.

This type of task is exactly what the stencil buffer is good for.  The OSG
supports stencil buffer natively.  See the osgreflect example.

Robert.
_______________________________________________
osg-users mailing list
osg-users@lists.openscenegraph.org
http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org

_______________________________________________
osg-users mailing list
osg-users@lists.openscenegraph.org
http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org

Reply via email to