[mailto:don_burns++at++peru.engr.sgi.com]
Thu, 16 Sep 1999 14:13:29 -0400
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
This archive was generated by hypermail 2.0b2 on Thu Sep 16 1999 - 11:12:35 PDT