|Version 4 (modified by martin, 6 years ago)|
- Developer Blog
- Mailing Lists
- Getting Started
- Platform Specifics
- User Guides
- Programming Guides
- Reference Guides
- Tips And Tricks
- Knowledge Base
- Trac Usage Examples
- TracGuide Documentation
- Software Patents
- Software Patents Europe
Follows are details of how to get stereo working under Linux using NVidia's drivers. Support for stereo on others vendors will need to be added by users with experience under these other graphics subsystems.
The !NVidia graphics cards that support TwinView (two outputs from one graphics card) can be used to drive a passive stereo setup or head-mounted displays where each projector or eye is driven by a seperate graphics card output. For active stereo systems where both eyes views are fed through a single graphics card then you'll need to use quad buffer stereo and graphics card that supports this visual and also the shutter glasses sync output from the graphics card, as far as the author is aware this is only available on the professional Quadro graphics cards line. However, the passive stereo/TwinView approach is viable on the consumer graphics cards as well. Follows is a guide to how to set this up.
Setting your XF86Config file to driver TwinView mode for passive stereo
Read through NVidia's Linux driver instructions, in particular pay attention to the section on TwinView, and Xinerama extensions. As a reference you can use the authors XF86Config used on a Shuttle XPC + Geforce 6800GT + Suse 9.1. One of the key parts of the XF86Config file is the "Device" section, in particular the Options:
Section "Device" Identifier "TwinView" BoardName "0x0322" BusID "2:0:0" Driver "nvidia" VendorName "NVidia" Option "TwinView" Option "SecondMonitorHorizSync" "15-100" Option "SecondMonitorVertRefresh" "50-120" Option "TwinViewOrientation" "LeftOf" Option "MetaModes" "1024x768,1024x768" Option "NoTwinViewXineramaInfo" "true" EndSection
When creating your own XF86Config file it is important to make a copy of the orignal XF86Config so that if you make a mistake you can boot into fail-safe mode and reapply it. Its also important to get the correct Horizontal and Vertical frequencies for your second output as getting this wrong can damage your hardware.
Runing OpenSceneGraph application
To run OpenSceneGraph applications can you either use environmental variables to run them automatically in stereo or to use command line paramters as per StereoSettings guide. The author recomends running using command line paramters first:
osgviewer --stereo HORIZONTAL_SPLIT cow.osg
Then move on to setting up the environmental variables, once these are set all OSG applications should come up in stereo, the following settings are for horizontal split stereo using twin view, with a the projection surface 3m away from the average viewing position, a 2m by 1.5m projector screen:
export OSG_STEREO_MODE=HORIZONTAL_SPLIT export OSG_SCREEN_DISTANCE=3.0 export OSG_SCREEN_WIDTH=2.0 export OSG_SCREEN_HEIGHT=1.5 export OSG_STEREO=ON
Once you are happy with the settings save them to a script file or even your .bashrc if you are feeling particular commited to running in stereo all the time.