Re: stereoscopic CAVE rendering in Performer

New Message Reply Date view Thread view Subject view Author view

Don Burns (don_burns++at++peru.engr.sgi.com)
Thu, 16 Sep 1999 09:47:01 -0700 (PDT)


In-Reply-To: "Yohan Baillot" <baillot++at++ait.nrl.navy.mil>
        "stereoscopic CAVE rendering in Performer" (Sep 16, 12:13pm)
X-Mailer: Z-Mail (3.2.3 08feb96 MediaMail)

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


New Message Reply Date view Thread view Subject view Author view

This archive was generated by hypermail 2.0b2 on Thu Sep 16 1999 - 09:47:04 PDT

This message has been cleansed for anti-spam protection. Replace '++at++' in any mail addresses with the '@' symbol.