3D Stereo Viewing with ATOMS and SHAPE

Improved technology has made stereoscopic viewing, that is viewing still images and movies with separate left- and right-eye images to give apparent depth, better quality and more common on computers and televisions.  As far as ATOMS and SHAPE are concerned, there are two separate kinds of stereo-enabled video cards of the most recent types.  At present, software stereoscopic drivers for most of these cards appear to be available only for Windows.

Direct3D stereo in Windows (only) is supported by the nVidia GeForce series of graphics cards,with their 3D Vision package.  The GeForce series only supports Direct3D in stereo (not any kind of OpenGL).  Other software vendors, such as iZ3D and TriDef also support various combinations of hardware.

The 3D Quad Stereo Drawing Mode is available only for graphics cards supporting OpenGL quad-buffered stereo. It is potentially supported for Macintosh and Linux as well as Windows, though at the moment the high-end Professional Quadro hardware by nVidia seems to be the main support for Linux. The Quadro series of cards from nVidia actually supports either Direct3D or quad-buffered OpenGL stereo on windows.

With either type of video card there are basically two types of viewing hardware.

1) Shutter glasses. The images are drawn independently and flashed alternately on the screen at a high rate - 120 times per second in the latest computer implementations, for example those supported by both the nVidia Quadro and GeForce series of display cards. A 120 Hz monitor is required, and it must be viewed with special shutter glasses which blank out the left and right eyes alternately in synch with the images on the screen.  Projectors and projection TVs are also available.

2) Polarizing monitors or projectors. The monitor or projector simultaneously or alternately (very rapidly) generates two images which are viewed with glasses with the two lenses polarized at 90 degrees to each other, or with different circular polarizations. Most movie theater 3D (stereo) systems use a more elaborate variant of this method. It does not require expensive shutter glasses, only relatively cheap polarizing glasses for each viewer.

These types of hardware stereo viewing are full-color and should not be confused with the old two-color (red-green) anaglyph technology which really only shows monochrome or bi-chrome images. (Anaglyph viewing is still available in SHAPE and does not require special hardware).  ATOMS and SHAPE have always supported stereo viewing using two spatially separated images combined with the naked eye or an optical viewer - this type of technology goes back to the 19th century.

The terminology for stereo viewing can be somewhat confusing.  In movie theaters and television, the term 3D means stereoscopic viewing, that is separate images for left and right eyes.  In computer and video-game graphics,  the term 3D has been applied to several kinds of software techniques, at present primarily OpenGL and Direct3D, which keep track, pixel-by-pixel, of the third dimension in drawings and thus typically produce more realistic images than 2D line and space-fill drawings, though they are not necessarily stereoscopic (no separate images for left and right eyes). This is the way the term 3D is used in all ATOMS and SHAPE literature. OpenGL and Direct3D may be used in SHAPE and ATOMS for single non-stereo images as well as stereo (2D images may also be shown in stereo with ATOMS and SHAPE, although this is usually inferior to using a 3D method).

SHAPE and ATOMS in the past have used only OpenGL, which is available for Windows, Macintosh and Linux .  A special, full-screen Direct3D mode has been added to ATOMS and SHAPE for Windows to support stereo viewing with GeForce cards and any others which require Direct3D.  ATOMS and SHAPE also support stereo viewing using the quad-buffered OpenGL method, which is currently available on the Quadro series of video cards from nVidia and some other video cards.

Older Shutter-Glasses Systems

Older stereo display drivers from nVidia, which worked only on Cathode-Ray-Tube monitors, not flat-screen LCD monitors, supported Direct3D and OpenGL without quad-buffering. This system works with shutter glasses, but if the refresh rate of the monitor is less than 100 Hz or so the flicker tends to be excessive.  Such systems are basically outmoded and may not be supported by manufacturers.

Changes in operation of ATOMS and SHAPE

In order to keep the total number of options to a minimum, what were formerly Display Modes have now been separated into Model Modes and Drawing Modes.  The Model Mode specifies the type of model which represents the structure or crystal, and includes Standard, Ellipsoid, Cavities and Protein for ATOMS; and Standard, Stereonet and Sections/Zoning for SHAPE. The Drawing Mode specifies which computer technique and viewing mode is used, and includes 2D single, 2D stereopair, 3D single, 3D stereopair, 3D quad stereo and for SHAPE, Anaglyph. The 2D modes use essentially line and fill drawing, which is suitable for schematic drawings for publication, for example, though shading is available in both ATOMS and SHAPE.  The 3D modes use generally more realistic lighting and superior interpenetration relations, and usually look better on screen or in full-color high-resolution printed images. The 3D modes in this option all use OpenGL 3D system software, which is available on Windows, Macintosh and Linux. 

An additional 3D mode, Direct3D, which is available only on Windows, is selected with a separate button or menu option. This is the Drawing Mode which is required for stereo viewing with nVidia GeForce display cards or any others which support Direct3D only.  It is full-screen only (not windowed)

Selection of Stereo Viewing Methods

