Active stereo 3D

t's icon

I am new to the world of 3D, also I am not an openGL programmer, so I have some basic questions regarding the options in Jitter for active stereo 3D with shutter glasses.

1. Is it possible to do active stereo with Jitter? If yes I assume that means that Jitter supports quad-buffered stereo?
2. Some old posts suggest that it is possible, but can't find anything that would confirm that or how to do it? Are there any links/hints that could help?

Many thanks for any information!

t's icon

3. What about passive polarized 3D? Its seems that Cosm externals support it. Do these externals still work in Max 7 or 8? Has anyone tried it?

I just need some information before ordering any hardware...

t's icon

After receiving some information via other channels I would like to basically ask two things:

1. How to make active stereo with Jitter - what objects or externals do I need and what hardware do I need (in case there is some specific hardware that is compatible with Jitter).
2. And the same question goes for polarized 3D.

Thanks!

Rob Ramirez's icon

As far as I know, you simply enable @stereo 1 on your jit.window, and then simply control rendering via the jit.gl.render "draw_buffer" attribute, probably setting your gl.camera frustum as appropriate.

I've pinged a colleague to see if they can supply more info, but hopefully someone with some experience in this area can chime in as well.

t's icon

Hey Rob, thanks for your reply!

Is your solution for active or passive stereo? Could you maybe explain a bit more about "control rendering via the jit.gl.render "draw_buffer" attribute, probably setting your gl.camera frustum as appropriate." Would I need to switch between the two frustum settings for each frame? Would I need to change draw_buffer for each frame? Which attribute to use ? Back? Front? etc. I really know only the very basics about stereoscopy so I would really appreciate if you could give me a bit more detailed information.

Also I assume I would I would need Nvidia Quadro for quad-buffered stereo which would be ideal (if going for Nvidia solution). Is Nvidia Quadro compatible with Max for active stereo stuff? Maybe that's a stupid question but ... maybe not:)

Thanks!

t's icon

Some more information:

- The active system I can get access to uses Windows 7 and Nvidia Quadro P6000 for the wall projection and Nvidia Quadro M6000 for the floor projection. Both machines use Nvidia Mosaic to have one virtual desktop each. They are also synced. Should that work with Jitter for active stereo? Would be great to have this information as I need to fly to the place with this equipment and it would be a bit of bummer if I can't get it to work at the end.

- The passive system I would like to build for myself, so any hints are very welcome.

Graham Wakefield's icon

I'm responding to Tadej off-list for some of the specific details, but I think it is good to share some of the things here for the community.

How to send passive stereo to the monitor depends on what the display can handle, but side-by-side is the most common. You render the scene twice, each going to the left or right half of the window. You can do this with two jit.gl.camera’s with different @viewport settings, both rendering the same jit.gl.node scene. The stereo eye separation is done by using an off-axis frustum and eye position, also properties of the jit.gl.cameras. Below is an example of setting up this kind of passive stereo (side-by-side) rendering in Jitter, including support for configuring different aspect ratio, field of view, off-axis views, etc, as well as independent navigation and fixed resolution processing. Hope this is helpful to more people:

Max Patch
Copy patch and select New From Clipboard in Max.

I can try sharing an active stereo example too, I just don't have access to an active system to test on at the moment. Active stereo capability is built into Jitter since Max 5 I think. There is a @stereo 1 flag you would need to add to both the jit.window and the jit.gl.render, to enable active stereo. It will splurge errors to the console if active stereo is not supported by your hardware. The principle for setting up the camera is pretty much the same, except that instead of rendering the scene twice into a single drawbuffer, you alternate left & right eye drawing. So active doesn’t need the two cameras, instead you can use the same camera but just change the projection frustum & eye position according to whether you are currently rendering to the left or right eye buffer. To actually render to different left / right eyes, you need to send messages to the jit.gl.render (and elsewhere) in this sequence:

(update simulation)
draw_buffer back_left
(configure the left-eye camera)
erase
(draw scene to left eye)
drawswap
draw_buffer back_right
(configure the right-eye camera)
erase
(draw scene to right eye)
drawswap
bang

Basically this is going to be driven by a big [trigger] object…

t's icon

Hi there,

I am trying to implement this algorithm from Graham but I am not sure about the instructions. Hence I've put some comments/questions next to his instructions and if someone more knowledgeable could have a look that would be great...

(update simulation) - bang to the simulation/animation
draw_buffer back_left - message to jit.gl.render
(configure the left-eye camera) - message to jit.gl.camera with frustum parameters and position parameters - not sure if that is what you mean by "projection frustum & eye position". Is projection frustum a frustum when camera is in projection mode or I do not need projection mode? Is eye position camera position?
erase - message to jit.gl.render
(draw scene to left eye) - is this a bang to jit.gl.render?
drawswap - message to jit.gl.render
draw_buffer back_right - message to jit.gl.render
(configure the right-eye camera) - message to jit.gl.camera with frustum parameters and position parameters 
erase - message to jit.gl.render
(draw scene to right eye) - is this a bang to jit.gl.render?
drawswap - message to jit.gl.render
bang - I think I know this one, bang to jit.gl.render:)

...thank you!

t's icon

Hey guys,

here is an example of an active stereo patch. I modified Graham's passive example and followed his instructions. This method of active stereo was tested on Quadro P6000 and Quadro M6000 graphics cards and worked like charm! Both machines were Windows 7.

Hope someone will find this patch useful...

Max Patch
Copy patch and select New From Clipboard in Max.