Re: Shadows in the CAVE

New Message Reply Date view Thread view Subject view Author view

Marcin Romaszewicz (marcin++at++asmodean.engr.sgi.com)
Wed, 17 Nov 1999 11:33:30 -0800 (PST)


If you saw shadows then you must be using a projective spotlight since
performer only has code to generate shadows for this type of light.
Dynamic shadows are calculated like this:

1) Performer renders the scene from the point of view of the shadowing
   light source, using its frustum as the viewing frustum.
2) It reads back the depth buffer information into a texture
3) It sets up the texture matrix and texgen so that the shadow texture is
   projected using the same frustum as step 1.
4) The depthmap shadow extension is enabled, so that anything which is
   behind something else with respect to the light's line of sight will
   not be rendered.
5) The scene is rendered again, and due to step 4 you get shadows.

The light's frustum does not need to tightly fit your scene, but as the
shadow frustum gets larger, the area that a partcular object subtends in
that frustum gets smaller, meaning that the object will have a lower
resolution shadow and you'll see more jaggies at the shadow edges.

Given the information above, you can see why the field of view of a
projective light is constrained. It has to have a frustum based on which
to render the depthmap and project the depthmap onto the scene. The wider
that frustum, the worse the shadows look.

-- Marcin

On Wed, 17 Nov 1999, Athanasios Gaitatzes wrote:

>
> Well I took /usr/share/Performer/src/pguide/libpf/C/shadows.c to start
> with and removed everything that had to do with projected textures,
> spotlights included, and left only the shadow relevant code. It worked
> just fine creating a shadow for the iris.flt file. I even made the light
> that casts a shadow to be an infinite light (the code had it local) and
> it still worked. So as far as I can tell I don't need spot lights in my
> scene to create shadows.
> I need though to understand better the shadow frustum, and everywhere
> I've read it says it has to tightly fit the scene. So that's where my
> problem comes in with the continuously changing frustum of the CAVE.
>
> Can you explain your statement "the field of view of a projective shadow
> is constrained"
> Thanks for your help.
> --
> Athanasios Gaitatzes (gaitat++at++fhw.gr)
> Virtual Reality Department
> Foundation of the Hellenic World
> 38 Poulopoulou St., Athens 11851, Greece
> Tel: +30 1 3422292 Fax: +30 1 3422272
>
> .+-!L~0"r~zҹȨϢ)zg`)z>wߢ-


New Message Reply Date view Thread view Subject view Author view

This archive was generated by hypermail 2.0b2 on Wed Nov 17 1999 - 11:33:39 PST

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