Shadow Map Tutorial
Shadow maps are used in TrueSpace to achieve a more
realistic scene by generating shadows for objects in the scene that light acts
upon.
In this sample scene, a cube is sitting flat upon a
plane. From here we will add a
spotlight as a lighting fixture and cast a shadow upon the cube that will
appear on the plane beneath it.

- Click
and hold the Add Camera button, drag to the Add Spotlight button
and release. This will add a
spotlight to your scene.

- After
selecting the Add Spotlight button, the “Lights” panel will
open. With this panel, you can
adjust light color, light intensity, light falloff, and shadow
casting. By default, shadows are
not cast by newly created lights.

- Turn
on shadow mapping by selecting the lower right-hand button of the panel.
4. To configure shadow mapping, right-click on the same button you
just pressed to enable shadow mapping.
This will bring up the “Shadows” panel.

- Select
“Map” as your Shadow Type.
- With
the “Shadows” panel you may also adjust the shadow’s size and
sharpness. You may select Low,
Med(ium), or High as the size of your shadow under Shadowmap Size. You may also check the Image
Dependant box to make TrueSpace take the size of the object(s) light
is being shone on into effect when determining the size of the shadow
being cast.
- You may adjust the sharpness of a
shadow’s border under Shadowmap Sharpmess by selecting Low,
Med(ium), or High. Selecting Low
will cause the shadow’s edges to be very blurry, whereas selecting High
will cause the shadow’s edges to be very defined.
- At
this point, you may point the light in the direction you wish, if you
haven’t done so already. If you
render the scene using the Render Scene button, you will notice
that the light now casts a shadow on objects. You may return to the “Shadows” panel at any time as
described above to change the shadow’s settings to better suit your
project.

Returning to our rendered sample
scene, we can see that by following the steps in this tutorial, we have
successfully cast a shadow from a spotlight pointed at the cube onto the plane.
