Return-Path: <strauss@aero.org>
Received: from aerospace.aero.org by antares.aero.org (4.1/AMS-1.0)
	id AA11918 for  /u/strauss/bin/mail_handler.pl strauss; Tue, 15 Dec 92 15:16:59 PST
Received: from antares.aero.org by aerospace.aero.org with SMTP (5.65c/6.0.GT)
	id AA04929 for strauss@antares.aero.org; Tue, 15 Dec 1992 15:16:57 -0800
Posted-Date: Tue, 15 Dec 92 15:16:54 -0800
Message-Id: <199212152316.AA04929@aerospace.aero.org>
Received: from shere-khan.aero.org by antares.aero.org (4.1/AMS-1.0)
	id AA11915 for rman@aero.org; Tue, 15 Dec 92 15:16:55 PST
To: rman@aero.org
Subject: Re: Shadows according to LightSource Type
Date: Tue, 15 Dec 92 15:16:54 -0800
From: Daryll Strauss <strauss@aero.org>


I received a couple of good email replies to my query about the correct
way to generate shadow maps under RenderMan. One response was from
Andrew Woo <awoo@alias.com> and one from Stephen F. May
<smay@cgrg.ohio-state.edu>

The Z-File for a spotlight should be rendered as perspective rendering.
The reason is that the light from a spot is not parallel as it is from a
distant light. You should also limit the field of view for the rendered
scene to be the same as the spread of the spot light.

Point light sources are troublesome because they case shadows in a full
360 degrees. You need six shadow maps (one for each face as with an
environment map) to handle all the shadows for a point light source. I
would also expect that you would render the shadow scenes for a point
light as perspective for the same reason as the spot. The showpoint
shader takes six shadow files as arguments.

Two other tips that emerged are that you must be sure that the shadow
scene covers all the shadows that will be visible in the regular
rendered image. For distant lights, that means you have to set your
ScreenWindow and for spot lights you need to set your field of view.
Second, your shadow map needs to be sized by a power of two. Another
person on the list ran into this problem as well.

I hope this helps other people out there. It has been very informative
for me.

						- |Daryll



