Linear Keyers and Hi-Con Mattes


When, Exactly, Are Linear Keyers Useful?

Situations in which you'd want to separate levels in a single channel or by average the levels of multiple channels include

  • Isolating a color range for the purpose of correcting it to a different color.

  • Using garbage mattes and holdout mattes (defined later in this chapter).

  • Matting elements that were shot over pure blackness or a close approximation. For example, fire is usually shot not on a blue-screen stage but outdoors at night or in a dark studio against a black background.

  • Matting an element with itself to hold out specific portions of the element for enhancement. For example, you duplicate a layer and matte its highlights to add a bloom effect to enhance them (see Chapter 12, "Working with Light").


There are, of course, cases in which edge detail is not so critical, because you don't need to completely isolate an element: For example, you are matting it over itself, creating a high-contrast, or hi-con, matte. For cases where you just need to specify one area of a clip to adjust it, linear keyers will often do the trick.

I'm starting with these before bringing out the big guns of keying for a couple of reasons. Linear keyers are simpler to use and are useful in a wide variety of cases, beyond just blue- and green-screen shots. They contain fundamentals that carry forward into the more specialized keyers, such as Keylight, which is designed specifically to deal with blue and green screens.

Linear keyers differ from dedicated matte tools in that they do not do any kind of differencing of one channel or set of values against another (which is the key to blue and green screens); they are based merely on defining a range within a set of values.

The most useful linear keyers are

  • Extract

  • Linear Color Key

The keyers to be avoided are

  • Luma Key

  • Color Key

Color Key and Luma Key have no softness in their thresholding and should be filed under "never use." The means for grading edges provided by these keyers is a kludge; they offer Edge Thin and Edge Feather, which are crude methods for choking, spreading, and blurring the matte. Essentially they are binary keyers. They create pixels that are either transparent or opaque; the semitransparency is added afterward with no respect whatsoever to the source data. Linear Color Key is always a better option than Color Key; set to black or white, it can be used to generate luminance mattes (as does Extract).

Linear Color Key and Extract

Although both are linear keyers, Linear Color Key and Extract excel in different areas. Extract is the most useful tool for luminance keying, using the black and white points of an image or any of its individual channels. Linear Color Key is more appropriate in cases in which you want to isolate a particular color or chrominance range.

All Channels Are Not Created Equal

If you set an RGB image as a luma matte, the red, green, and blue channels are averaged together to determine the luminance of the overall image. But they are not weighted evenly.

CompareFigure 6.6 with Figure 6.5c, and you will note that the background of the averaged result is far less bright than the blue channel of the same image. The three channels are weighted according to how the eye sees them: Red at 29%, Green at 59%, and Blue at 12% luminance. This topic is explored in greater depth in Chapter 12, in the section on "Creating a Look with Color."

Figure 6.6. If this were an exact average of the grayscale versions of the channels shown in Figures 6.5a, b, and c, the background would be brighter due to the brightness of the blue channel. But to mimic how the eye sees color, the averaging weights the three channels according to how the eye sees them, and the eye is far less sensitive to blue than green.


Figure 6.5a, b, and c. You'll get different results from each of the three channels. In this case, blue (6.5c) is the brightest, because the blue screen is the dominant object in the image. It also contains the most noise, however, despite the fact that the footage was transferred from film with no compression.


If you find yourself wanting to use one particular channel as a luma matte, use the Shift Channels effect (Figure 6.7).

Figure 6.7. Here the Shift Channels effect uses Blue for all channels save the Alpha, which is set to Full On.



Extract uses histograms to help isolate the black and white cut-off points for your matte and then grades the thresholds with black and white softness settings. Furthermore, you can easily use it for more than just luminance, as it offers a pull-down menu to access histogram controls for all four color channels (red, green, blue, and alpha).

Keep in mind that even when you're luma keying, one of the three color channels may be more suitable than overall luminance, which is just an average of the three. Green is often (but by no means always) the brightest and most contrasty channel, and blue tends to be the noisiest (Figures 6.5a, b, and c). If you are using full RGB for your luma key instead of a single channel, keep in mind that the luminance values are actually weighted.

Linear Color Key offers direct selection of a key color using an eyedropper tool. The default color is blueironic because a basic blue-screen key is exactly what you shouldn't do with this tool. The other odd thing about the defaults is the 10% Matching Softness setting, which is arbitrary and gives a rather loose range of matched tones. I often end up with settings closer to 1%.

