Putting masks in motion for visual effects work is also known as rotoscoping and is covered in greater depth in Chapter 7. Preceding that, consider this overview of some things to pay attention to when putting a mask in motion.
Interpolation Basics
You can set a temporal ease on a mask keyframe (and adjust it in the Graph Editor), but there is no corresponding spatial curve to adjust, as there is with Position keyframes. Each point will travel in a linear fashion to its next keyframed position. Thus in order to precisely mask an object traveling in an arc, you must set many more keyframes than for an object traveling in a single direction.
The real bummer about mask keyframes is that you can't select a group of them and translate the mask; as soon as you move, rotate, or scale it, your selection snaps to the current keyframe only.
There is a workaround. You can duplicate the layer being masked and use it as an alpha track matte for an unmasked source of the same layer, in which case you're free to transform (or even motion track) the duplicate using the normal layer transforms. It's not a perfect solution by any means, but it is often useful and hardly anyone thinks of it.
Moving, Copying, Pasting, and Masks
You can freely copy a mask shape from one source (a different mask, a different keyframe in the same mask animation, Illustrator, or Photoshop) and paste it into an existing mask channel, where it takes the place of the Mask Shape. You should, however, note some rather strict situational rules:
In all cases, if the target layer is a different size or dimension from the source, the mask stretches to maintain its relationship to the layer boundaries.
In many situations, pasting Mask Shape keyframes blindly in this manner is not what you're after, but a rather obscure feature in the Layer window will help you. The Target pulldown along the bottom of the window has a unique function: When you choose an existing mask as the target, you can start drawing a new mask anywhere in frame and it will replace the shape in the target mask layer (Figure 3.21).
Figure 3.21. This pull-down menu along the bottom of the Layer panel makes it easy to create a new mask shape that replaces the shape in the target mask. If the target mask has keyframes, After Effects creates a new keyframe wherever the new shape is drawn.
First Vertex
When pasting in shapes or radically changing the existing mask by adding and deleting points, you may run into difficulty lining up the points. Hidden away in the Layer > Mask (or mask context) menu, and available only with a single vertex of the mask selected, is the Set First Vertex command. If your mask points twist around to the wrong point during an interpolation, setting the First Vertex to two points that definitely correspond should help straighten things out. This also can be imperative for effects that rely on mask shapes, such as the Reshape tool (described in Chapter 7).
Notes
Smart Mask Interpolation (available via a panel in the Window menu) is designed to smooth transitions between two radically different shapes. It's useful for stylized motion graphics of detailed masks transitioning from one to the next, but less useful for effects masking and rotoscoping because it's a bit too automated. The result, although sometimes pleasing, doesn't usually obviate the need to more carefully keyframe an accurate mask transition.
Blending Modes The Real Deal |
Section I. Working Foundations
The 7.0 Workflow
The Timeline
Selections: The Key to Compositing
Optimizing Your Projects
Section II. Effects Compositing Essentials
Color Correction
Color Keying
Rotoscoping and Paint
Effective Motion Tracking
Virtual Cinematography
Expressions
Film, HDR, and 32 Bit Compositing
Section III. Creative Explorations
Working with Light
Climate: Air, Water, Smoke, Clouds
Pyrotechnics: Fire, Explosions, Energy Phenomena
Learning to See
Index