[comp.graphics] Interactive Stereo Viewing

WAMBOLD@OSU-20 (Sandra Wambold) (01/15/88)

Does anyone on this BB know the proper translations and rotations for
interactive stereo viewing?  I am trying to program a Evans&Sutherland
PS300 so people can use red-blue stereo glasses while they rotate a
structure (real-time).  All I need to know is the correct angle for
rotation and the required translation between the red and blue (or green)
parts.  If anyone can tell I will be very happy, as I have been working
on this problem for quite some time.

         wambold@osu-20.oh-state.arpa

-------

tso@rocky2.rockefeller.edu (Daniels Tso(Wiesel)) (01/16/88)

In article <4615@tut.cis.ohio-state.edu> WAMBOLD@OSU-20 (Sandra Wambold) writes:
>
>Does anyone on this BB know the proper translations and rotations for
>interactive stereo viewing?  I am trying to program a Evans&Sutherland
>PS300 so people can use red-blue stereo glasses while they rotate a
>structure (real-time).  All I need to know is the correct angle for
>rotation and the required translation between the red and blue (or green)
>parts.  If anyone can tell I will be very happy, as I have been working
>on this problem for quite some time.
>

	I think all that is required is a differential rotation of a few
degrees. The actual number of degrees will scale the apparent depth and there
is a limited range of disparities until the stereo effect will break down.

	Try rotating one image (say the green one) 3 degrees relative to the
red one, about the vertical axis. Then try 5 degrees.

flip@pixar.UUCP (Flip Philips) (01/18/88)

In article <4615@tut.cis.ohio-state.edu> WAMBOLD@OSU-20 (Sandra Wambold) writes:
>
>Does anyone on this BB know the proper translations and rotations for
>interactive stereo viewing?  I am trying to program a Evans&Sutherland
>PS300 so people can use red-blue stereo glasses while they rotate a
>structure (real-time).  All I need to know is the correct angle for
>rotation and the required translation between the red and blue (or green)
>parts.  If anyone can tell I will be very happy, as I have been working
>on this problem for quite some time.
>
Transform the Left & Right views by these:

	1    0    0    0		1    0    0    0
	0    1    0    0		0    1    0    1
	0    0    0 -1/k		0    0    0 -1/k
	k/20 0    0    1    	       -k/20 0    0    0

	   Left Eye			   Right Eye

(This is directly from the book, the 0 in [4,4] for the right should be 1
if you are still maintaining normalized co-ords.)

Quote:
For a human with average eyesight the strongest stereo effect occurs at 50
cm in front of the eyes. Thus for  an eye seperation of 5cm, the stereo angle
is atan(5/50) or 5.71 degrees.
Endquote.

For the matrix above, k is the focal length & d is the distance between
your eyes, therefore atan(d/k) gives the stereo angle. From the above example
we see that the correct stereo angle is 5.71 deg. Therefore d = k/10 is
required to maintain the correct stereo angle. 

since you have d between your eyes each view requires d/2 = k/20. offset
each by + & - and you have a stereo pair. 

A more detailed explination can be found in _Mathematical Elements for
Computer Graphics_ by David Rogers and J.Allen Adams. 1976, McGraw Hill.
(You used to be able to pick it up in the Derby Book Store, it was a text
for CIS 781 or something like that)

Flip Phillips
Pixar
Marin County, Ca

sun!pixar!flip

scott@hpiacla.HP.COM (Scott Anderson) (01/19/88)

Actually, the number of degrees is dependent upon how far your object is
supposed to be from the viewer.  The number of degrees can be found by
taking the inverse tangent of ( 1/2 the distance between your eyes divided by
the distance to the object).  For example, to view an object that should
be a foot away take the arctangent of (2.6 / 2 / 12), which is the arctangent
of ~0.1, which is 6.2 degrees.  Some people like to make the angle larger,
in order to heighten the effect.  By the way, I haven't done any vast
sampling to get 2.6 inches as the distance between the average human's eyes;
I just grabbed a ruler and looked in a mirror.

	Scott Anderson
	hplabs!hpiacla!scott

ewhac@well.UUCP (Leo 'Bols Ewhac' Schwab) (01/20/88)

In article <1396@pixar.UUCP> flip@pixar.UUCP (Flip Philips) writes:
>In article <4615@tut.cis.ohio-state.edu> WAMBOLD@OSU-20 (Sandra Wambold) writes:
>>Does anyone on this BB know the proper translations and rotations for
>>interactive stereo viewing?  [ ... ]
>>
>Transform the Left & Right views by these:
>
>	[ Matricies deleted ]
>
	He goes on to explain about focal length and distance between eyes.
While I'm sure this will work, it's not nearly as intuitive (to me) as the
approach I've been using.

	You have two eyes.  These can be thought of as two cameras into a
