When After Effects pulls a key, it looks at the entire frame of an image. The larger the area that must be analyzed and the larger the variation in color, the greater risk that you won't be able to remove all of the background color. You can reduce this risk and remove unwanted distractions by using a garbage mask.
As the name implies, a garbage mask (or matte) is used to mask out the bad, or unnecessary, parts of an image. When you create a garbage mask for a layer, it's a good idea to keep it fairly loose. If the foreground subject is moving, you need to leave enough room in the garbage mask to accommodate the motion. If you make it too tight, your subject may move outside the mask. Remember, a garbage mask is used to help solve problems, not create new ones.
There is no limit to the number of garbage masks you can have in a composition. In fact, on some complex shots it is not uncommon to have multiple garbage masks isolate limbs, faces, hair, or different subjects in the scene.
Creating a Garbage Mask
You'll create a garbage mask to limit the area you need to key.
- Move the current-time indicator to 2:00 in the Timeline panel. This is the point at which the actor has stepped fully into the frame, and it's where she moves furthest to the left.
- Select the Pen tool ( ) in the Tools panel.
- Using the Pen tool, click to place vertices around the actor as in the following illustration. Be sure to leave room so that she can enter from the right of the screen.
Close the mask by double-clicking the last vertex.
- To make sure that your garbage mask isn't too tight, drag the current-time indicator across the time ruler and make sure the actor does not move out of the masked area.
If she does, switch to the Selection tool ( ) and adjust the vertices.