Ian Munro

We have a stereoscopic projection system at work which uses two projectors with polarized filters and relies on twin video streams with slightly different camera positions.

Has anyone any ideas if / how I can open two windows in XNA with different camera positions on the same scene Or generate two separate camera views in parallel in one window
Any suggestions gratefully received!



Re: XNA Framework Stereoscopic vision and XNA

Ian Munro

Sorry, I forgot to add, the target hardware is a PC with twin displays rather than an xbox.



Re: XNA Framework Stereoscopic vision and XNA

dczraptor

You can render the same scene into different viewports for the same xna program. For example, this will render as two rectangles side by side left/right. Just change the view and/or projection matrices in each different viewport. However, I'm not sure if this will work for what you want to do.

Viewport viewport = new Viewport();
viewport.Width = graphics.GraphicsDevice.DisplayMode.Width / 2;
viewport.Height = graphics.GraphicsDevice.DisplayMode.Height;
viewport.X = graphics.GraphicsDevice.DisplayMode.Width / 2;
viewport.Y = 0;

// set the viewport
graphics.GraphicsDevice.Viewport = viewport;

// render here

// switch to another viewport if necessary and render again






Re: XNA Framework Stereoscopic vision and XNA

waruwaru

All else fails, you can run 2 programs at the same time. Syncing at high speed would be tough though... :)




Re: XNA Framework Stereoscopic vision and XNA

Ian Munro

Your suggestion of twin viewports worked great.

The only problem is that the display rate really slows down when I span the monitors.I'm assuming that this is due to the software having to swap between graphics devices, so it looks like I'll have to open a window for each device, or get a faster graphics card :)