Game Development Reference
In-Depth Information
Tips and Tricks
Again, in many of these steps we are dealing with bounced light that is a
Pro-only feature. If you are using standard Unity, add some extra lights to
simulate the bounced light.
Step 19: In the Hierarchy panel, select the Terrain. In the Inspector, turn off
Static.
Why?
The terrain is automatically set to Static, which means it's automatically
baked. To bake the terrain, a huge—and I mean huge—texture is created
(although it doesn't take up any of the texture space created with Unity's
generated lightmap UV). This means that baking the terrain is a long, long
process. In this situation, turning off the Terrain when baking will result
in several benefits. First, the scene will bake much faster. Second, we are
using detail meshes (the rocks), which don't bake; they simply inherit
the color value of the terrain beneath it. So, in spots where the terrain is
beneath the dock, the detail meshes will bake black. In the final version of
the game included on the web site ( http://www.Creating3dGames.com ),
the terrain is never baked (it just can't be seen well enough in the fog to
make baking worthwhile).
Step 20: Evaluate output. Open the Render Settings (Edit>Render
Settings) and reactivate Fog. Play the game and run around checking to
see how the baked solution is working (or not; Figure 7.29 ).
Figure 7.29 The in-game results
of the first rendering pass. Too much
shadow and the shadow is too crisp.
Step 21: Based upon the run-through, adjust the two Sun's settings and
rebake. Reanalyze and rebake. The settings that I finally liked for the Sun
were both Suns at Intensity = 0.15 (in the Inspector). The Baked Shadows
settings (in the Lightmapping Window/Object section) were Shadow
Samples = 100 and Shadow Angle = 45). Results are in Figure 7.30 .
Step 22: Examine critical locations and double-check that there is enough
light reaching these spots. For instance, the door that lets the player
into the facility was too dark on my bakes ( Figure 7.31 ), so an additional
spotlight was needed at a very low intensity (0.5). Look for these sorts of
areas on your version ( Figure 7.31 ).
Search WWH ::




Custom Search