OK, great, I figured this had been dealt with. That's a nice, full example, thanks. I'll get my head around it.

I was a bit worried about this approach and the complexity of 'doubling' my graph, but it seems that all I have to do is double the one Geode - which is a leaf, so has no children I have to deal with, and then do some minor offsets, or supply a different texture in the update.

And, as I read it, cullmasks are arbitrary masks that I can set up, then assign to different nodes and cameras for this exact purpose. So I can set up:

Mono    0x00000001
Left            0x00000002
Right   0x00000004
Assign those to cameras,

And then make the left node mask 0x00000003 and the right 0x00000004. And I should be able to get the node's cullmask and decide what to do in an update callback - ideally the same callback for each geode.

I don't suppose you've a handy example for image streams as well, do you?

And yes, I saw you did Present3D. It sounds fantastic, but there's no editor is there? That, and the 3D, makes it hard to see examples. If there was, I would try to support that format in my app, and then recommend the editor for clients. Thank you for putting that in the core.

Oh, I see in the wiki, Present3D has stereo movie support. Very cool - I'll dig through there too - Have to update from OSG 2.8 anyway.

Bruce


On Feb 12, 2010, at 12:57 AM, Robert Osfield wrote:

I've done lots of 3D video work with the OpenSceneGraph/Present3D over
the years.  There is even an example osgstereoimage that shows how to
do it using two subgraph each with their own NodeMask which is matched
to the left eye/right eye cull masks.

Robert.

On Fri, Feb 12, 2010 at 1:08 AM, Bruce Wheaton <[email protected]> wrote:
I'm about to drop OSG into an app and I'm looking at how to do various things. The built-in stereo support is great, but I'm not sure how to do
something that's easy in my current code - handle pre-split images.

I have to take a variety of images, mainly in streams, and handle them
correctly in the left and right eye. The formats I deal with are:

1. Dual-stream, for instance two images, or two tracks in a Quicktime movie
or AVI file (3D Blu-ray too, someday),
2. Left-Right,
3. Top-Bottom,
4. Possibly, interleaved.

Right now I've dealt mostly with 2 & 3, by padding two sets of tex coords along with 3D images. I intend to deal with 1 and 4 by splitting textures,
maybe using 2 FBO attachments.

The issues/options seem to be:

Draw the images billboarded and at screen depth, so there's no extra
parallax introduced.

It would be great to be able to mask or draw a frame 'in-front' of the image, even though it's at zero, so the edges appear to be at the same depth
as the content (or can be manipulated).

Then I can either use a cull callback, since I believe cull runs once per eye, and reset tex-coords and/or which texture (or attachment of an FBO) to
use,
or place a duplicate item of each 3D texture in the graph, set it correctly
on update, then set the stereo cullsettings correctly.

Any suggestions? Did I miss a better technique?

Regards,

Bruce Wheaton


_______________________________________________
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

_______________________________________________
osg-users mailing list
[email protected]
http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org

Reply via email to