Forum: Poser - OFFICIAL


Subject: Adjusting Shadow Map Size -vs- Shadow Cam views

Nance opened this issue on Oct 11, 2002 ยท 9 posts


Nance posted Fri, 11 October 2002 at 12:43 AM

Haven't tried explaining this in a while so here goes again.

While it is often recommended, and commonly accepted, that adjusting a lights ShadowMap Size will clear up most fuzzy or disappearing shadows, this is actually very misleading information.

At the risk of further spitting in the wind, may I once again suggest that adjusting the shadow map size will only be successful in limited situations. By far, the major controlling factor in determining shadow resolution for a given light setting is each lights ShadowCams field of view, NOT the overall size of the shadow map.

Now, before relating how many times its worked for you, just try to fix this simple example where it does not:

-Load a scene with the Factory Default Preferences (so we can all start the demonstration from the same place) .

-Turn on the Ground and zoom the Main Camera back until you can see the figures feet.

-Turn off lights #1 and #3 so that only #2 remains on, and change it to a Spotlight .

-Move Light 2 four units, up, out & left and adjust the rotations, so that it is hitting the guy from the front, top, left with these settings:

Angle Start 0
Angle End 70
Dist Start 0
Dist End 0
shadowStrength 1
MapSize 256
xrot -35
yrot -45
zrot 0
scale 1
RED 0.7813
GREEN 0.8086
BLUE 0.7578
INTENSITY 1
xtran -4.000
ytran 4.000
ztran 4.000

Although this represents a fairly typical light placement, without changing anything else, you can adjust the Shadow Map Size to your hearts content and you are still never going to get the sharp edged shadow as shown in the image above, or any shadow at all. (I tried map sizes up to 10,000 pixels)

To actually get a shadow, go to the Shadow Lite 2 Cam, and Zoom/Scale it from 100% to 8%.

Try the render again, and you can even set the Light 2 Shadow map size back down to something simple like 256. (Remember, you have to square the maps dimensions, so a shadow map set at 10,000 requires over 1500 times the system resources of one set at 256).

Hopefully (this time) this example clearly demonstrates that the ShadowMap size is by far secondary to the ShadowCam View in the control of shadows. Its just logical that the total number of pixels in the map size is much less important than the number of pixels in that map that are actually covering the objects that need to cast shadows.

Yet, we still regularly see nubies being told that all they have to do is increase the map size and the shadows will reappear -- with never (that Ive seen) any mention of manipulating the lights Shadow Cam views.

Having banged the drum on this for some time (to no avail), I'm just curious if perhaps Ive explained it really poorly, or if the results are simply not repeatable for the rest of you guys. (or if its just a big practical joke on olNance)

Anyone NOT able to get the same results?