Shadow Map shader settings
 
 
 

The Shadow Map shader settings govern the use of shadow maps in the shader.

Map shaders take a “snapshot” of the scene at the moment it is rendered, and applies it to an object as a Shadow Map texture.

Map examples A. Created map B. Scene with the shadow map applied to the floor plane.

The Shadow Map shader is a useful alternative to live shaders as they do not demand much of the system’s resources to display. Use the Shadow Map shader to apply a shadow image to an object or a plane.

Map Type menu

The Map type menu lets you create textures that appear in the Texture settings when you generate a map. The resulting texture depends on the shadow type that you choose.

For more on Map textures, see Image Map textures.

Shadow Map option

The Shadow Map selection creates a texture combining all shaders, materials, textures, and lights applied to your model. Shadow Map is faster but less accurate than Light Map.

Light Map option

The Light Map selection creates a texture using only the lights in your scene. Other textures, materials, and shaders do not affect the Light Map texture. It is best to use this option with another shader to add a more realistic color to the object.

Contrast slider

The Contrast slider lets you manipulate the contrast of shadow to the surrounding plane. Contrast must be set before the map is generated. You cannot modify the contrast after generating the map, unless you regenerate the map. The default intensity is 70%.

Generate Map For menu

Use the Generate Map For menu to select the objects on which you would like to generate a shadow map.

Model Casting Shadows field

The Models Casting Shadows field lists all the objects in your scene that cast shadows. You can also click the Models Casting Shadows button next to the field to display the Asset list, where you can choose from models in your scene.

The Models Casting Shadows area lists all the models in your scene that can produce shadows. If you want an object to cast shadows on a plane that uses the Shadow Map shader, select and Alt-drag each object into this field.

If the Asset list shows the Scene with a check mark next to it, all objects in your scene cast shadows.

Generate Map For menu

The Generate Map For menu lets you choose the models for which you want to create maps. You can select All Models or Selected Shaded models.

File Path field

The File path field lets you specify the path used for the file as well as save the generated map to disk as a texture file. The default path is C:\temp.

You can only save maps that are generated using the Generate Map For button. Define a Save Map Path before generating a map.

Map Size settings

You can choose to use the size of the texture (if there is a texture applied to the selected object) or you can use the size of the map as defined in Map Size. This option is only available with the Spherical Map and Sphere Map.

X and Y menu

The X and Y menus let you choose the size (in pixels) of the generated map. The default is 128 x 128.

There is a higher resolution, a longer generation waiting period, and a greater memory requirement with a larger map size.

Preview Map button

Click Preview Map to generate a preview map for all or selected objects with the Shadow Map shader applied. Use this option to quickly generate a low resolution map, so that you can preview the result of the Shadow Map shader.

Use the Generate Preview Map option with the adjacent menu. This lets you choose between generating the map for all objects or only selected shaded objects in your scene.

Generate Map button

Click Generate Map to generate a full resolution map of all or selected objects with the Shadow Map shader applied.

Use the Generate Map button with the adjacent menu to select between generating the map for all objects or only selected shaded objects. The shadow map cannot be generated unless the Save Map Path is valid.

Lights Producing Shadows field

Alt-drag any lights in your scene that you want to have cast shadows into the Lights Producing Shadows field. You can also click the Lights Producing Shadows button next to the field to display the Asset list, where you can choose from lights used in your scene.

The Lights Producing Shadows area lists all the lights in your scene that produce shadows. If you want a light to produce shadows on a plane that uses the Shadow Map shader, select and Alt-drag each light into this list.

If the Asset list shows Lights with a check mark next to it, all lights in your scene will produce shadows.

Cast Light On/Off buttons

The Cast Light On and Cast Light Off buttons are shortcuts to the Cast Light On Object button in the Lights settings. Click these buttons to globally change the settings for all lights in the Lights Producing Shadows list without modifying each light separately in the Light settings.