Game Development Reference
In-Depth Information
Figure 7.16 Spotlight with its handles.
Figure 7.17 Directional light casting
shadows. Notice that the light is
beneath the roof, but the shadows
indicate the illumination coming from
above it.
light is doing. Notice that the actual light source is underneath the roof, yet the
shadows indicate that the light source is above the roof. What gives?
The core idea here is that directional lights (like directional lights in Maya)
come from infinitely far away and throw an infinite distance (with parallel
rays). This means that the angle of the light is more important than its physical
location. It can sit anywhere in the world, but the light will still come from far
away in the sky. This is why there are no Range Handles in the Scene window
or Range settings in the Inspector.
The most obvious use for directional lights is as the sun. They quickly light
everything in the scene. This also brings up other challenges though. If you're
using Unity Pro, the shadows that a directional light casts (by default) can
seem to be of really poor quality ( Figure 7.18 ).
Shadows
Since understanding shadows is an important part of fine-tuning the visual
quality of the game, it's worthwhile to take a bit of time out here and talk
about how Unity deals with the shadows it draws. In Figure 7.18 it's easy to
Search WWH ::




Custom Search