Game Development Reference
In-Depth Information
Figure 7.23 Settings that make the
real-time shadows appropriate for this
scene (they could all be different for a
different scene with different lengths
of visible distance.
Clear Day Lighting
Exterior lighting can be some of the easiest to make happen in Unity. At its
core, outdoor lighting has one key light—the sun—and a lot of bounced
light. Because Beast uses a radiosity-like engine, the light bounce will be
automatically calculated during baking. However, before baking we need to
quickly light the scene and look for any holes.
Often with scenes like this, when the game calls for subdued lighting, getting
the lighting right, and seeing flaws in the model and lighting design, can be
tricky with a first pass. By lighting for a clear day, it can be easier to see any
problems before trying to finesse in the foggy lighting situation.
Step 1: Turn the Ambient Light off. Open Render Settings
(Edit>Render Settings) and click the color swatch next to Ambient
Light. Turn it to black.
Why?
In the same way that Ambient light provided a quick look at the set,
turning it off entirely will help to illustrate exactly what the light is doing
in the scene. It will likely be reactivated, though at a much lower intensity
later, but we need to see what the light is doing to the scene without this
everywhere and nowhere light always lighting surfaces.
Step 2: Create and orient a Directional light. GameObject>Create
Other>Directional Light will create a Directional light GameObject in the
Hierarchy panel and in the Scene window. Its placement may be strange, so
move it up into the sky (more as an intuitive place to go find it later) and rotate
it so it is pointing down on the scene. The exact rotation and angle is not
important, as long as it is illuminating the scene. Name the GameObject Sun .
Baking
Step 3: Enable shadows for baked textures. If using Unity Pro, select Sun and
in the Inspector turn the Shadow Type to Hard Shadows. Behind the scenes,
this will make sure that when the scene is baked it will include the shadows.
If you are using Unity (Standard), Shadow Type may be grayed out since
real-time shadows are a Unity Pro feature (or, when you try to activate
Search WWH ::




Custom Search