world space, seperated horizontally by a fixed distance (2.5" typically).
Both eyes... er, cameras are looking at the same point.  So all you need to
do is calculate and render two images, one for the left camera and one for
the right.

	As said before, both camera focus on the exact same point.  If they
don't, the stereo effect will be diminished greatly.  The viewpoint (where
the line of sight of the two cameras converge) will appear precisely on the
surface of your screen.  All points between the viewpoint and the camera
will appear to leap off the screen, and all those behind the viewpoint will
sink back into the monitor.  As a personal preference, I gear all my 3D to
appear behind the screen, as I have a hard time focusing on stuff leaping out.

	A negative parallax of 2.5 inches on the screen surface will appear
exactly halfway between the surface of the screen and your nose.  A positive
parallax of 2.5 inches on the screen will appear to be at infinity.  You
should avoid positive parallaxes of greater than 2.5", as it will tend to
cause the eyes to diverge.  Eyes are not designed to do this, and if you try
your brain will start taking core dumps.

	Depending on camera seperation, you might be able to get away with
simply shearing the projected image along the projected X axis rather than
actually rotating it (after projection into the viewing frustrum (sp?)).
Computationally, this is a real time-saver.

	Some tips:  By seperating the cameras more and more, but keeping
focused on the same point, you will create a hyperstereo effect, and the
object will appear to be small (since you'll need to cross your eyes to see
it, which you normally do with small objects near your face).  If you get
the left and right images reversed, you'll get a pseudo-stereo effect, which
will also cause your brain to dump core.

	I'd suggest avoiding the red-blue strategy if you can, as the strong
colors tend to give many people headaches.  If you have a short persistence
interlaced display, look into the possibility of using occluding polarized
glasses that flicker in sync with the display.  Full color images are much
prettier to look at, and the flicker is only initially annoying (my eyes
glaze over after a few moments, and I don't notice it anymore).  Select
glasses with a neutral grey filter, and view in a darkened room with minimal
lighting directly in front of you.

	Avoid huge amounts of parallax in either direction.  Trying to touch
the viewer's nose is a bad idea and rarely works.  It's also dependent on
how far the person is from the screen.  A centimeter or three maximum
seperation on the screen at normal viewing distance will produce very
striking and effective results.

	Learn to recognize good and bad 3D.  Closing each of your eyes
independently can help determine what's wrong if your image isn't working
for you.  Holograms are good 3D.  The real world is good 3D (take a good
long look at it sometime).  _Captain Eo_ is bad 3D.

	All this drivel comes from about four solid months of playing around
with 3D on the Amiga under the tutelage of Michael Starks.

	Hope this helps.

_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_
Leo L. Schwab -- The Guy in The Cape	ihnp4!ptsfa -\
 \_ -_		Recumbent Bikes:	      dual ---> !{well,unicom}!ewhac
O----^o	      The Only Way To Fly.	      hplabs / (pronounced "AE-wack")
"Work FOR?  I don't work FOR anybody!  I'm just having fun."  -- The Doctor

drforsey@watcgl.waterloo.edu (Dave Forsey) (01/22/88)

>In article <1396@pixar.UUCP> flip@pixar.UUCP (Flip Philips) writes:
>
>	You have two eyes.  These can be thought of as two cameras into a
>world space, seperated horizontally by a fixed distance (2.5" typically).
>
>	As said before, both camera focus on the exact same point.  If they
>don't, the stereo effect will be diminished greatly.  The viewpoint (where
>the line of sight of the two cameras converge) will appear precisely on the
>surface of your screen.  All points between the viewpoint and the camera
>will appear to leap off the screen, and all those behind the viewpoint will
>sink back into the monitor.  As a personal preference, I gear all my 3D to
>appear behind the screen, as I have a hard time focusing on stuff leaping out.

By aiming the two cameras have you not forced the viewer to focus on
one specific part of the screen?  If the viewers actual focus wanders
to another part of the CRT, won't the visual information presented to
each eye be incorrect? When viewing a 3D still or movie, the centre of
attention may wander all over the screen, not just the part that the
cameraman has decided to focus on.

The cameras used for the 3D Imax film, "Transitions" shown at the
Vancouver expo, shot in parallel - partially to ensure that people
could look at any part of this 5-story tall screen and still get
a good visual effect. I believe (Dave Martindale can correct me on this),
that the computer generated portions were rendered with two "cameras"
aimed in parallel.

Another factor is that the movie screen is essentially at infinity as
far as the human eye is concerned. A CRT may not be. Perhaps this is why
Flip constructs his 3D-images with a focus point.

The visual effects of the Imax film were certainly impressive -
a balloon floated on top of the head of the person sitting in front of me,
and when the robot arm suddenly cracked an egg, myself, along with 3/4
of the audience, whipped their legs apart in an involuntary reflex to avoid
getting egg on their laps!

Dave Forsey
Computer Graphics Laboratory
University of Waterloo.

cosell@cosell.bbn.com (Bernie Cosell) (01/22/88)

I think that the current formulations (and transform matrices, etc) for
generating stereo pairs have it a bit wrong.  You should **NOT**
converge the two views you generate -- they should be from offset
perspective origins to be sure, but the two primary sight axes should
be _parallel_.  There is a LOT of info about this in the world of
stereo photography, where they have done lots of experiments in the
last 90 or so years.

From "The world of 3D, a practical guide to stereo photography" by
J G Ferwerda:
   Those without much experience with stereo often think that the lens
   axes while shooting the left and right image, should be trained somewhat
   `towards each other'.  For instance, while shooting a flowering shrub
   at a distance of 3 m, it seems obvious that in both cases a certain
   flower should be kept in the centre of the viewfinder for each shot.
   However, this is not the case.  Even if the subject that is to be taken
   is very near -- especially then -- the lens axes should not be
   trained `towards each other'.

A later chapter in the book discusses the sorts of distortions taht
arise if you DO converge the axes.
   __
  /  )                              Bernie Cosell
 /--<  _  __  __   o _              BBN Labs, Cambridge, MA 02238
