Angus Dorbie (dorbie++at++sgi.com)
Thu, 16 Sep 1999 11:27:10 -0700
Cheers,Angus.
Yohan Baillot wrote:
>
> Don,
>
> here I attached a picture to explain myself more clearly
> The drawing represent a top view of a cave-like display
> with a user looking slightly on the left of the front screen.
> The virtual object (the cube) must be projected in E and F
> since the view point is in V. The frustrum is basically
> defined by AVB. But AV is not equal to VB and thus
> pfMakePerpectiveFrustum cannot work. Do we have to search
> for C ( such as CB is perpendicular to the viewing direction)
> and use this function or do we have another function available
> in pf?
>
> thanks
>
> Yohan
>
> -----Original Message-----
> From: Don Burns [mailto:don_burns++at++peru.engr.sgi.com]
> Sent: Thursday, September 16, 1999 12:45 PM
> To: Yohan Baillot
> Subject: Re: stereoscopic CAVE rendering in Performer
>
> On Sep 16, 12:13pm, Yohan Baillot wrote:
> > Subject: stereoscopic CAVE rendering in Performer
> > Hello pfPeople,
> >
> > We were thinking about the special case of rendering where the viewpoint
> > is not fixed with respect to the projection screen. In the case of the
> CAVE,
> > not only the projection axis may be not centered on the middle of the
> > projection
> > screen but the viewving direction is also not perpendicular to each
> > projection screen.
> > The use of pfMakeFrustrum allows to off axis projection but consider the
> > user is
> > looking perpendicularly to the screen. In a general case I case I would
> need
> > to
> > specify the four corners'coordinates of my projection screen in eye
> > coordinates.
> > Is there such capabilities in Performer. If not, it is certainly possible
> to
> > generate the
> > projection Matrix given four coordinates of a projection screen to built a
> > frustrum.
> > Anybody knowns about some work done on that?
> >
> > Thanks
> >
> > Yohan
> >-- End of excerpt from Yohan Baillot
>
> Yohan,
>
> Actually, specifying the four corners of your projection screen is not
> really
> what you want to do. The simplest way to do this is to do a
> post-translation
> of the projection matrix, but this messes Performer up in that no Frustum is
> defined, and thus, Cull gets confused.
>
> So the next method is to find what is the left, right, bottom and top of
> your
> viewing frustum in the following way:
>
> near = the distance from the plane defined by your projection screen.
> hfov = horizontal field of view
> vfov = vertical field of view
> width = 2 * near * tan(hfov)
> height = 2 * near * tan(vfov)
>
> Now, picture that the projection screen is directly in front and
> perpendicular
> to the eyepoint. Now move it along its plane until it is positioned with
> the
> desired viewing angle.
>
> m = number of full screen widths you have moved the screen
> n = number of full screen heights you have moved the screen
>
> So, if the screen moved one full screen width to the left, m = -1. If it
> moved
> half a width, m = -0.5 and so forth.
>
> Here's the magic formula:
>
> left = width * (-0.5 + m)
> right = width * ( 0.5 + m)
> bottom = height * (-0.5 + n)
> top = height * (-0.5 + n)
>
> -don
>
> ------------------------------------------------------------------------
> Name: Doc.doc
> Doc.doc Type: Microsoft Word Document (application/msword)
> Encoding: base64
--
"One of the best-known folk theorems of software engineering is that
60% to 75% of conventional software projects are either never
completed or rejected by their intended users. If that range is
anywhere near true (and I've never met a manager of any experience
who disputes it) then more projects than not are being aimed at goals
which are either (a) not realistically attainable, or (b) just plain
wrong."
Eric S. Raymond - The Cathedral and The Bazaar
For advanced 3D graphics Performer + OpenGL based examples and tutors:
http://www.dorbie.com/
This archive was generated by hypermail 2.0b2 on Thu Sep 16 1999 - 11:27:15 PDT