Interlaced Stereo - How?

Problems building or running the engine, queries about how to use features etc.
RByers
Gnoblar
Posts: 6
Joined: Sat Nov 22, 2008 11:07 pm

Interlaced Stereo - How?

Post by RByers »

Is there a good way to use Ogre with an interlaced stereo rendering? I'm currently using the stencil buffer to set up a 'checkerboard' style interlacing for use with a 3D BRAND NAME. (My hardware does not support GL_STEREO for quad rendering.), and I'd like to start using Ogre for the project.
I understand that even if Ogre doesn't fully support stereo rendering I can avoid running its loop and just call update() manually after setting up the parameters for each eye. The trouble here, then, would be if Ogre makes use of the Stencil Buffer behinds the scenes.
User avatar
Thieum
Gnome
Posts: 342
Joined: Wed Apr 26, 2006 5:13 pm
Location: Bordeaux, France
x 2

Post by Thieum »

Hi!
What are you calling "interlaced stereo" ? is it rendering a frame with one column of pixel from the left eye, one column from the right eye, one column from the left eye, one column from the right eye, etc... ?

edit: something like this ?
Image
Image
RByers
Gnoblar
Posts: 6
Joined: Sat Nov 22, 2008 11:07 pm

Post by RByers »

That is one form of it, yes. The 3D system I am using needs a 'checkerboard' type interlacing rather than a vertical stripe, but if ogre is capable of one it whould be capable of the other. I haven't been able to find a mention of 3d support in the documentation or the wiki.
User avatar
Thieum
Gnome
Posts: 342
Joined: Wed Apr 26, 2006 5:13 pm
Location: Bordeaux, France
x 2

Post by Thieum »

It's because I just began to add a support to interlaced stereo using the compositor to the stereo manager after seeing your post. I will also add the checkerboard interlacing. I can send you a pre-release tomorrow :)

is it better ?
Image
RByers
Gnoblar
Posts: 6
Joined: Sat Nov 22, 2008 11:07 pm

Post by RByers »

You are a wonderful, wonderful person.
User avatar
Thieum
Gnome
Posts: 342
Joined: Wed Apr 26, 2006 5:13 pm
Location: Bordeaux, France
x 2

Post by Thieum »

I know, I know.

:P

Ok, here is the file : [link removed, please instead see this topic]
It compiles with both ogre 1.4.9 / 1.6 and ogre sdk / source (you must have defined OGRE_HOME (if you use the sdk) or OGRE_SRC (if you use the source release) with the path of ogre)

The easiest way to use it is to use the plugin. by default it uses anaglyph, but you can change this in stereo.cfg (will be created on first launch)
Please tell me if the stereo seems inverted. you can change this in the config file, but i may have inverted the views in the shader

The interlaced mode has limitations : once initialised, you can't change the resolution or resize the window. If you do so, the interlacing pattern will be scaled and ugly. I will fix this later, don't worry.
Last edited by Thieum on Mon Dec 01, 2008 5:21 pm, edited 2 times in total.
Dom
Halfling
Posts: 57
Joined: Wed Jul 14, 2004 10:12 am
Location: Berlin

Post by Dom »

Thieum, the images are looking good!

I also did once implementations for the SeeReal and the Sharp displays but using a different 3d engine in 2005 or so. Nowadays display creators have their own libs and refer to it when you ask how they encode the image, but I would prefer to encode it myself. SeeReal was vertical interweaving - but I think the checker-style is unknown to me.
Do you guys have found any additional resources/links that lists what display use what kind of masking/encoding?

cheers
Dom
idcsteve
Gnoblar
Posts: 13
Joined: Thu Aug 14, 2008 5:35 pm

Post by idcsteve »

What kind of 3D TV are you using? We're doing 3D and looking for good hardware.

Thieum - you rock. Seriously, I'm using your shader stuff for what we are doing - couldn't have made it work without your help. Once we're ready to publish, I'll show you how we've improved the 3D experience - you'll love it.
User avatar
Thieum
Gnome
Posts: 342
Joined: Wed Apr 26, 2006 5:13 pm
Location: Bordeaux, France
x 2

Post by Thieum »

thank you both :)

at my office, we use two projectors and a polarized screen. I did not have the occasion to test the interlaced mode on an autostereoscopic screen

I have updated the code, please see http://www.ogre3d.org/phpBB2/viewtopic. ... 003#317003 for the new version