Selections: The Key to Compositing
122
Masks
Although hand-created and animated for the most part, masks open up all kinds of possibilities in After Effects.
Masks are the principal method for defining transparency regions in a clip without regard to actual pixels
because they are vector shapes. This section lays down the basics for smart use of masks.
Typical Mask Workflow
There are three tools for creating masks: two basic shape tools and the Pen. To activate the Rectangular Mask
tool, use the keyboard shortcut Q; press Q again to toggle the tool to the Elliptical Mask tool. If your mask
doesnt conform well to a rectangle or an ellipse, you can draw it point by point with the Pen tool (G).
Tip
If youre looking for other common primitive mask shapesa rectangle with rounded corners, a
hexagon, or the likeyou may be best off drawing the shape in Adobe Illustrator (if you have it),
then copying and pasting it. This, however, will not work unless the preferences in Illustrator are set
properly. Under Illustrators File Handling & Clipboard preference, choose AICB with Preserve Paths
checked. This is not the default. You can also select and copy paths in Photoshop for use as masks.
Whether you draw the mask in the Composition panel or the Layer window is up to you. It is somewhere
between difficult and impossible to draw or see a mask accurately in the Composition panel if, say, the layer
was offset and rotated in 3D space, but if you want to see the layer over its background, the Composition panel
must at least be visible. Given sufficient monitor space, an ideal compromise is to keep both windows open
side by side, working in the Layer window and watching the Composition panel for live updates.
Remember that your target shape doesnt have to be an ellipse to benefit from starting by drawing an ellipse.
Indeed, if the shape calls for a perfectly circular curve on one side, you might do well to draw an ellipse (holding
down Shift to make it perfectly circular) and then editing other sides of it with the Pen tool.
When drawing a rectangle or ellipse
Double-click the Mask tool (in the Tools palette) to set the boundaries of the mask to match those of the layer.
Use Shift to constrain the shape and/or Ctrl/Cmd to draw the shape from the center rather than from a corner.
Try the Mask Shape dialog for those rare cases in which you must set the boundaries to exact dimensions
and cant do it visually. Although this dialogs use is quite limited, you access it by clicking the underlined
word Shape under Mask options (highlight the layer and click M to reveal it).
Double-click a point on the shape to activate Free Transform mode, which enables you to offset, rotate, or
scale the entire mask shape (Figure 3.13). As always, hold down Shift to keep the scale proportional, snap
the rotation to 45 degree increments, or constrain movement to one axis.
Selections: The Key to Compositing
123
Figure 3.13. Flipping a custom mask symmetrically on one axis is no easy trick in
After Effects. Holding down the Shift key scales both axes proportionally, flipping it
on both axes. Instead, with View > Show Grid enabled and View Snap to Grid turned
on, double-click the Rectangular Mask tool to create a second mask that is the size
of the layer. Select both masks in the Timeline, and double-click a point on one of
the masks to set the Free Transform tool. Now drag the handles at either side of the
image and swap their positions, deleting the layer-sized mask when you’re done.
Highlighting a layer with a mask and pressing MM (the M key twice in rapid succession) reveals the full Mask
options for that layer. Some tips for those include
Feather is set for the entire mask and operates in both directions (to the inside and outside of the mask shape);
there is no way around these defaults. All kinds of lighting, smoke, and glow effects can begin with a masked
solid that is heavily feathered. In other words, the feather setting is approximately half the width of the mask
at its narrowest crossing, meaning the masked solid is now a big, soft gradient (Figure 3.14).

Get Adobe After Effects 7.0 Studio Techniques now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.