From: Angus Dorbie (dorbie++at++sgi.com)
Date: 02/27/2001 19:09:52
Bad projection (and bad stereo it's less forgiving cousin) is probably
one of the most common 3D programming sins. It is your viewing
relationship with the display which should determine the projection
matrix or field of view in simple cases.
The key to getting it right is therefore to examine the viewers
relationship to the display. Correct stereo merely extends this to treat
the eyes as having a different & independent relationship with the
display.
For stereo on a desktop monitor this will inevitably require asymmetric
frusta, time for some ascii art :-) View with a fixed width font.
Look at the display diagram below, you can see that the left & right
eyes are in a different positions, this obviously requires a modelview
translation to position the eyes correctly (which infact scales your
world, scale matters in stereo), but the diagram also shows that the
projection matrix is affected by the position of the eye and must be
based on the projection the eye makes with the display, the arrows
pointing towards the screen ate the view vectors, these are always
orthogonal to the plane of the display and therefore parallel with each
other (definitely no rotation involved).
Display-> ______________________________
\\_ /|
\ \_ / |
\ \_ / |
\ \_ / |
\ \_ / |
\ \_ / |
\ \_ / |
\ \_ / |
\ \_ / |
\ \_ |
\ ^ / \_ ^
\ | / \_ |
\ | / \_ |
\ / \_ |
\/ \|
Left Eye--++at++ ++at++--Right Eye
Cheers,Angus.
"K. Chugh" wrote:
>
> hi everyone. i am trying to create a simple stereo app. i want a
> sphere to appear as if it's in front of the screen (between the screen
> and the user). in performer, i can adjust the following things:
> inter-ocular distance,focal length, fov, location and orientation of the
> camera, and location and orientation of the sphere. i have tried every
> possible combination i can think of, but the sphere always looks like
> it's behind the screen. i'm using two pfChannels for stereo. the way i
> understand it is that in order for the object to appear in front of the
> screen, the view plane has to be behind the object. but, i don't see
> what the view plane is in perfomer - is it the focal length? any ideas
> on how to accomplish what i'm trying to accomplish?
>
> thanks,
> kevin
>
> --
> Kevin P. Chugh, Ph.D.
> Research Associate
> NYSCEDII
> New York State Center for Engineering Design and Industral Innovation
> http://www.nyscedii.buffalo.edu
> E-mail: chugh++at++buffalo.edu
> Postal Mail:
> 5 Norton Hall
> SUNY at Buffalo
> Amherst, NY 14260
> Phone: (716) 645-2685 ext. 104
> Fax: (716) 645-2684
>
> -----------------------------------------------------------------------
> List Archives, FAQ, FTP: http://www.sgi.com/software/performer/
> Open Development Project: http://oss.sgi.com/projects/performer/
> Submissions: info-performer++at++sgi.com
> Admin. requests: info-performer-request++at++sgi.com
-- For Performer+OpenGL tutorials http://www.dorbie.com/"Whenever there is a conflict between human rights and property rights, human rights must prevail." --Abraham Lincoln
This archive was generated by hypermail 2b29 : Tue Feb 27 2001 - 19:41:54 PST