The Linux Stereo Graphics HOWTO -- CURRENTLY VERY INCOMPLETE by Joe Krahn v0.0, 09 May 2001 This document describes how to get 3D stereo graphics visualization working in Linux. ______________________________________________________________________ Table of Contents 1. Introduction 2. Stereo Display Methods (Note: nomenclature may be incorrect) 2.1 Alternating Frames (LCD glasses) 2.1.1 Hardware Page Flipping 2.1.2 Software Page Flipping 2.1.3 Above/Below 2.1.4 Interlaced 2.2 Differential Sight Paths (seperate display panels) 2.2.1 Manual Eyeball Strain (how to degrade your eyesight) 2.2.2 Mirrors or Lenses 2.2.3 Other 2.2 Positional Screening (Autostereo) 2.3 Colored Filters (Anaglyph) 3. Controllers for LCD Shutterglasses 3.1 NuVision 60GX 3.2 EyeFX 3D (by Tetratel, sold under many names) 4. Configuring XFree86 video modes 5. How to Get Stereo Support in OpenGL 5.1 OpenGL Quad-Buffer support 5.2 Specific programs 5.2.1 XtalView 5.2.2 Swiss-PDB-Viewer 5.2.3 WHATIF ______________________________________________________________________ 1. Introduction This file is very incomplete... The most comprehensive Stereo 3D information is located at http://www.stereo3d.org. However, it is more oriented to MS-Windows users, and some of the information is too detailed for the average user. I will later add links to some of the more relevant informaton there. 2. Stereo Display Methods (Note: nomenclature may be incorrect) 2.1 Alternating Frames (LCD glasses) 2.1.1 Hardware Page Flipping 2.1.2 Software Page Flipping 2.1.3 Above/Below 2.1.4 Interlaced 2.2 Differential Sight Paths (seperate display panels) 2.2.1 Manual Eyeball Strain (how to degrade your eyesight) 2.2.2 Mirrors or Lenses 2.2.3 Other 2.2 Positional Screening (Autostereo) 2.3 Colored Filters (Anaglyph) 3. Controllers for LCD Shutterglasses 3.1 NuVision 60GX-NSR The NuVision 60GX-NSR is designed for adding stereo to Non-Stereo-Ready video hardware. It supports page flipping and above/below stereo methods, and interlaced stereo for cards which support interlaced modes (ATI does, newer nVidia do not). It is unable to detect left/right frames with page-flipping, but has a switch to reverse frames. To use above/below stereo, you will first have to set up a video mode with a vertical refresh rate that is less than 70Hz, and is less than half of your monitors vertical refresh limit. Typically, this means 60Hz. 1) Find your XF86Config file, and make a backup copy in case you make a mistake editing. Normally, this file is located at /etc/X11/XF86Config, or /etc/X11/XF86Config-4 for RedHat with XFree86-4.x 2) Open your XF86Config file (as root) in an editor. 3) Find the Monitor section. Example: Section "Monitor" Identifier "DELL D1626HT" VendorName "Unknown" ModelName "Unknown" HorizSync 30 - 107 VertRefresh 50 - 160 Option "dpms" EndSection 4) Check the VertRefresh entry. The upper limit should be at the very least 120. If not, you need a better monitor. 5) Before the EndSection line, add the folloing ModeLine: # 1024x768 @ 60Hz (VESA) hsync: 48.4kHz ModeLine "1024x768_60" 65.0 1024 1048 1184 1344 768 771 777 806 -hsync -vsync If your are using XFree-3.x, there will be other ModeLine entries there. For XFree86-4.x, mode definitions are built-in, but it always picks the 6) Find the Screen section. Example: Section "Screen" Identifier "Screen0" Device "My Video Card" Monitor "DELL D1626HT" DefaultDepth 24 Subsection "Display" Depth 24 Modes "1024x768" "1024x768_60" EndSubSection EndSection 7) In the Modes entry, enter the two modes "1024x768" and "1024x768_60" as shown in the above example. You can use other resolutions if enter the corresponding 60Hz ModeLine, but the two should match, and not all resolutions have a 60Hz mode. There may be more than one Modes entry, but only one is used, according to your default screen depth. 8) Start or restart your X server. Simply logging out of X is sufficient. *** It is best to test changes to X-Windows from a text console using the commans "startx", from run level 3 ("init 3" as root). Errors that cause X to crash in run level 5 will result in the system continuously trying to restart X, making the console unuseable. If you are unable to telnet/ssh in from a near by system, it can be hard to recover from this, especially when level 5 is the default run level. 9) If everything worked OK, you should be able to switch between the two modes by pressing [Ctrl]-[Alt]-[Keypad +] or [Ctrl]-[Alt]-[Keypad -] In 60Hz mode, turn on the 60GX-NSR, and press the MODE button in. If the light labeled "Over/Under" blinks, your refresh rate is too high; try switching modes with Ctrl-Alt-KP+. Note that the 60GX disables over/under if the refresh is too high. You can use this feature to passively activate stereo bye simply switching video modes with the keyboard shortcut (if you don't mind the blinking LED). 3.2 EyeFX 3D (by Tetratel, sold under many names) This device is cheap (about US $50), and has been adopted as the standard stereo device for Microsoft's X-Box, and by the adult streaming video industry. It will probably become the most used 3D device for the near future. It works quite well for a single user, with one big exception: It is designed to fit a fairly small or flat (Asian?) nose. If you have a big nose like myself (German) it does not fit very well. I ended up removing the rubber pads and grinding off a significant amount of the plastic frame with a Dremel tool. Maybe they will come out with big-nosed versions. 4. XFree86 video modes Here is a list of standard video modes with vertical refresh rates under 70Hz, and the standard 1024x768 interlaced mode. # 1024x768i @ 43Hz (industry standard) hsync: 35.5kHz ModeLine "1024x768" 44.9 1024 1032 1208 1264 768 768 776 817 +hsync +vsync Interlace # 640x480 @ 60Hz (Industry standard) hsync: 31.5kHz ModeLine "640x480" 25.2 640 656 752 800 480 490 492 525 -hsync -vsync # 800x600 @ 60Hz (VESA) hsync: 37.9kHz ModeLine "800x600" 40.0 800 840 968 1056 600 601 605 628 +hsync +vsync # 1024x768 @ 60Hz (VESA) hsync: 48.4kHz ModeLine "1024x768" 65.0 1024 1048 1184 1344 768 771 777 806 -hsync -vsync # 1280x960 @ 60Hz (VESA) hsync: 60.0kHz ModeLine "1280x960" 108.0 1280 1376 1488 1800 960 961 964 1000 +hsync +vsync # 1280x1024 @ 60Hz (VESA) hsync: 64.0kHz ModeLine "1280x1024" 108.0 1280 1328 1440 1688 1024 1025 1028 1066 +hsync +vsync # 1400x1050 @ 60Hz (VESA GFT) hsync: 65.5kHz ModeLine "1400x1050" 122.0 1400 1488 1640 1880 1050 1052 1064 1082 +hsync +vsync # 1600x1200 @ 60Hz (VESA) hsync: 75.0kHz ModeLine "1600x1200" 162.0 1600 1664 1856 2160 1200 1201 1204 1250 +hsync +vsync # 1600x1200 @ 65Hz (VESA) hsync: 81.3kHz ModeLine "1600x1200" 175.5 1600 1664 1856 2160 1200 1201 1204 1250 +hsync +vsync # 1792x1344 @ 60Hz (VESA) hsync: 83.6kHz ModeLine "1792x1344" 204.8 1792 1920 2120 2448 1344 1345 1348 1394 -hsync +vsync # 1856x1392 @ 60Hz (VESA) hsync: 86.3kHz ModeLine "1856x1392" 218.3 1856 1952 2176 2528 1392 1393 1396 1439 -hsync +vsync # 1920x1440 @ 60Hz (VESA) hsync: 90.0kHz ModeLine "1920x1440" 234.0 1920 2048 2256 2600 1440 1441 1444 1500 -hsync +vsync 5. How to Get Stereo Support in OpenGL 5.2.1 XtalView XtalView supports above/below stereo internally. Read the authors page at: http://www.scripps.edu/pub/dem-web/stereo.html To view in stereo, open the "View" panel from the main control panel. Next to "Split Stereo:" press the button labeled "Hardware". If you don't have this button, you need to obtain a stereo version of xfit. (See the authors page mentioned above.) The "Hardware Stereo" entry in the main Canvas menu does not work. It is only for true OpenGL-supported stereo. Switch the display to Over/Under stereo without your LCD glasses on. It works best with a full screen (maximized) canvas window, or at least full height. Use the following keys to adjust the double image until it looks undistorted, and vertically aligned: 9 Decrease stereo blank interval (use with 0 to adjust stereo height alignment) 0 Increase stereo blank interval ( Decrease stereo y stretching (use with ')' to adjust stereo aspect ratio) ) Increase stereo y stretching When you exit xfit, the values are saved as setenv commands in the file "xfit_stereo_parameters.dat" in the current directory. Add these to your ~/.login or other startup script for future use. ________________________________________________________________