Game Development Community

Stereoscopic Output

by David "kyuketsuki" Clifton · in General Discussion · 12/28/2005 (12:36 pm) · 1 replies

I am almost sure I am going to buy the engine, but because of what I am going to make is in stereo I need to know if something is possible, if there is existing code or if someone would be willing to code this option for me. I would like to place two cameras in the engine for stereo seperation and have the output sent to each of two monitors. I am using a dual projector polarized rig, one monitor to one projector and the other to the second. So basically I need one camera to go to my left monitor and one to the right at the same time during gameplay. I know this will slow down the engine, but the entire project depends on this feature. If this is possible, I will be a very happy user.


Thanks in advance.

About the author

Recent Threads


#1
12/30/2005 (10:15 am)
The NVIDIA stereo drivers can generate stereo auto-magically when running fullscreen. They'll do this for basically any game. It even appears they have a mode that splits across multiple monitors, but I'm unsure of this as I don't have that configuration. This is under windoze and doesn't require a quadro card, i.e. I can do it with my old GeFORCE 2, 3 and 5900 Ultra FX. I believe ATI also has some stereo support available, but I've never had an ATI card, so I can't comment on them.

If you have quadros, the linux drivers also support stereo, although I'm not sure its as auto-magic as the windoze drivers are. I've hacked together a few of my own stereo apps under linux using a TV connected to my S-Video port as the output device. They work pretty well and weren't too tough to hack together.

I haven't done this yet in torque, although I've thought about it as I play a lot with stereo under linux and windoze. The way I see it, you have 3 problems to solve to make this work:
1) You need to be able to render to two separate displays, most likely on separate video cards.
2) You need to generate two images from separate cameras.
3) (Optional) You need to change the camera that uses parallel axis asymmetric frustum perspective projection.

The first is solveable, although it'll likely be at least OS dependent. It wouldn't be bad to do this under linux, I assume it can be done under windoze (sorry, not much of a windoze programmer).

I'm pretty sure the second is more or less solved for you in some of the resources about using multiple cameras in game, although most uses for these are for security cameras and such.

The third is optional, but a definite plus to your final result. This isn't hard to do under OpenGL, but I'm unsure how it might happen in other rendering environments. I'm not familar enough with TGE's camera code to know how easy it might be to modify the camera to do this. For a description and some code about this you can look at astronomy.swin.edu.au/~pbourke/opengl/stereogl/.

If you can get by with using one video card and display, I'd certainly encourage you to take a look at simply using the NVIDIA, or perhaps other, stereo driver. Its free, already done and works pretty well.

You should know there are a few issues with the way torque does a few things in game that cause unpleasant things. The most notable of these are the text names put on players and other objects in the game. These aren't rendered as true 3D object, thus they have an X and Y value when looking at the screen, but no Z value (in and out of the screen). I think other parts of the UI also suffer from this problem. Not being rendered as 3D objects causes these to provide confusing or incorrect information to the stereo drivers which can confuse the viewers eyes, making the stereo effect much less that it could be. This is fixable, but would be extra work you might not be expecting to do.

Also, while torque does have the issues above, and possibly more, when used by default to generate stereo output, other game engines likely have some of the same issues. Very few game engines were designed with stereo output as a consideration. If one game engine works better than another, its likely that they just got lucky. At least with Torque, you have the source code at a reasonable price and can fix most of these issues with a small amount of effort if they are important to you.