Prev | Next


Shadows


Introduction

Shadow Maps

Depth Map Shadows

Deep Shadows

Ray-Traced Shadows


Introduction

Adding shadows is one of the most effective ways of adding realism to a computer-generated image. The human visual system uses shadows to determine depth, light location, and direction, as well as spatial relationships between objects. Additionally, shadows are invaluable for creating moods and motivating the emotion of an image or scene.

There are several types of shadows available with Pixar's RenderMan: depth map shadows, deep shadows, or ray-traced shadows. Each method has it own advantages. Shadow maps offer efficient shadow generation and a reusable resource. Deep Shadows are a feature-rich shadow map that combine the benefits of shadow maps with support for semi-transparent and motioned-blurred shadows. Ray-traced shadows offer greater ease of use, more features, and higher quality, but at the price of slower execution speed. What follows is a discussion of these three formats.

top


Shadow Maps

The basic idea behind shadow maps is simple. For each light that casts a shadow, a shadow map image must be rendered during a pre-pass. Each shadow map is rendered from the location of its respective light source. As an external resource, shadow maps can be reused, if light and object positions do not change. There are three types of shadow maps: depth maps, deep shadows, and soft shadows. All types generate shadow maps, but have their own features, as outlined below.


Depth Map Shadows

Overview
Depth map shadows produce good results in many situations. They are efficient but have a number of limitations (as outlined below). The basic idea is simple. For each light that casts a shadow, a shadow map image must be rendered during a pre-pass. Each shadow map is rendered from the location of its respective light source. The final result is shown in the image below. Each type of light creates distinctly characteristic shadows.

The image on the right is a depth map for the image of the teapot at the top of the page. This depth map was generated as a pre-pass before the final image was rendered. A depth map represents the distance from a specific light to the surfaces the light illuminates. A depth map contains depth info from a light's point of view. Each pixel in the depth map represents the distance from the light to the nearest shadow casting surface in a specific direction.

Limitations
Depth shadows have some limitations, which also make depth map shadows efficient by requiring less work on their part. As long as your shadows do not require the following effects, depth map shadows may suffice.

Set Up
The simplest way to get depth map shadows with RenderMan for Maya is to create a spot, point, or directional light in your scene. RenderMan for Maya will automatically generate shadow maps when Depth Map Shadows are enabled on a light. RenderMan uses the settings in the Render Globals as defaults for the depth map, these can be overridden on a per-light basis. Here's the number of depth maps required for each light source type:

Shadow Map Knobs
In the Render Globals Passes tab, you're able to configure the settings of your shadow maps. Here are some of the settings that are often configured on a shot by shot basis: 

top


Deep Shadows

Overview
Deep Shadows are a feature rich depth map shadow that support transparency and volumetric data. Deep shadows can also be pre-sampled. 

Deep Shadows with semi-transparent shadows

 

Same image rendered with Depth Map Shadows.

The inferiority of the Depth Map Shadow is clear.

Deep Shadow Benefits
Deep Shadows have the following advantages over traditional depth map shadows, advantages that make deep shadows ideal for fur, or when shadowing any collection of small, semi-transparent objects. 

Deep Shadow Features:

  1. Semi-transparent shadows
  2. Colored shadows
  3. Motion-blurred shadows
  4. Multi-sampling
  5. Far fewer animation artifacts than standard shadow maps
  6. Subtler, better-looking shadows than depth maps

Motion blurred teapot and shadows

Deep Shadow Cons
If deep shadows have a fault, it is that they store more data than standard shadow maps. This means larger files and increased render times. Deep Shadows should be used only when their benefits are useful and are not a replacement for traditional depth maps in general. Note however that by pre-filtering a deep shadow map a shadow map can be generated at a lower resolution than would be required by a traditional shadow map, which can mean that in some instances a lower resolution deep shadow map will render faster and require less disk space than an equivalent standard shadow map generated at a necessarily higher resolution.  

Deep Shadows Vs. Ray Tracing
Deep Shadows can create many effects that could be also be created via ray tracing. Creating these effects with deep shadows is generally much faster and more efficient than generating the same effect with ray tracing.

For more information see the Deep Shadow Tutorial

top


Ray-Traced Shadows

Overview
Light sources can ray trace shadows, and ray-traced shadows have several features that traditional depth map shadows lack. Traced shadows can be used to create soft shadows, colored shadows, and motion-blurred shadows. They are also resolution independent, unlike shadow maps. Ray-traced shadows, however, can be costly to render.  

Ray traced shadows offer these effects:

  1. Semi-transparent shadows
  2. Colored shadows
  3. Motion-blurred shadows
  4. Soft shadows

Blurred Shadows
Ray-traced shadows can create soft shadows. To create soft shadows just increase the amount of by increasing the Light Angle. The higher the value, the greater the blur (see images below). Blurred shadows usually demand a corresponding increase of the shadow "samples" ()to eliminate "dotty" artifacts.

Ray-Traced Shadow Knobs

Ray-Traced Shadow Examples

Light Radius 0.25   ~   Shadow Rays 1

Light Radius 0.25   ~   Shadow Rays 24

Light Radius 1.0   ~   Shadow Rays 1
 

Light Radius 1.0   ~   Shadow Rays 24

top


Prev | Next


 

 

Pixar Animation Studios
Copyright© Pixar. All rights reserved.
Pixar® and RenderMan® are registered trademarks of Pixar.
All other trademarks are the properties of their respective holders.