Low-cost Stereo Virtual Reality at PMEL 

as reported by Al Hermann, last updated Feb 2004

with a lot of help from Chris Moore and Nancy Soriede and initial support from NOAA/ESDIM

Development 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 in stereo, click here. The spheres represent water parcels in a circulation model for the area near Kodiak Island, AK. 

5) A powerpoint presentation on this topic is available here.

*****NEW WEB-BASED VRML SERVER********.

Under NOAA/HPCC support, we have developed a web interface to serve up VRML worlds of model data on demand. The system is described in this powerpoint presentation, and the server itself may be found here. Once the server has loaded:

1. select a variable (e.g. "salt") from  the "romsreg_xyzt_nc" datset
2. select "xyzt volume" from then "view" menu
3. select "VRML surface animated" from the "products" menu. 

This should load an animated VRML surface into your browser. It works nicely with Netscape, in conjunction with the Cortona VRML client.


Overview

This page is a summary of our explorations into the options for low-cost, PC-based stereo imaging, and its application to exploring the large data sets that are output from oceanographic models. Here we'll explore the general topic of stereo virtual reality with some examples and links to other relevant sites.
  1. Why stereo virtual reality? 
  2. How to get stereo vision?
  3. VRML and the need for speed 
  4. Stereo VRML viewing 
  5. Trying on glasses 
  6. The bottom line 
  7. Stereo information on the web 

Why stereo virtual reality?

Our laboratory (like many others) has a compelling interest in clear ways of visualizing scientific data. Modern observational networks in generate huge volumes of oceanographic data; numerical models generate even larger blocks of numbers (whether this output should be called data is a separate topic). How to visualize these enormous files? Two-dimensional plots along horizontal or vertical planes have served oceanographers well in the past but fail to capture many of the subtleties present in three-dimensional data sets. For example, the elevation of the sea surface a simultaneously contain both large and small-scale patterns. If the large-scale patterns have a stronger amplitude and small-scale ones, a simple contour plot of sea surface elevation will obscure the small-scale patterns, since contour levels will reflect the stronger signal. If, on the other hand, we render sea surface elevation as a surface in three-dimensional space, we can see both the large and small-scale signals simultaneously.

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.

TOP

How to get stereo vision?

Two snapshots

The 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). 


Figure 1. Schematic of passive, dual-projector stereo display system. Components include host computer (commodity PC or workstation), splitter/converter, DLP projectors, polarizing filters, and polarization-preserving projection screen. Passive polarized glasses are worn by the viewer, to deliver the proper image to each eye. Thick arrows denote light path.


Here's how we set up a GeoWall in my office. Start with a modest-sized room (view optional):

window-screenup

Install the projectors and Linux host at the rear of the office:

projectors


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..........

window-screendown-lightsoff


Oceanographic Anaglyphs

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.
 
Fish (spheres) over bathymetry  Stereo version
Top view of fish locations
Velocity vectors in a submarine canyon

Stereo shutter glasses

Shutter 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: 

Frame Flipping -
All available pixels are used to render each eye's image. This requires graphics hardware with enough memory to store both images at once. 
Interleaving -
The screen alternately displays the left eyes and view using, say, the even-numbered lines of pixels for the left-eye view, and the odd numbered lines of pixels for the right-eye view. This requires less graphics memory than the frame flipping approach, but results in a lower resolution image for a given monitor. 
Synch Doubling -
The computer generates the left eye view on the top half of the screen, and the right eye view on the bottom half of the screen. A synch doubler then spreads out the top half image to fill the entire screen, and does the same with the bottom half image - they are alternately displayed at half the original refresh rate of the monitor. This requires no special graphics hardware within the computer itself, but again results in a lower resolution image than frame flipping. It is rather like interleaving. 


TOP

VRML and the need for speed

