2012

Table Of Contents
Use Shadows in Rendering
With shadows, you can create rendered images that have greater depth and
realism.
The renderer can generate shadows by shadow mapping or by ray tracing.
Shadow mapped shadows rely on a bitmap that the renderer generates during
a pre-rendering pass of the scene. Shadow mapping provide softer edges and
can require less calculation time than ray-traced shadows, but are less accurate.
Ray tracing traces the path of rays sampled from the light source. Shadows
appear where rays have been blocked by objects. Ray-traced shadows have
more accurate, hard edges and require more calculation time.
Shadow-Mapped Shadows
Shadow maps are the only way to generate soft-edged shadows, but they do
not show the color cast by transparent or translucent objects. Shadow-mapped
shadows are calculated faster than ray-traced shadows.
The following example shows how shadow maps produce softer, less precise
shadows that are processed faster than raytraced shadows.
During a pre-rendering pass, a shadow map bitmap is created. Shadow quality
can be controlled by increasing or decreasing the size of the shadow map. The
default shadow map size is 256 x 256 pixels. If the shadow appears to be too
grainy, increasing the map size will give you better quality. Shadow mapped
shadows should not be used if you have a light shining through a transparent
surface (for example, a multi-pane window where you want the the frame and
mullions to cast shadows). Youd have to remove the glass in order for the
mullions to cast shadows.
2268 | Chapter 46 Render 3D Objects for Realism