I'm working on an application that's based on the osgstereoimage example, what I'm having trouble with is saving out the scene to an image using writeImageFile. The image is created fine using readPixels inside a custom DrawCallback attached to the cameras FinalDrawCallback, however only one image of the stereo pair is "captured", the stereo effect is not written out to the image. I'm guessing this is because the stereo effect takes place after the cameras FinalDrawCallback, does anyone have any idea how you would go about capturing the stereo effect into a image file.
...
Thank you!
Cheers,
Nathan
------------------
Read this topic online here:
http://forum.openscenegraph.org/viewtopic.php?p=23318#23318
_______________________________________________
osg-users mailing list
osg-...@lists.openscenegraph.org
http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org
...
Thank you!
Cheers,
Nathan
------------------
Read this topic online here:
http://forum.openscenegraph.org/viewtopic.php?p=23354#23354
I don't have a clue why it doesn't work, but then there is too my
unknowns about what exactly you are doing to have a guess.
What type of stereo are you using? Have you been able to recreate the
problem with the standard OSG viewer?
I've just tried osgviewer cow.osg --stereo, and then pressed 'c' to
capture a screen shot and the resulting image looks correct - the
anaglyphic stereo is all in place as one would expect.
Robert.
Thanks for your time I appreciate the help, I'm using Quad Buffered stereo.
I have used the osgViewer program, and i am able to produce a stereo screenshot when in anaglyphic mode, but not when using quad buffer - i simply get a flat image of one of the eye views.
Is there something specific that quad buffered stereo uses in hardware that is applied at the hardware stage of the pipeline that cannot be seen by the view?
I'm willing to try anything you suggest!
...
Thank you!
Cheers,
Nathan
------------------
Read this topic online here:
http://forum.openscenegraph.org/viewtopic.php?p=23377#23377
Quad buffer stereo uses two back buffers and two front buffers, one
pair for each eye. You screenshot capture code is probably just
capturing one of these buffers so will just be the left or right eye
image.
As to what you actually want in the case of quad buffer stereo screen
capture I can't say. What are you expecting? Two side by side
images? Two images? How do you plan to view them afterwards?
Robert.
Nathan
------------------
Read this topic online here:
http://forum.openscenegraph.org/viewtopic.php?p=23393#23393
On Fri, Jan 29, 2010 at 8:28 AM, Nathan Schofield
<John.Smit...@googlemail.com> wrote:
> The idea was that I would screen capture the stereo image on screen to produce a single image with the stereo effect in it, you would then be able to view this image on its own (with the appropriate monitor and glasses) without the need for the two separate images and a piece of software.
?? I don't know where to start... quad buffer stereo requires
software to drive it, end of story, you simply can't output a "quad
buffer stereo image" and magically get it to work.
> How would one go about taking the contents of both the BACK_LEFT and BACK_RIGHT buffers to produce a single image.
> Once again thanks for the help
You need to go read an OpenGL book, and think about strereo and how
you want to rendering it.
Robert.
As for capturing the image I tried setting glReadBuffer to GL_BACK_LEFT then capturing one image, changing glReadBuffer to GL_BACK_RIGHT capturing the second image, and using copySubImage to combine the two. However the second image from GL_BACK_RIGHT is always black.
Cheers,
Nathan
------------------
Read this topic online here:
http://forum.openscenegraph.org/viewtopic.php?p=23403#23403
Cheers,
Nathan
------------------
Read this topic online here:
http://forum.openscenegraph.org/viewtopic.php?p=23464#23464
If it's just the old style CRT interlaced format, as in left eye sees
even lines and right eye sees odd lines, then you would only need a
static image. If that's the case, capture left and right images, then
use a program to take even lines from one and odd from the other. The
gimp has a program to blank every other line, if you do that do you
get black on one eye and the image in the other?
If it's the entire frame buffer being displayed to the left eye in
one frame, and the next goes to the right, you have to have a program
capable of switching out left and right images with the quad buffering
anyway, so why don't you just draw it real time with your program in
the first place? The other option is to capture left and right images
to disk, then have an option in your program to load them back off
disk and display them again.
--
David Fries <da...@fries.net>
http://fries.net/~david/ (PGP encryption key available)
I am using a JVC 3D monitor model :- http://pro.jvc.com/prof/attributes/features.jsp?model_id=MDL101867
I am rendering it out in realtime, the idea was to "convert 2d images to 3d", so after conversion you wouldn't need the software again to view the image just the hardware and glasses. I have managed to get hold of each of the BACK_LEFT and BACK_RIGHT buffer contents by sampling them over two frames, I would like the conversion to take place within the osg application, am just not sure how to go about combining the images to produce the the same stereo effect. I will take what you said and see if I can get any further.
Cheers,
Nathan
------------------
Read this topic online here:
http://forum.openscenegraph.org/viewtopic.php?p=23522#23522
Nathan Schofield wrote:
> Hi David
>
> I am using a JVC 3D monitor model :- http://pro.jvc.com/prof/attributes/features.jsp?model_id=MDL101867
>
> I am rendering it out in realtime, the idea was to "convert 2d images to 3d", so after conversion you wouldn't need the software again to view the image just the hardware and glasses. I have managed to get hold of each of the BACK_LEFT and BACK_RIGHT buffer contents by sampling them over two frames, I would like the conversion to take place within the osg application, am just not sure how to go about combining the images to produce the the same stereo effect. I will take what you said and see if I can get any further.
>
you can make a simple fragment shader with two images as input that
makes a single image as output.
jp
> Cheers,
> Nathan
>
> ------------------
> Read this topic online here:
> http://forum.openscenegraph.org/viewtopic.php?p=23522#23522
>
>
>
>
>
> _______________________________________________
> osg-users mailing list
> osg-...@lists.openscenegraph.org
> http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org
--
This message is subject to the CSIR's copyright terms and conditions, e-mail legal notice, and implemented Open Document Format (ODF) standard.
The full disclaimer details can be found at http://www.csir.co.za/disclaimer.html.
This message has been scanned for viruses and dangerous content by MailScanner,
and is believed to be clean. MailScanner thanks Transtec Computers for their support.