Simple stereo methods.  These allow stereo viewing using no aids or inexpensive glasses or optical viewers. The stereopair modes allow stereo viewing with or without optical aids, and the Anaglyph mode allows viewing with red-green glasses (SHAPE only). But these modes have limitations; the stereopair modes halve the size of the image and the other image is always visible, giving three images (unless some special type of viewer is used); and the Anaglyph mode removes all or most colors, since the two images have to be different colors.

Hardware stereo methods. In these methods a single image drawn by ATOMS or SHAPE is split into left- and right-eye images by the display hardware, or actually its resident software. Then the two images are displayed on screen, either alternating rapidly in synchrony with shutter glass, or as two differently polarized images. Any of several ATOMS or SHAPE Drawing Modes may need to be used, depending on your video card and monitor.

1) Cards or driver software which support OpenGL quad-buffering, such as the nVidia Quadro series: Select the 3D quad stereo option in the Drawing Mode drop-down box in the or in the Display menu. Stereo can be shown either in a window or full-screen. The program itself sends the two completed images or objects to two separate buffers, so both the perspective distance and the stereo rotation angle ( = depth or stereo separation) are controlled by ATOMS and SHAPE; perspective distance is changed onscreen with the SHIFT-P and SHIFT-[ keys and the rotation angle with the SHIFT-A and SHIFT-S keys.

Setting up nVidia 3D Vision for quad-buffered OpenGL. In the nVidia control panel, select Manage 3D Settings in 3D Settings. In the Global Settings tabe, the Global presets option should be set to "3D OpenGL Stereo". It may then be necessary to select the particular setting Stereo - Display Mode and set it to "Generic active stereo (with NVIDIA 3D Vision)".

2) nVidia GeForce cards which support their 3D Vision system, and any other display cards which support only Microsoft Direct3D (DirectX). Click on the Direct3D button in the or the Direct3D option in the Display menu. These cards will also display in anaglyph (red-green glasses) mode without shutter glasses or a special monitor. In this stereo mode, or any other except quad-buffered OpenGL, the program sends only a single drawing (or really, a 3D object) to the video card, which then rotates the image one way for the left-eye image and the other way for the right-eye image.

For full-color operation these options will also require either the nVidia 3D Vision shutter-glass kit and a compatible 120 Hz monitor or a compatible projector, or a stereo polarizing monitor and polarizing glasses. Other hardware and software driver combinations may also be available.

3) Older nVidia cards or some other card with stereo driver software, a CRT monitor and shutter glasses. These may work with the Direct3D option as in 1) and/or with the 3D single option in the Drawing Mode drop-down box in the Dialog Bar - Left or the Display menu. This will only work in full-screen. Like Direct3D in 1) above, ATOMS or SHAPE sets the perspective distance but the stereo rotation is controlled by the video driver.

Shortcut keys for controlling ATOMS and SHAPE images

Since stereo images may require full-screen viewing in which menus are not available, the keyboard shortcuts for modifying or animating the images have been revised and extended.

In the full-screen modes accessed with the Fullscreen button in the Dialog Bar - Left or the menu option, the left mouse button always performs the identification function, identifying either atoms or crystal faces, and the right button performs the rotation function.  Clicking outside the crystal faces or structure (not on an atom) brings up a dialog giving most of the options, which can be selected with buttons. If the structure is in motion, clicking with either mouse button will stop it. Exit from Fullscreen mode either with this dialog, or with the Esc(ape) key.

The displacement function with the right mouse button which was available in earlier fullscreen viewing has been discontinued.

In the Direct3D fullscreen mode, the mouse buttons only cause rotation (click and drag), not crystal-face or atom identification, and no dialog is called up by clicking. When the structure is in automatic motion, rotating or vibrating, clicking anywhere will stop the motion.  The same keyboard shortcuts are available, and exit from fullscreen is with the Esc(ape) key.

The shortcut key combinations:

SHIFT-X     Rotate on the x axis (horizontal in screen). Stop rotation on x, y or z with a mouse click or SHIFT-Q, and change the speed with the SHIFT-F (faster) and SHIFT-G (slower) keys.

SHIFT-Y    Rotate on the y axis  (up in screen)

SHIFT-Z    Rotate on the z axis (out of screen)

SHIFT-V    (ATOMS only) This starts vibrational motion according to the mode currently selected in the Vibrational Modes dialog (Input1 menu).  A file with vibrational mode information written by VIBRATZ is required.  Stop vibration with a mouse click, and change the speed with the SHIFT-F or SHIFT-G keys.

SHIFT-T    (ATOMS only) This starts thermal motion, with parameters selected in the Thermal Motion dialog (Input1 menu). A file with vibrational mode information written by VIBRATZ is required.  Stop vibration with a mouse click, and change the speed with the SHIFT-F or -G keys.

SHIFT-O    This restores the original or standard orientation.

SHIFT-I    This restores the initial orientation

SHIFT-P    This decreases the perspective distance, increasing the 3-D effect.

