Creating Volumic Shadow Maps

 
 
 

Volumic shadow maps, are similar to regular shadow maps, but store more detail. Instead of simply storing the distance from the light to the first object hit, the volumic shadow map algorithm raymarches through the scene from the light's origin until it hits a fully opaque object. Along the way it stores changes in light color or intensity along with the depth at which the change occurred. Volumic shadow maps are typically used when rendering shadows for geometry hair.

A

Regular shadow-mapped shadow of hair.

B

Volumic shadow-mapped shadow of hair.

To activate volumic shadow maps

  1. Follow steps 1 to 7 of the previous procedure, To create shadow-mapped shadows.

  2. Activate the Use Volumic Shadow Maps option.

  3. Adjust the Sub-Samples value to controls the oversampling of each pixel of the shadow map.

    The value specifies the size of the oversampling rectangle in N x N sub-pixels. For example, if Samples is set to 3, nine samples are taken, per shadow map pixel.

  4. Adjust the Step Size to set the accuracy of the volumic shadow map. The Step Size determines how far apart along the same shadow "ray", samples are taken to test for the nearest shadow-casting object. Step Size is a distance measure that is expressed in scene units.

    When Step Size is 0 (default), mental ray calculates the volumic shadow map using a step size of 1/1000th of the scene's bounding volume. If your scene has a very large bounding volume in relation to the object or character for which you want to generate a shadow map, then the default value of 0 may not be sufficient to produce an accurate shadow.

    If this is the case, set the Step Size to something more realistic for the scale of the shadow-casting objects in your scene. Play around with different values until you get the shadow effect that you need. Keep in mind that if the Step Size is too large the calculations may "jump" over parts of your character that require a shadow. If the Step Size is too small, you will see no visible difference in the shadow effect but the additional samples taken will unnecessarily increase processing time.

  5. Choose one of the following Shadow Type settings:

    • Intensity Only: Only changes in intensity are stored in the shadow map, resulting in just grayscale shadows.

    • Full Color: Changes in color are stored in the shadow map. Color sampling has a higher memory overhead than just intensity sampling, but allows for full-color shadows.

  6. Continue with steps 8 to 12 of the previous procedure, To create shadow-mapped shadows.

Creative Commons License Except where otherwise noted, this work is licensed under a Creative Commons Attribution-NonCommercial-ShareAlike 3.0 Unported License