Game Development Reference
In-Depth Information
Distance can be changed quickly and interactively and allow you to dial up or
down until it works best in the game.
Foggy Day
In the Sunny Day section, the goal was to see how nice bounced light and
shadows could be created via Unity's Lightmapping capabilities. Although it
was a fun exploration, it isn't what the game calls for. So, for this section we
will look at how to light the scene for the foggy situation.
First, take a look at a bit of research to understand how fog affects lighting. A quick
Google Images search for “foggy park” or “foggy day” reveals a plethora of images
that show some interesting things happening with shadows. While there is often
a blobby shadow beneath objects, the shadow is quite soft, and it is very difficult
to see where the sun is coming from. The fog just diffuses the light too much.
The next few steps will attempt to mimic this visual effect.
Step 12: Turn the Sun straight down. Select the Sun GameObject and in
the Inspector change the Rotation X = 90 with Y and Z both equal to 0 .
Why?
Turning the Sun straight down will make all the shadows be right beneath
the objects, just like in the research.
Step 13: Change the Sun's shadows to Soft. Still in the Inspector for the
Sun, change the Shadow Type drop-down menu to Soft Shadows.
Why?
Again, we are after soft, blobby shadows. This step alone won't soften the
shadows sufficiently, but will get us closer.
Step 14: Reduce the Shadow Strength. If using Unity Pro, still in the Inspector,
right beneath the Shadow Type, change the Strength setting to 0.5 .
Why?
A shadow strength of 1 creates a solid black shadow (absent any bounced
light or other lights to diffuse the shadow). Since in this case, the ground
should show some shadows, but very diluted shadows, turning the
Shadow strength down will help provide much gentler shadows.
Tips and Tricks
This trick of changing the shadow color to a value less than 1 can be a
nice solution for even sunny days because it can allow areas that are deep
in the recesses of a covering not to be completely covered by thick black
shadows.
Search WWH ::




Custom Search