Rob Jenkins (robj++at++sgi.com)
Fri, 18 Sep 1998 08:36:21 +0100
I'm pasting a Pipeline article on stereo here, I didn't read through it
all to see if it addresses all your questions, I suspect that it in
conjuntion with some of the other refs it points to should answer them
though.
Cheers
Rob
Title: What is Stereo Viewing?
Published: March/April 1998 in Pipeline Volume 9, Number 2
Revision: 1.1
Stereoscopic, or stereo, viewing is the ability to perceive a depth
dimension in images projected on a two-dimensional display device (that
is,to simulate three dimensions on a flat screen). It is accomplished by
presenting different views of the same scene to each eye. The views
differ by a viewing offset that approximates the viewing angle
difference between a person's left and right eyes when looking at a
natural scene.
To view stereoscopic images on a computer screen, each eye must see only
its
appropriate image. The most common way to do this on Silicon Graphics
workstations is to alternately draw each image on the screen and to use
special eyewear that alternately blocks the vision of each eye
synchronously
with the display of the images.
A frequently used solution is the CrystalEYES(R) product from
StereoGraphics
Corporation. The CrystalEYES product consists of a pair of synchronizing
goggles that are driven by an infrared emitter box that connects to a
special port on Silicon Graphics workstations. StereoGraphics
Corporation
(http://www.stereographics.com/ ) is a member of the Silicon Graphics
Developer Program ( http://www.sgi.com/Support/DevProg/).
A stereo synchronization signal is sent from the graphics display system
to
the emitter box, which sends an infrared signal to the stereo goggles.
This
signal indicates to the goggles when the image for the left or right eye
is
being displayed so that the stereo goggles can synchronize the opacity
of
the lens for each eye with the display.
The left and right eyes see the slightly different images at
approximately
the same time. The left image on the screen is shown while the right
lens of
the glasses is made opaque. The opposite behavior occurs respectively
with
the right image and left lens. The display is redrawn at a high rate, so
the
user perceives the left and right images simultaneously. Common rates
are 96
or 120 fields per second, depending on the stereo display method used.
Two stereo programming methods exist: quad-buffered (also known as
stereo-in-a-window) and full-screen (also known as divided-screen,
split-screen, or old-style). If the system supports quad-buffered stereo
viewing, it is the preferred and recommended method. This article
provides a
brief overview of full-screen and quad-buffered stereo viewing and
provides
sources for more information.
In full-screen stereo viewing, the screen is divided into left and right
pixel lines. When the monitor is put in stereo mode, half of the
screen's
vertical resolution and the full horizontal resolution is used for each
view
(that is, 1280x492 (width times height)). In most cases, the left-eye
view
is rendered in lines 0 to 491 (top half of the frame buffer) and the
right-eye view is rendered in the bottom half of the frame buffer (lines
532
to 1023 on most Silicon Graphics workstations except O2, which uses
lines
512 to 1003). The X Window System(TM) and the IRIS GL(TM) or OpenGL(TM)
graphic library display the appropriate stereo image in the respective
top
or bottom part of the screen. Because the image will be displayed at
approximately twice the height that it was created, programmers must
account
for the screen height when displaying the image. Graphics applications
can
compensate for the doubled height by modifying the transformation
matrix;
however, X applications cannot compensate, so monoscopic X images, such
as
shell windows, are distorted.
Quad-buffered stereo viewing uses left and right buffers for the stereo
image and front and back buffers for animation. Quad-buffered stereo
requires a significant amount of framebuffer resources compared to the
full-screen stereo method. With quad-buffered stereo, stereo pixels are
square, and the application renders both the left and right eye image to
the
same pixel location on the screen. The left or right buffer is selected
when
rendering the image for the respective eye. This method does not distort
the
monoscopic images on the screen.
Typically, the video format is saved in the EEPROM on the graphics
board,
and the stereo video parameters take effect permanently after graphics
are
initialized or the system is powered up. Some machines let you load the
desired stereo video format only temporarily.
Typical stereo video format for quad-buffered stereo is 1024x768_96s
(1024x768 is the screen width and height in pixels, 96 is the framerate
in
hertz (Hz), and ``s'' indicates a valid stereo video format) and for
full
screen stereo is 1280x492_120s. The available video formats for each
machine
usually are in the /usr/gfx/ucode/<gfx_chip>/vof directory on your
system (
<gfx_chip> represents the graphics subsystem on your machine, which is
described in the setmon(1G) man page). Only some of the available video
formats support stereo (indicated by a lowercase ``s'' in the file
name),
and the formats may differ depending on the machine.
In addition to available video formats, each Silicon Graphics system may
have its own particular requirements to enable desired stereo behavior.
For
example, on an O2, the framebuffer depth must be set to 16+16 or 32+32
to
enable quad-buffer stereo. You can use the xscreen(1) utility to
configure
the display size, refresh rate, and framebuffer depth. On Silicon
Graphics
systems that have InfiniteReality(R) graphics, you can use the
ircombine(1G)
utility to set different video formats. InfiniteReality graphics offers
a
114 Hz framerate and a video format compiler.
Stereo viewing is most effective when it is run on a local machine.
Although
the setmon(1G) utility can only run on the local machine, it may be
possible
to display stereo images remotely by using the XSGIvc(3) (video control)
library.
Stereo imaging is used in the following areas to view 3D images:
* Aerospace: designing aircraft and for cockpit simulation
* Architecture: rendering building interiors and exteriors
* Automotive: developing virtual prototypes of car designs
* Cartography: rendering stereoscopic datasets.
* Chemistry/biology: molecular modeling
* Medical: viewing CT scans and mammograms
* Financial: viewing matrixes of financial information
* Telerobotics: guiding vehicles remotely through stereoscopic
systems
* Virtual Reality
* Video games
For more information about stereo viewing and implementation, see the
following:
* The setmon(1G) man page
* The stereo(3G) man page
* The XSGISetStereoMode(3X11) man page
* How to run a stereo program information at
http://www.sgi.com/Technology/Performer/stereo.html
* ``Geometry and Transformations'' in Programming with OpenGL:
Advanced
Rendering at http://www.sgi.com/Technology/openGL/advanced97/notes/
* Stereo field sequential output information on Silicon Graphics
systems
that have InfiniteReality graphics at
http://www.sgi.com/Products/hardware/Onyx/Tech/sfsc.html
* Video format compiler information at
http://www.sgi.com/Products/software/vfc/.
* Basic stereo programming guidelines in OpenGL are described in
Chapter
4, ``OpenGL and X: Advanced Topics'' in OpenGL on Silicon Graphics
Systems (part number 007-2392-001) available on the Silicon
Graphics
Tech Pubs library at the following URL:
http://techpubs.sgi.com/library/
P J Narayanan wrote:
>
> Hi,
>
> Though this is not a Performer question, I am emboldened to ask it here
> by the past discussions on this topic on this list. I request the person
> who has quoted an SGI video engineer in the past to get me the answers
> for this question from such a competent person.
>
> What is the difference between the New style stereo and the Old style
> stereo? I was under the impression that stereo disply on SGI machines
> draws left and right eye views as alternate frames at a fast rate.
>
> For instance, 1280x492_120s format will draw the left eye view -- a full
> 1280x492 (actually 1280x512 with the blank portion) window -- once
> and switch to the similarly sized right eye view etc with each eye drawn
> for 1/120th of a second. The CrystalEyes emitter controls the LCDs on
> the glasses in synchrony with this switching. In this (old-style stereo)
> mode, the stereo window is accessed as a large 1280x1024 buffer from the
> program, the top half of which is the right eye view and the bottom half
> the left eye view. There is no need to configure the window explicitly
> as a stereo quad buffer window (say by using setFBConfigAttrs) to use
> this mode effectively.
>
> I was able to make the above work. The same program/philosophy does not
> seem to work with any of the "New style" stereo modes, such as the
> 1025x768_96s we have on our Onyx/RE2. When I set display to this mode
> (using a setmon), the CrystalEyes emitter turns on, but both eyes see
> the same thing at all times. I also tried the example stereo program
> that sets PFFB_STEREO using a setFBConfigAttrs. This seems to draw left
> and right eye views on top/bottom halves of the screen.
>
> I think I understand the Old style stereo correctly. (Or do I?) Can
> someone explain the proper use of the new style stereo to me? The difference
> between them is obvious even when no stereo-enabled program is running.
> The windows all become twice the height with top and bottom halves showing
> at the same time when the mode is switched to one of the old style stereo
> modes using setmon. The screen looks normal when switched to one of the
> new style stereo modes, however.
>
> Sorry to bother this group with this question. I would appreciate any
> help in this regard. Is there standard publication from SGI or otherwise
> that answers all my questions?
>
> Thanks in advance!
>
> PJN
> --------
> Centre for Artificial Intelligence and Robotics +91 80 226 5609 (Phone)
> Raj Bhavan Circle, High Grounds +91 80 225 5615 (Fax)
> Bangalore 560 001, INDIA
> URL: http://www.cair.res.in/~pjn pjn++at++cair.res.in
> =======================================================================
> List Archives, FAQ, FTP: http://www.sgi.com/Technology/Performer/
> Submissions: info-performer++at++sgi.com
> Admin. requests: info-performer-request++at++sgi.com
-- ________________________________________________________________ Rob Jenkins Silicon Graphics mailto:robj++at++sgi.com
This archive was generated by hypermail 2.0b2 on Fri Sep 18 1998 - 00:36:39 PDT