Before we get into detail about specific keying methods and when to use them, here is some top-level advice to remember when creating a matte:
- Solo the matted foreground against a brightly colored background. You can set the background of the composition (Ctrl+Shift+B/Cmd+Shift+B) to a saturated yellow, red, orange, or purple (Figures 6.1a, b, and c). If the foreground is going to be matted into a dark scene, you can employ a dark shade, but in most cases bright colors better contrast with the foreground, clearly showing any holes in the matte, or edge problems and noise in the background (Figure 6.2).
Figures 6.1a, b, and c. The choice of background influences what you see. Against the default black, almost no detail is visible (a). With the checkerboard turned on, you can begin to see shadows (b). Flaws in the matte become clearest with a bright, solid, contrasting background (c). (Source footage courtesy Pixel Corps.)
Figure 6.2. The keyed layer can be soloed at any time, revealing it against the background of your choice.
- Protect edge detail at all costs. Unless you're in a situation where your edges aren't discernable (say, because you're matting an image against itself), the game here is always to solidify opaque areas of the foreground, erase the background completely, but don't overdo either or your edge will suffer. Pushing edge pixels too far makes for crunchy, chewy mattes (Figure 6.3).
Figure 6.3. A coyote ugly, chewy matte is typically the result of clamping the foreground or background (or both) too far.
- Keep it simple, and be willing to start over. There is a Tao of keying: I have inherited mattes that involved hours or even days of labored work (with dozens of keyframes and hand-cut mattes) that I was able to redo in under an hour, because I knew where to begin. Until you have an expert level of experience, throwing in the towel and starting over can save you time in the long run.
- Constantly zoom in and look hard at detail. Otherwise, you're likely to get one frame looking perfect only to find that there's a problem as soon as the camera shifts or the actor moves. If possible, find a difficult frame and begin there; look for motion blur, fine detail, excessive color spill, and so on. And even on a single frame, use various methods to continually re-examine the frame: Check the Info panel, noting whether background alpha values are truly at zero, zoom in and out, and toggle alpha and color channels (Figure 6.4).
Figure 6.4. A glimpse of the alpha channel can reveal even more problems, such as faint holes in the foreground, which should be solid white. This is the matte from Figure 6.1.
- Combine multiple passes. This is the most important step that beginning artists skip; more about it is revealed further on. It's a common misconception to perceive keying as an automated process: Click a few buttons, check the result, and you're done. That can of course occur, but it is not the norm beyond the most straightforward medium close-up. In many cases, a successful result includes a core matte whose foreground is 100% opaque and a second pass with refined edges.
Keep these basics in mind as you reveal the various keying options. You are also encouraged to review this list when it comes time to apply a key to your own shot, especially if you're new to keying.
Linear Keyers and Hi Con Mattes