Using shutter glasses for 3D molecular graphics
Background:
One wouldn't think that using shutter glasses primarily designed
for gaming can yield good results for the scientific community. However, that is
not the case. It is possible to use $55 shutter glasses with a $100 video card
with any modern PC as a 3D modeling workstation.
Let's start with the shutter glasses -- the product that makes
all of this possible. The 3D Revelator glasses, available from www.elsa.com,
use small LCD screens to alternatively block out the left and right eye,
allowing the two eyes to see different images, thereby giving the illusion of 3D
objects on a 2D screen. This technology has existed previously, but there are
two fundamental distinctions in this incarnation. First and foremost, these
shutter glasses work with *any* program that utilizes the Direct3D API to draw
the 3D molecule, and most programs that use the OpenGL API. Previously, a
program had to have special support for 3D glasses, which would always limit the
availability of software. With these glasses, almost any program that uses
Direct3D or OpenGL, whether it be for displaying molecules or gaming, can be
given a realistic 3D appearance. The drivers for the shutter glasses work as
follows: The scene described by the program to the graphics API (Direct3D or
OpenGL) is rendered from two different perspectives, one for each eye. The
alternate images are then very quickly flashed one after the other, and the eye
that is not supposed to see one of the images is blocked out by the shutter
glasses. This brings us to the second fundamental distinction between this
incarnation and previous ones -- there is no flicker. Previously, the two
images, each intended for one eye, did not refresh very often, which resulted in
distracting flicker of the model. These glasses, however, refresh at up to 70Hz
for each eye, or a total rate of 140Hz. This is fast enough to make any flicker
disappear completely. In one word, the images look good.
These glasses do require a certain subset of video cards in
order to function. The only video card limitation imposed is that the card has to carry
a TNT, TNT2, GeForce, or GeForce2 processor (in order of speed, listed lowest to
highest). Cards that carry
these processors are widely available for various price ranges. I have an older
Diamond Viper v550 that uses a TNT chip, and these glasses work it. I also have
the newer Elsa Gladiac that uses a GeForce2 chip, and
the glasses work with that as well. The GeForce2 will render the molecule faster
than the TNT, allowing for smoother rotation, but in the end both setups work
the same for displaying a stationary 3D model. Obviously the newer chips are
going to be faster and more expensive, while the older chips will be slower but
cheaper. My Elsa Gladiac does a very adequate job of rotating molecules with
hundreds of atoms, and its current sale price, direct from Elsa, is $329. My
Diamond Viper v550, which is no longer available from Diamond but available from
other resellers goes for $60 to $100. Both work. Any card that carries one of
the aforementioned chips will work, so a card from Elsa is not required.
I have found that the monitor used must
support at least a 120Hz vertical refresh rate to get good results; most modern
monitors fit this criterion.
Results:
I have gotten 2 molecular visualization programs to work with the Revelator
shutter glasses. One of them is Swiss-PdbViewer,
and the other is jvms. The
former uses straight OpenGL, while the latter uses the Java language and its
Java3D API, which can use either OpenGL or Direct3D. With my GeForce2, the
shutter glasses only work through Direct3D. I heard rumors (soon to be tested -- one of my friends
has a TNT2)
that they will work directly with both OpenGL and Direct3D with a TNT2 graphics chip. There is a
wrapper for OpenGL that will use Direct3D to render the images by SciTech Soft
called GLDirect. It
allows programs (like swiss-pdb viewer) that use OpenGL to work with the shutter
glasses. MolMol, unfortunately, crashes while
starting up when the SciTech wrapper is activated.
Overall, molecules look quite striking. After the eyes fully adjust (takes
about 10 seconds for me), it is very easy to see what portions of a protein are
in front, and which are in the back. Rotation of more complex molecules becomes
slow (about 3 frames per second), but that is expected of a
non-industrial-strength graphics setup.
HOWTO:
Here's how to make it all work:
-
There are some bad news for users of Windows NT -- revelator glasses require
good DirectX support, which is lacking in Windows NT. Windows 95/98 and 2000,
however, have such support.
-
First be sure that the monitor you will be using will
support at least 120Hz vertical refresh rate at the resolution you will be
using. Generally, the higher the resolution, the lower the refresh rate. My monitor
(see below for details) works at 120Hz at a resolution of
800x600, and yours probably will too. The vertical refresh rates for different
resolutions are probably listed in your monitor's manual. To see the current
vertical refresh rate, you may be able to use your monitor's own on-screen menu,
or right-click on the desktop, select Properties, go to the Settings tab, click
Advanced and go to the Adapter tab. There should be a drop-down box labeled
Refresh Rate which (you may have to click on it) will display the possible
refresh rates at the current resolution.
- If your vertical refresh rate does not go up to 120, try going through all the resolutions from 640x480 on
up to the highest supported and checking the best supported vertical refresh rate.
- If you cannot find a resolution that supports a high enough vertical sync rate
(110 Hz is acceptable, 100Hz is going to give an unacceptable amount of flickering. Below that, I doubt the glasses will even turn on)
look in the manuals that came with your monitor and video card and find the culprit. If the monitor
is the prolem, you will have to find a monitor that supports the higher vertical refresh rate. If the monitor
supports the higher rate but the video card does not, I have some good news -- your new video card will work fine.
- Once you know that your monitor will work, find a video card that has one of the following chipsets:
- TNT
- TNT2
- GeForce
- GeForce2
- You can find out what type of chip your video card has by right-clicking on
the desktop, selecting Properties, going to the Settings tab, clicking
Advanced, and going to the Adapter tab. One of the four chip types above must
be listed for the video card to support Revelator glasses.
- Those are the only chipsets that work with the Revelator shutter glasses. Check Elsa.com's web page for more information
on what video cards will work with the shutters.
- Once you figure out what your hardware setup is going to be, purchase the
necessary components and install them in your PC.
- Now that you have your Revelator glasses working, it's time to try viewing
some molecules.
- I will talk about two software options, both of which are probably good to explore.
One is the Swiss PDB Viewer, and the other is
JMVS2.
-
First Swiss-PDB. Download the latest version and install it. After opening a
file, under the Display menu, select Use OpenGL Rendering, and Render in
Solid 3D. Make sure you can rotate a molecule around and zoom in on it and
stuff. If you have a TNT or TNT2 board, you may be able to use the 3D
glasses with the program already. If this is the case, you do not need to read on.
If the 3D glasses are not turned on when you have Use OpenGL Rendering on,
try hitting - on the keypad. If they are still off, you need another piece
of software. What you need is GLDirect.
Install it and turn it on. At this point, you should be able to turn the
glasses off and on with the - keypad key (the minus key on the keypad), and view molecules in their
3-dimensional glory. If you try to use the on-screen menu or Dyna-Z (learn
about that from your Revelator documentation) and it does not appear to work,
activate it while constantly rotating your molecule with the mouse. The menu takes
a number of rendered frames to appear and change, and swiss-pdb only renders when it
needs to.
-
Second if JMVS2. Download the latest version. You will also need to install
the Java Runtime Library and
Java3D from Sun.
When you download Java3D, make sure it is the implementation that uses DirectX (Direct3D) and not
OpenGL, unless you got Swiss-PDB to work without installing GLDirect. Follow the execution
instructions given with jmvs2 package.
- Supposedly, Elsa engineers are working hard to make Revelator OpenGL-compatible
with GeForce and GeForce2 cards as we speak. Ask their tech support for information on this subject.
My Setup:
Here is some pertinent information about my system setup:
- CPU: Pentium III/450
- Graphics Card: Elsa Gladiac, 32MB GeForce2
- Elsa Driver version: 4.12.01.0200-0020 (I noticed that some
later drivers don't activate the glasses in windowed mode, thus making it
hard for any windowed program (swissPDB, for example) to work. Use this
old driver version.
- Shutter glasses: Elsa Revelator glasses, wired version (wireless is also
available, but I imagine its batteries run out very quickly)
- Windows 98 Second Edition v4.10.2222 A
- Memory: 128MB
- Monitor: 17-inch Dell P780
- SwissPDB v3.6b3
- JMVS v2.0
- GLDirect v1.00
DISCLAIMER:
I take no responsibility for the validity and/or correctness of the
information provided above. I don't work for or get any rewards or incentives
from any of the mentioned companies. All trademarks are the property of their
respective owners. If you have problems, please do not come to me. Instead, deal
with your hardware/software providers.
Written by Sergey Klibanov, 08/04/2000