We have tested several stereo systems on a variety of PCs and graphics cards. Initially (back in 98-99) we used two respectable (at the time!) PII machines, a Dell XPS450 with 256 mb and a Micron Millenia 400 with 128mb, both running Windows NT. Our latest tested systems have more memory and much faster (by a factor of five) CPU, and run Windows 2000 or Windows XP. Standard graphics cards are also 5 times more powerful than a few years ago, or 5 times less expensive for equivalent power.

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 data analysis software, such as Matlab and vis5d+, may also be used to generate VRML code. More recently, we have developed a web interface to serve up VRML worlds on demand. The system is described in this powerpoint presentation, and the server itself may be found here. (NOTE: if you want to view the 3D pictures anaglyphs from the powerpoint presentation with red/blue glasses, put the blue lens over your right eye).
 

Two of our worlds represent output of an oceanographic model of the Bering Sea


Click the image above to enter the virtual world. You'll need Cosmo Player, or Cortona viewer, or some other viewer.

and animations from a model of fish spawning near Kodiak Island, Alaska


Click the image above to enter the virtual world.
 

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.

TOP

Stereo VRML viewing

Once familiar with the Cosmo viewer, I began my quest for stereo by experimenting with side-by-side crossed pairs of VRML objects on a standard computer monitor, using a web site (now expired, alas - I'm now trying to find or re-create a similar site) which would produce them on demand. Unaided viewing of side-by-side crossed pairs can work reasonably well, but with some pain.. Personally I prefer an uncrossed pair, but oddly enough this is much more difficult to produce from VRML than the crossed pair. If you have an uncrossed pair on the screen, it frequently helps to hold your hand out in front of your nose, to help shield each eye from the "wrong" image. Another way to force the correct image to the right eye is with cardboard tubes from paper towels (or some other, similarly sized, tubes).

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..

TOP

Trying on glasses

Back in 1998, having located a viewer, I sought the most inexpensive pair of shutter glasses. Many require special graphics cards to synchronize viewing with the monitor, but this is not universally true. Most of the glasses available then (and probably most graphics cards) were geared more towards the gaming market. This is still true. Some glasses are tethered (wired) to the graphics card while many are wireless; an emitter sitting on top of the monitor broadcasts a signal received by the glasses. In 1998-1999 we tried a few models, with mixed results. I'll omit those experiences here, in fairness to the manufacturers who have no doubt improved their products in the interim. 

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.

TOP

The bottom line

Here's the breakdown of costs for our most recent graphics-friendly "high end" desktop system:
  • 2.2 ghz computer with 512mb memory $2000 
  • 21" CRT Monitor $1000 
  • 64mb graphics card $500 
  • Shutterglasses with emitter $1000 
  • Software FREE 
  • Total: $4500
As a "low-end" system, consider that even a 4-year old computer can be fitted with a stereo-friendly graphics card from the GeForce line (this includes old GeForce2, which is ubiquitous on eBay). You can then download the latest stereo driver from the nVidia web site, and the Cortona viewer from their web site (both free). Together these can be used to generate red/blue stereo VRML worlds, for viewing with 99-cent glasses.

TOP

Stereo information on the web

There is an immense quantity of material available on the Web concerning graphics visualization, VRML, and stereo visualization in particular. Indeed, the best way to learn about various stereo techniques is through the web. Here are a few of my favorite web sites encountered in my search for stereo information:

http://www.stereo3d.com/3dhome.htm - an excellent source for overviews and independent reviews of all things stereo (hardware and software)

http://www.stereovision.net/ - a newsletter for latest developments in stereo hardware and software; includes links to informative how-to guides

http://www.parallelgraphics.com/products/cortona/ - a great VRML viewer which supports Java and stereo

http://www.tgs.com/Assistant/assistant-index.html   - source for a nifty viewer which supports a wide variety of stereo formats (anaglyph, page flipping, intervleaving) and accepts most VRML code, including animations.

http://www.vrex.com/ - a source for inexpensive stereo shutteglasses for PCs

http://www.stereographics.com/ - a source for professional quality ($300-$1000) stereo shutterglasses for PCs and workstations

TOP



Contents last updated  Sat, 21 Dec 2002 00:52:04 GMT
Liz Dobbins - dobbins@pmel.noaa.gov
http://www.pmel.noaa.gov/~hermann/vrml/stereo.html