Game Development Reference
Figure 2.12 Because of the
depth mattes we've created,
Paavo is now in between
the table and the garage wall.
controls, select the Invert checkbox. This causes everything that
was hidden to be revealed and vice versa. Now, Paavo appears to
be right in between the table and the back wall, right where we
want him. If this had been a regular still image, this job would have
been much more challenging and time consuming (Fig. 2.12).
The Depth of Field Effect
Depth of fi eld is a beautiful thing. It is a blur effect created by a
camera lens at different depths. It might as well have been called
“depth blur.” Depth of fi eld is used to focus a viewer's attention on
a subject, by blurring out details they should be ignoring (Fig. 2.13).
Depth of fi eld is a very natural effect because our eyes essen-
tially do the same thing. Focus your eyes on something that is
close to you—perhaps this topic. Everything behind seems to
blur away and recede into the distance. Now focus on something
far away. The topic seems to become blurry.
Depth of fi eld is also benefi cial because it helps make video
look more like fi lm. If you look at video footage, it will often have
a complete lack of depth of fi eld with all depth levels in perfect
focus. This doesn't seem as natural because it's not the way our
eyes work, and it's not what we're accustomed to seeing in fi lm.
The Depth of Field effect here in After Effects attempts to rec-
reate a natural depth of fi eld by using the depth information in
the 3D channel data. To see this in action, open up the 3D.aep
project from the Chapter 2 folder of the exercise fi les. Apply the
Depth of Field effect to the layer of this garage scene. The default
settings don't create a blur right off the bat. We need to do some
setup fi rst. First, let's change the Maximum Radius value to 3.