Note that there are, in fact, three eyedropper tools between the thumbnail images in the Linear Color Key effect. The top one replicates the Key Color eyedropper, and the other two add and subtract from the Matching Tolerance. You can click the eyedroppers on either of the adjacent thumbnail images, or if these are too small, you can open the Layer window and choose the effect in its View pull-down, using the eyedropper there (Figure 6.8). Do not try using these eyedroppers directly in the Composition window in a comp with multiple layersthe result may be odd.

Figure 6.8. The eyedropper tools of the Linear Color Key can be used in the Composition or Layer windows to select and refine the color range. This tool is useful for non-primary color matting; in this case, a maroon color is selected.


You can match the color using RGB, Hue, or Chroma values. In most cases, RGB will do the trick, but the best idea in unusual situations is probably to try each one before you start fine-tuning the controls. You can adjust the Tolerance, which specifies how close the colors have to be to the chosen value to be fully matted, and Softness, which then grades the threshold, softening the edges according to how close the color values are to the target range.

The default setting for the Key Operation is to Key Colors, which is straightforward enough. You might think, therefore, that the other option, Keep Colors, would simply invert the result. In fact, Keep Colors was designed with a separate purpose in mind that of using Linear Color Key multiple times. If your first instance of the effect eliminates something you want to bring back, you have the opportunity to do so by adding a second instance of the effect targeting the color you want to bring back and set to Keep Colors. To set the second instance, you must first deselect the Effect option for the first instance, temporarily disabling it so you can set the color to keep (Figure 6.9).

Figure 6.9. Two instances of Linear Color Key, the first set to Key Colors, the second set to Keep Colors. The key controls for setting up the second instance are highlighted: The first instance has been temporarily disabled so the full color of the image can be sampled for the color to be brought back in the second instance. Once setup is complete, all instances must be once again enabled.


Difference Mattes

The concept of a difference matte sounds simple: Frame two shots identically, one of them with your foreground subject present, the other with no foreground subject (commonly called a clean plate). Now, let the computer compare the two images and remove everything that matches between them, leaving only the foreground subject.

Unfortunately, there are all sorts of criteria that preclude this from actually working very well, specifically

  • Both shots likely need to be locked off or motion stabilized, and even then it is common for there to be an offset that precludes a clean key.

    Luma Mattes

    A confession: I often use track mattes (detailed in Chapter 3) and a duplicate of my layer, instead of luminance keys applied directly to the layer. What I like about track mattes is that I can use Levels, a tool I know inside and out, and which gives me refined control of ranges on all channels, to refine transparency. Other artists may consider this approach more cumbersome, preferring to work with a single layer and an effect.


  • The foreground element probably is not completely devoid of whatever is in the background; low luminance areas, in particular, are prone to appear as background to the Difference Matte effect.

  • Even such subtleties as grain and slight changes of lighting can cause a mismatch to two otherwise identical shots. Raising the Blur Before Difference setting helps correct for this, but by introducing inaccuracy.

You can gauge the challenges for yourself using any locked-off shot with movement in it, ideally one in which a character enters the frame. Lock off a frame of the source shot; you can apply Time Remap and use a single keyframe with the time of the clean plate shot. Turn off visibility of that layer, and apply Difference Matte to the other layer. Viewing final output, adjust Tolerance and Softness to try to get the key you're after. If the result has noise in it, try raising the Blur Before Difference value.

Figure 6.10 shows many of the problems with a difference matte by itself. It's not a terrible way to isolate something if the edge is not critical, but it cannot compare with more sophisticated methods for removing a solid color background.

Figure 6.10. This would seem to be a perfect scenario for using a Difference Matte effect. A locked-off camera was used to shoot a clean-plate image of the set as well as the action, and the two line up perfectly. Like Luma Key, however, this effect has no threshold controls, so you're pretty much stuck with whatever you are able to get by dialing in the Tolerance. Softness and Blur controls only make the matte less accurate.




Adobe After Effects 6. 5 Studio Techniques
Adobe After Effects 6.5 Studio Techniques
ISBN: 0321316207
EAN: 2147483647
Year: 2006
Pages: 156

flylib.com © 2008-2017.
If you may any questions please contact us: flylib@qtcs.net