Low-cost Stereo Virtual Reality at PMEL
with a lot of help from Chris Moore and Nancy Soriede and initial support from NOAA/ESDIMDevelopment work for Virtual Reality at PMEL is funded by the NOAA/HPCC program
****A QUICK SUMMARY*****
If you are here looking for the quick lowdown on inexpensive ways to immersively view VRML worlds on a PC, here's a short summary:
1) Dowload/install the Cortona VRML client. This will allow you to fly through any vrml worlds you access through Netscape or IE (they typically have the extension *.wrl or *.wrl.gz). Their web site includes instructions on how to put their viewer into "full-screen" mode; if you have a graphics card which supports stereo (see below), this will put you into stereo mode as well
2) Check to see if your PC has a graphics card based on the GeForce or Quadro chipset, manufactured by nVidia. If so, go to the nVidia web site and dowload the latest graphics driver for your system from the "Graphics Driver" menu, and the "Consumer 3D Stereo" utility from their "Games Utilities and Tools" menu. Dowload/install both and reboot your system. In the control panel, go to Display/Settings/Advanced/"Stereo Properties" tab and choose "enabled" and "anaglyph". Check out nVidia's how-to guide for detailed instructions on stereo viewing. One useful tip, buried in those instructions, is to use Cntrl-F5 and -F6 to adjust the convergence of the left/right images (crucial for a realistic immersive experience).
3) If you want to get full-color, shutterglass stereo, one economical choice is to buy a gamer's card from a company like ASUS. Models with "Deluxe" in the name include stereo abilities and shutterglasses, which you plug into the card. They work great with the Cortonal viewer, and the ASUS stereo driver automatically gives you a nice convergence angle, for realistic-looking 3D.
4) For a nice example of a vrml world, which looks great
stereo, click here.
It is always possible to render a three-dimensional surface and print the result on flat page. We have all seen many such illustrations in popular scientific journals. Consider how primitive this technique really is. Billions of years of evolution yielded our ability (along with many other species) to perceive the depth of objects; we can easily tell when object is further away from us, rather than simply smaller. We have this ability because we have two eyes (stereo vision) and brains to combine the information from each. Viewing at a three-dimensional surface printed on flat page is like viewing the world with one eye closed - the depth perception which stereo vision affords us is lost. Viewing a three-dimensional object with two eyes from far away (think of a mountain range viewed from a jet) is only a slight improvement, really not much different from the single-eye view. A much more powerful way to examinine a surface or other three-dimensional object is to view it "up close" with two eyes, from any angle, as if you were holding the object in your hands. With two eyes you clearly see which parts of the object lie in front of or behind other parts, and clearly distinguish up from down, left from right, and forward from backward. You cease to confuse small features as being further away simply because they are smaller.
Now, it is not practical to create a plastic model of every three-dimensional surface one might want to view, and hold it physically. Instead, modern computing hardware and software have made it easy to generate images on your computer monitor which are "virtually" the same thing - that is, virtual reality. It is not "reality" in the sense of what you encounter in your daily life, but rather is what you would encounter in your field of view if you were to create a solid model of the surfaces, vectors, and volumes representing various aspects of the data set you wish to analyze.
The quest for virtual reality is hardly new. 3-D movies have been with us for many years (although their popularity has waxed and waned over time). What is new is a tremendous power and low-cost of modern computing platforms. Graphically speaking, what was inconceivable a decade ago has now become routine. Anyone with a low-cost personal computer can generate complex surfaces representing some aspect of a large (megabytes to gigabytes) data set. For a modest additional investment (as cheap as 99 cents if you already have a PC with a GeForce card), one can acquire the ability to view those surfaces in stereo. In effect, one has the ability to fly through the virtual world with both eyes wide open. It is hard to describe the power of this illusion in words; however, picture yourself as a giant swimming through the ocean, able to view whatever feature you might choose, up close, far away, and from any angle.
Two snapshotsThe basic trick here is to render two snapshots of the scene you wish to view, one for your left eye and one for your right. The differences between the two snapshots depend on how far away the viewed object is, and how widely spaced your eyes are, relative to the size of the object. Once you have the two snapshots, you need to deliver each of them to the proper eye. The old technique for doing this, very popular around the turn of the 19th-century, is to produce an oversized postcard with the left eye's view on the left half in the right eye's view on the right half. A simple mechanical device then focuses each snapshot to the proper eye: the stereograph. With some training (but typically with some eye strain) you can focus the proper image from a stereo pair on the proper eye without any mechanical assistance. Sometimes pairs are rendered with the left eye a view on the right and vice versa; the viewer then crosses her eyes to focus the proper image on the proper eye. Again, this involves some eye strain.
A second technique, popular with the makers of 3-D comics, is to print both the left and right eye's view of a greyscale scene on top of one another, but in different colors. Such pictures are called anaglyphs. Inexpensive (99 cents at your local novelty store) glasses with colored filters then screen out the left eye's picture from the right eye and vice versa. This was the basic approach for old 3D movies and comics from the 50's.
A third technique involves projecting polarized images (different polarization for left versus right eye's view) on a polarization-preserving screen. Passive polarized glasses are then used for stereo viewing. Unlike anaglyphs, this allows full color images. New techniques involving dual, commodity-type DLP projectors (one for each eye's view) have made this approach very affordable; indeed, it has now become an attractive alternative to the shutterglass systems described later. Many such systems are now in use (e.g. the Geowall consortium), and we have installed one in my office (see pictures below).
Install the projectors and Linux host at the rear of the office:
Install a pull-down screen (the polarization-preserving type) in front of the window. Turn off the lights, fire up the projectors, and viola! The office is now a virtual theater..........
Anaglyphs are easy to display on computer monitors, and the results are suprisingly realistic for greyscale worlds. Below are some examples of virtual worlds and stereo anaglyphs we have created from biophysical model ouput. The top figures illustrate positions of fish (represented as spheres) from a spatially explicit 3D individual-based model of walleye pollock in Shelikof Strait, Alaska. Kodiak Island is the prominent feature in the right half of the top figure; our viewpoint looks to the northeast. The bottom figures are from a circulation model of Pribolof Canyon in the Bering Sea. A cheap pair of red/blue sci-fi glasses will cause the spheres and vectors to pop out of the page at you, revealing the true 3D location of the fish, the steep slopes of the bathymetry, and the vertical motions near the submarine canyon. (NOTE: use the red lens over your right eye for these particular figures, but note that most anaglyphs typically use the blue lens over the right eye)
Click each to view a larger version.
Stereo shutter glassesShutter glasses are another powerful device for stereo viewing; still images and animations appear in glorious 3D color on your monitor (as noted above, passive polarized systems offer an inexpensive altenative to shutterglasses in some situations). The shutterglass approach is based on the fact that the computer, like a television set, refreshes the image on the screen many times per second. The computer alternately displays the left eye's view with the right eye's view, while the shutter glasses alternately allow just your left eye to view the screen, then just your right eye, in sync with the images displayed. The synchronization signal is sent to the glasses by wire or through an infrared emitter. If the images are alternated quickly enough (say, 120 times per second), the viewer sees a steady image in stereo.
There are basically just three techniques used with shutter glasses:
Our quest for stereo began with the use of the Cosmo viewer (basically a plug-in to Netcape and Internet Explorer) to fly through Virtual Reality Modeling Language (VRML) worlds. The Cosmo viewer does not support stereo, but does an excellent job of navigating around any 3-D objects you create. Another viewer (my favorite), which does support stereo, is the Cortona VRML client.
For generation of VRML worlds, I have frequently used a script
written for the gridded data analysis package FERRET. Other popular
analysis software, such as Matlab and vis5d+, may also be used to
VRML code. More recently, we have developed a web interface to serve up
worlds on demand. The system is described in this powerpoint
and the server itself may be found here. (NOTE: if
want to view the 3D pictures anaglyphs from the powerpoint presentation
red/blue glasses, put the blue lens over your right eye).
and animations from a model of fish spawning near Kodiak Island, Alaska.
It quickly became apparent that the primary limiting factor in how fast one could fly around virtual world was the power of the graphics card installed on your PC (or Macintosh or Unix or whatever) platform. There are presently several software standards (that is, Application Program Interfaces; APIs) for graphical manipulations. Open Graphics Language (or OpenGL) seems to have emerged as a standard of choice for scientific applications, and many "professional" graphics cards now support it. Other cards (at this writing, the vast majority feeding the huge gamer's market) support an API known as DirectX. In effect, such cards perform high level mathematical manipulations needed for rotating and rendering objects in hardware (that is, on the card directly attached to your monitor), rather than having to calculate everything on your CPU. Visualization software based on one of there APIs, running on a PC with a card that supports it, typically makes for smooth sailing through a virtual world. The Cosmo player is OpenGL based, while the Cortona VRML client supports either OpenGL or DirectX.
I was able to procure a simple plastic lens (~$4) which is useful for viewing small uncrossed stereo pairs held one foot from the eyes. Unfortunately this is only useful for pictures the size of the old stereographs (a few inches accross), and the device needs to be held a few inches away from the monitor for proper focus. Such miserable resolution and cramped viewing make for an unsatisfactory result. At one time there was a company (nu3D) manufacturing special glasses designed to focus each eye on a separate half of the computer monitor at a comfortable distance from the screen; unfortunately they have ceased production and don't appear likely to resume. Another intriguing approach involves rendering a stereo pair after placing a special hood over the computer monitor which focuses each eye on the proper image. A very small outfit does in fact sell this type of device for ~$400, and it has its supporters. The approach requires no special graphics card or monitor, although the hood itself is somewhat bulky.
Given these problems with purely mechanical systems, I began an earnest search for a VRML viewer which would support stereo viewing through the use of shutterglasses. This enthusiasm for shutterglasses was based largely on a positive experience with a high-end virtual reality system, the Immersadesk, which uses Stereographics shutterglasses. In effect, I was seeking experience the high-end experience, but at far lower cost. Further, since I had no interested in writing shutterglass driver or stereo rendering code, the key factor was to locate a developer who had already worked out the relevant hardware and software issues; I wanted simply to feed my VRML code to the viewer, plug in the graphics card and glasses, install the drivers, and go.
After considerable Web surfing and contact with the Stereographics support staff, I was able to locate a company (TGS) developing just such a visualization tool for PCs. Their VRML viewer which supports stereo shutterglasses and a broad array of other stereo formats (frame flipping, interleaved, red/green anaglyphs, etc.), is called3 Space Assistant (3SA). They have a trial download; the full package sells for about $150. A screen shot of this viewer in action is available here. This was the package used to generate the anaglyph examples.
More recently, we found a free solution for stereo VRML viewing, the Cortona VRML client in conjunction with a GeForce or Quadro graphics card. That is, Cortona will prompt your computer to render VRML in stereo, and the nVidia drivers for all GeForce/Quadro cards can render in anaglyph or shutterglass stereo. A good how-to guide for these drivers is available from nVidia.
At this point it is important to note that there are two different "flavors" of stereo, one based on DirectX (full-screen-stereo) and one based on OpenGL (stereo-in-a-window). Most gamer's cards (and stereo-enabled games) support the former but not the latter; some professional graphics cards (and professional CAD programs) support the latter but not the former! In the case of Cortona, you need a card with DirectX support to render in stereo. So far as I know, only the nVidia Quadro line of graphics cards (currently marketed in the US by PNY) is capable of rendering in *both* types of stereo, and you have to manually switch between the two modes..
I will note that you get what you pay for; the more expensive glasses are the most comfortable. Stereographics still offers several PC-friendly, fairly comfortable options. Back in '98, for ~$1000, I acquired a set of wireless glasses, a suitable graphics card (the 8mb Diamond Fire GL Pro 1000), and an infrared emitter which connects to a special port on the card. The glasses were (and continue to be) very comfortable and the lenses quite large compared to the other brands tested. But we're looking for the least expensive way of doing things, right? Stereographics also sells a pair of wired glasses, which sold (and still sell) for more like $300. These have smaller lenses and less comfortable frames than the pricier wireless model, but do work fine otherwise (with perhaps a bit more "ghosting" of images than for the wireless model).
Our initial equipment funds were used to upgrade to a faster graphics card on the Dell PC, which has a 21" Viewsonic P815 monitor attached. The Diamond card supported stereo at 800x600 resolution and 16-bit color; this is fine for most work but gets a bit blocky when one is dealing with many small vectors. Hence we upgraded to the 40mb ELSA Gloria-XL, which supported 1280x860 with 32-bit color. The Gloria-XL was a monster card for its time with gobs of video memory, so rotations were fast and smooth. But by now, even that card is dated! Our most recent acquisition in this work is a PNY Quadro4 card with 64mb of memory (~$500), and the ability to easily handle both OpenGL and DirectX stereo protocols.