SHIFT-[    This increases the perspective distance (the [ key is the one to the right of the P key on U.S. keyboards, but it may be elsewhere on other keyboards).

SHIFT-plus    This will change the rescale factor upwards. This factor can be set in the Scaling dialog (Input2 menu ATOMS).  The plus and minus keys are those in the regular alphanumeric part of the keyboard, not the number pad.

SHIFT-minus  This will change the rescale factor downwards.

SHIFT-A    Increase the stereo rotation angle between the two images, or increase the effective interocular distance.  This does not apply to the Direct3D stereo mode - for that mode, the rotation or "depth" setting is controlled by the video card, usually with a separate set of keys.  This rotation does apply to the quad-buffered OpenGL stereo mode as well as the stereopair modes and Anaglyph mode in SHAPE

SHIFT-S    Decrease the stereo rotation angle between the two images.

SHIFT-F    Speed up motion. The SHIFT-F and SHIFT-G keys only apply when there is rotation or vibration (ATOMS only) going on. They permanently affect the angular rotation increment in the Continuous Rotation dialog (Rotation menu), or for vibrational motion in ATOMS, the frames/cycle parameter in the Vibrational Modes dialog (Input1 menu), or for thermal motion, the frames/cycle (highest frequency) in the Thermal Motion dialog (Input1 menu).

SHIFT-G    Slow down motion.

Additional Details

In ATOMS and SHAPE the perception of depth in stereoscopic viewing is affected by two parameters, the Stereopair Rotation Angle, and the Perspective Distance; both are set in dialogs in the Input2 Menu, or in the Dialog Bar - Right. A value of about 100 Angstroms for ATOMS and 10 Angstroms for SHAPE for perspective distance and about 1-3 degrees for rotation angle are good starting points.

In viewing real life objects setting the perspective distance would fix the stereopair rotation angle because the human eyes are a fixed distance apart. However in viewing objects on an Angstrom scale the interocular distance is arbitrary, and thus it is possible to set both parameters - in effect the stereopair rotation angle fixes the interocular distance or the scale of the atomic structure relative to the viewer.

The nVidia settings depth and convergence are not available to the user in ATOMS and SHAPE, because they are controlled by the two ATOMS and SHAPE settings stereopair rotation angle and perspective distance. Convergence affects the apparent overall distance of the object - whether it appears to be in front of or behind the screen. However, excessive displacement in either direction can cause difficult in the ability of the eyes to merge the two images (they may become excessively separated on the screen), and also increased prominence of "ghosts" or residual weak images in the wrong eye. Therefore ATOMS and SHAPE always sets the convergence distance equal to the perspective distance so that the center of the structure is in the plane of the screen, not in front of or behind it. The stereopair rotation angle then fixes the nVidia depth parameter, which is really the interocular distance (the term "depth" does not refer to the position of the object front-back, but to the apparent distance between the nearest and the furthest parts of the object).

The nVidia Keyboard Shortcuts or hot keys for changing depth and convergence have no effect in ATOMS and SHAPE, although using the depth keys will bring up a scale showing the relative degree of stereo effect.

The control of depth and convergence by the ATOMS and SHAPE parameters applies only to the nVidia 3D Vision system. If other video cards or software drivers are used, the controls supplied may have different names; depth, separation and/or convergence and the action of each may involve both translation of the image on screen and rotation. Considerable adjustment of these controls may be required to get the desired stereo effect and an acceptable level of comfort. In particular, it is usually best to adjust the two images without wearing any glasses so that their physical separation is least at the center of the object. In nVidia 3D vision, this would be done by adjusting convergence (but is actually done automatically by ATOMS and SHAPE).

If the perspective distance is small in ATOMS, the projection of spherical atoms will be elliptical on the screen, and while this may actually be what the eye would see at a short distance, such a projected image is usually unsatisfactory in practice. Thus the perspective distance should usually not be decreased beyond the point at which atoms begin to look non-spherical.

There is no stereo rotation or stereo effect at all in Direct3D if the projection is orthographic rather than perspective - that is if Perspective is not selected in the Input 2 menu. Therefore, ATOMS and SHAPE always use perspective projection in the Direct3D mode, with the perspective distance entered in the Perspective dialog (Input2 menu). If that distance is zero, a plausible value is entered based on the dimensions of the structure.

In real life when attention is directed to a near object, not only is each eye directed towards that object, but the focus is adjusted; viewing a near object causes distant objects to go out of focus or become blurred and vice versa. This enhances perception of depth. On a computer or movie screen the focus cannot be changed, and this may interfere with depth perception for some people. Of course everything drawn by ATOMS and SHAPE is always in focus, unlike a non-animated movie which is recorded by cameras which change focus like the eye. In ATOMS, you may select fog, which only fades out the colors from front to back and does not change the focus.

E-mail support about any problems or suggestions - please include the data file which causes the problem. So far, stereo drivers have not generally been made available for Macintosh or Linux, but users who have or know of systems which support OpenGL quad-buffered stereo (or non-quad stereo) should notify us.

Return to the Main Page