You figured out what I meant well enough. :) Setting the renderbin order
appears to be a valid solution to my problem.
Thanks!
Jason
Paul Martz wrote:
It's not clear to me what you are trying to do, what is already working, and
what you need help with, BUT... It sounds like you've got some geometry that
you're rendering possibly multiple times (because it has multiple parents),
and you want to enforce a render order on the parents of that node. In that
case, StateSet::setRenderBinDetails() is what you want. The bin number will
specify relative ordering of sibling nodes.
I don't know whether this is the _best_ OSG solution or not, because I
really have no idea what you're trying to do with this technique. So that's
up to you. :-)
(You talk a lot about shaders and projective texturing in your post, so if
that's really what you need help with rather than render order, then I
apologize.)
-Paul
-----Original Message-----
From: [EMAIL PROTECTED]
[mailto:[EMAIL PROTECTED] On Behalf
Of Jason Ziglar
Sent: Wednesday, June 04, 2008 8:11 AM
To: OpenSceneGraph Users
Subject: [osg-users] Node traversal order -or- how to handle
multipleprojective textures?
I'm trying to have multiple projective texture shaders
running within a scene graph. The projective texturing is
projecting images captured from a set of cameras onto a
single world model, with some overlap between cameras.
The current configuration is shown in the attached image.
Each projector is a node which has uniforms representing a
camera's projected image (camera transform, image, etc.)
There's a projective group which is the child of each
projector, and groups together the different drawables which
should be colored by the projective texturing. The ideal
outcome is to have everything in the projective group
textured by a a single projector consistently. That is to
say, if an object is overlapped by two projectors, one always
has precedence over the other (the heuristic for setting the
order isn't important at the moment.)
Is there any way to do this? I've tried having the fragment
shader which performs the texturing test if a pixel has been
colored, but that doesn't seem to help. From what I can tell,
the node traversal order changes from one frame to the next,
resulting in a very annoying flicker. Any ideas?
Thanks in advance,
_______________________________________________
osg-users mailing list
[email protected]
http://lists.openscenegraph.org/listinfo.cgi/osg-users-opensce
negraph.org
_______________________________________________
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