/___/_(<_/ (_/) )_(_(<_             cosell@bbn.com

adam@lamont.Columbia.edu (adam levin) (01/22/88)

In article <5039@well.UUCP>, ewhac@well.UUCP (Leo 'Bols Ewhac' Schwab) writes:
...
> 	I'd suggest avoiding the red-blue strategy if you can, as the strong
> colors tend to give many people headaches.  If you have a short persistence
> interlaced display, look into the possibility of using occluding polarized
> glasses that flicker in sync with the display.  Full color images are much
...
> Leo L. Schwab -- The Guy in The Cape	ihnp4!ptsfa -\

I've seen these glasses sold for the Sega home video game.  Any thoughts on
interfacing them with popular personal computers?  Leo, care to write the
software for the Amiga version?  Or is this what you're using now?  : )
-Adam Levin

cfchiesa@bsu-cs.UUCP (Sir Xetwnk) (01/23/88)

In article <5039@well.UUCP>, ewhac@well.UUCP (Leo 'Bols Ewhac' Schwab) writes:
> In article <1396@pixar.UUCP> flip@pixar.UUCP (Flip Philips) writes:
> >In article <4615@tut.cis.ohio-state.edu> WAMBOLD@OSU-20 (Sandra Wambold) writes:
> >>Does anyone on this BB know the proper translations and rotations for
> >>interactive stereo viewing?  [ ... ]

   [lots of stuff about rotation, matrices, focal length, etc. deleted]
> 
> 	Depending on camera seperation, you might be able to get away with
> simply shearing the projected image along the projected X axis rather than
> actually rotating it (after projection into the viewing frustrum (sp?)).
> Computationally, this is a real time-saver.
> 

I sent E-Mail to Sandra after reading her original posting, saying pretty much
this same thing, although perhaps not so efficiently.  Just "adding more and
more 'binocular disparity' (or 'shear') between the images, proportionate to
the 'Z' ('into the screen') coordinate" works fine for me.  I got the idea 
from my father (currently the Technical Consultant for the Stereo Division of
the Photographic Society of America), who has created many "manufactured" 
stereo images over the years by precisely this method -- albeit with physical
objects rather than computer images...

  Chris Chiesa
     a.k.a.
  Sir Xetwnk

  Senior, CS Dept.
  Ball State University
  Muncie, IN 

870646c@aucs.UUCP (barry comer) (01/26/88)

There is a pair of glasses sold by Antic software for the Atari ST\Mega.
They contain an electric shutter in each side, these shutters are synced
with the screen to give a very impressive 3d effect.
later
Barry

dave@onfcanim.UUCP (Dave Martindale) (02/05/88)

Dave Forsey and Flip Philips have been discussing whether you converge
the two cameras in 3D, or whether you leave their axes parallel.

At least in the case of Transitions, the Expo '86 IMAX 3-D movie, sometimes
they did and sometimes they didn't.  There are tradeoffs.

Your eyes are used to converging and focusing at the same time.  You can
maintain this link in 3D only if the object you are looking at appears
at the same distance as the screen, with the rest of the scene extending
in front of and behind the screen - pretty limited.  However, your visual
system is pretty flexible, within limits, and you can actually present
scenes where the eyes focus separately from their convergence, provided
you don't try to have them converge *too* far, or try to make them
*diverge* rather than converge.

Good 3-D gives you the feeling of "being there", of seeing a real
three-dimensional environment.  For this to work, you eyes must be
able to roam around the environment without finding things that just
"don't work" to your visual system.  This also means that large depths
of field are necessary, requiring small lens apertures on the cameras
and lots of light.

In the real world, as your eyes roam around a scene, they change convergence
as they change focus, and the object being viewed is always at the point
where the eyes converge.  The cameras cannot do this, so convergence has
to be set to suit the subject matter of the scene.

In scenes that contain far-away objects, you almost always want the
cameras parallel, since that gives superimposed images on screen for the
far-distant objects.  The audience can thus look at the far objects
naturally, without strain.  If the cameras were converged, the eyes of
the audience would have to *diverge* to look at the far-away objects, which
most of us are not capable of.

However, really close objects then have a large offset between the two
images on screen, and it becomes impossible for some members of the
audience to converge their eyes enough to see both images simultaneously.
This effect is worst for people at the front of the theatre, since a given
linear displacement in the images translates to a larger angular displacement
for them.

So, in scenes where the focus of interest is quite close to the cameras,
the cameras are converged somewhat to reduce the on-screen displacement
and help out the audience.  This works fine if the scene is such that
there isn't any detail at infinity, or if you know the audience attention
is going to be riveted on the thing in the foreground (e.g. the aforementioned
egg hovering above the head of the person in front of you in the audience).

It's all illusion anyway - you can't reproduce mathematically correct
3D for more than one person in the audience anyway, so what you try for
is the best apparent 3-D for the most people simultaneously.
For example, when the egg breaks in Transitions, some people think it's
going to land in their lap, and some just watch it land on the head
of the person ahead of them without worrying about their own clothes.

Another example of this: the 3-D effect varies greatly with distance
from the projection screen.  A given angular displacement of objects
results in an apparent depth which is a particular fraction of the distance
between the viewer's eye and the screen.  This is true for differential
depth as well - an object which appears to be 1 meter deep to someone
at the front of the audience will appear 2 meters deep to someone at the
back, if they are twice as far from the screen.  Now, when you consider
that apparent height and width of objects is inversely proportional
to distance from screen but apparent depth is directly proportional to
distance, then you can see that the apparent depth-to-width ratio
of objects changes as the square of the viewing distance change.

Often, you brain compensates for this, since you *know* the proportions
of things, but sometimes it is very obvious.  In Transitions, there is
a scene where a small boy is asleep in bed.  From the front of the
theatre, the bed looks rather short compared to its width, but well it's
a child's bed so that's OK.  But from the back of the theatre, it looks
like the bed is about 15 feet long.

In practice, the 3D is usually computed so that things look "right" for
someone in the centre of the audience, and so people at the front see
compressed depth and people at the back see it exaggerated.  (This assumes,
of course, that the cinematographer or "3D consultant" understands the
mathematics of 3D at all - if they don't, who knows what you get).


I watched "Transitions" many times with the theatre empty, and found that
although the 3D looked more natural from the centre, I preferred either
the extreme front or extreme back of the audience seating.  From the
back, you get the most exaggerated 3D, and from the front you get the
most effect from the IMAX screen filling your field of view, towering
above you.  I remember one scene where two boys were shovelling wheat
in a truck, and I was afraid that they were going to bury me in it at
any moment.

	Dave Martindale

paul@torch.UUCP (Paul Andrews) (02/18/88)

There is a program for the Atari personal computer called Cad-3D 2 from 
a company called Antic. This uses interlaced polarised stereo glasses.

-Paul Andrews

ewhac@well.UUCP (Leo 'Bols Ewhac' Schwab) (02/22/88)

In article <56@torch.UUCP> paul@torch.UUCP (Paul Andrews) writes:
>There is a program for the Atari personal computer called Cad-3D 2 from 
>a company called Antic. This uses interlaced polarised stereo glasses.
>				   ^^^^^^^^^^ ?
	That's all well and good, except that the ST can't do interlace
video.  (It can't do overscan video 'neither.)

	The ST uses the same type of glasses that I've been developing for
on the Amiga.  They are electrically active occluding LCD glasses.  On a
signal from the computer, one of the lenses turns opaque, leaving the other
lens clear.  The computer holds the glasses in this state while the video
beam paints the appropriate picture (left or right eye image) on the screen.
When the video field is completed, the computer inverts the state of the
glasses, and displays the "other" image.  This synchronized dance is
repeated for every video field, and the user perceives stereo 3D.

	There are limitations to this approach, which are primarily flicker
and cross-ghosting (a ghost of the left image is visible to the right eye,
and vice-versa).  This problem can be substantially alleviated by placing
neutral grey filters over the lenses, avoiding direct ambient light on the
screen, and sitting in a darkened room.

_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_
Leo L. Schwab -- The Guy in The Cape	ihnp4!ptsfa -\
 \_ -_		Recumbent Bikes:	      dual ---> !{well,unicom}!ewhac
O----^o	      The Only Way To Fly.	      hplabs / (pronounced "AE-wack")
"Work FOR?  I don't work FOR anybody!  I'm just having fun."  -- The Doctor