Game Development Reference
well at enhancing the realism of a 3D scene, but the lack of quality
in the method used to create the fog is a little disappointing.
To see what this puppy does, open up the Fog 3D.aep project
from the Chapter 2 folder. Apply the Fog 3D effect to the garage_
zoom0170.rpf layer. The default results turn our entire layer
white. To see what the Fog 3D effect is trying to do, adjust the Fog
Start Depth value to about −150 and the Fog End Depth value to
about −300. This sets the range of fog, and everything behind this
is also covered in fog. As with other depth-based effects in this
chapter, when this effect is selected in the Effect Controls panel,
you can click in the Composition panel to have the Z-depth of an
object displayed in the Info panel.
The default results really aren't very foggy. The only thing I can
imagine using this effect for is for an apocalyptic nuclear explo-
sion (Fig. 2.19).
Figure 2.19 The Fog 3D effect
after adjusting the fog starting
and ending points.
Thankfully, the Fog 3D allows you to use another layer as a
gradient for the 3D fog. We're going to use the other layer in this
comp, which is a layer of precomposed fractal fog, created with
the Fractal Noise effect. It's important that it is precomposed
or the Fog 3D effect will not be able to use the textures generated
by the Fractal Noise effect (Fig. 2.20).
To use this fractal fog layer as the pattern for our 3D fog, select
the PRECOMP fractal noise layer from the Gradient Layer drop
down in the Fog 3D effect options in the Effect Controls panel.
Make sure the visibility of the fractal fog layer itself is turned off.
To blend the layer selected in the Gradient Layer drop down into
the Fog 3D effect, increase the Layer Contribution value. I took
the Layer Contribution value to 60 (Fig. 2.21).