Keying Filters

Keying filters are used to isolate a subject that is surrounded by an area of fairly uniform color or brightness by generating an alpha channel based on the shape of that area. Keying is most commonly performed on subjects that were shot against a blue- or green-colored background, but keys can also be based on brightness values.

A common example of color keying is the meteorologist on TV. This person is always seen standing in front of an animated map of the weather, but in reality he or she is standing in front of a big green screen. As part of the broadcast, the green screen is keyed out, and replaced by the map. You can do the same thing in Motion.

Important: Keying a foreground subject is not always easy, and it takes time and patience to learn how to use the parameters in each filter to achieve the best effect. Even so, most keys are pulled using more than one tool to do the job. Good compositing artists usually combine one or more masked keying filters, Matte Choker filters, a Spill Suppressor filter, and one or more garbage and holdout masks to isolate a single subject. For more information on techniques you can use to improve a key, see Performing Multiple Keys on a Single Subject.

Blue Green Screen

The Blue Green Screen filter is intended for subjects that were shot in front of a blue screen or green screen. This filter renders the blue or green areas of the image transparent, allowing one or more background images to show through.

Parameters in the Inspector
  • Color Level: Sets the percentage of color purity being keyed.
  • Tolerance: Sets the color tolerance for your key. Larger values allow a greater difference between the set key color and other color values that are incorporated into the key.
  • Edge Thin: Sets the amount of thinning done at the edges of the matte. A positive value erodes the matte edge.
  • Invert Matte: Sets whether or not the matte is inverted.
  • Mix: Sets what percentage of the original image is blended with the keyed image.
HUD Controls

The HUD contains the following controls: Key, Color Level, Tolerance, Edge Thin, and Invert Matte.

Color Key

This filter can pull a key based on any color you select. Bear in mind that if the color is too close to that of the subject you’re trying to isolate, parts of your foreground subject may disappear as well. The resulting effect renders the selected color transparent, allowing a background image to show through.

Figure. Canvas showing effect of the Color Key filter.
Parameters in the Inspector
  • Color: Picks the color for your key. Use the disclosure triangle to display Red, Green, and Blue sliders for more precise color selection.
  • Tolerance: Sets the color tolerance for your key.
  • Invert Matte: Sets whether or not the alpha channel of your color key is inverted.
  • Mix: Sets what percentage of the original image is blended with the keyed image.
HUD Controls

The HUD contains the following controls: Color, Tolerance, and Invert Matte.

Luma Key

Luma Key pulls a key from your object based on a selected brightness level. This can be effective if you’re keying a subject that was shot against a solid white or black background, and exposed so that there are no absolute highlights or shadows within the foreground subject. Despite this, shadows and highlights in the image usually make this a difficult filter with which to pull a perfect key.

Figure. Canvas showing effect of the Luma Key filter.
Parameters in the Inspector
  • Threshold: Sets the threshold of the key.
  • Tolerance: Sets the tolerance of the threshold. Larger values allow a greater difference between the set key color and other color values that are incorporated into the key.
  • Mix: Sets what percentage of the original image is blended with the keyed image.
HUD Controls

The HUD contains the following controls: Key Mode, Luminance, Threshold, and Tolerance.

Primatte RT

The Primatte RT filter is a high-quality keying filter, which renders the blue or green areas of the image transparent, allowing one or more background images to show through.

Figure. Canvas showing effect of the Primatte RT filter.
Parameters in the Inspector
  • Backing Color: Pick the backing color for the matte. Use the disclosure triangle to display Red, Green, Blue, and Opacity sliders for more precise color selection. In addition, clicking the color well opens the Colors window, which allows you to use the color controls to select a color from the object.
  • Auto Sample: Automatically samples the dominant color type in the image to be used for the key. Select Red, Green, or Blue.
  • Replacement Color: Picks the color to be used to fill in pixels in spill and transition areas. The intelligent edge smoothing of the Primatte RT filter can take pixel color values from the background to substitute in spill and transition areas. Use the disclosure triangle to display Red, Green, Blue, and Opacity sliders for more precise color selection.
  • Noise Removal: Sets the threshold for noise removal.
  • Matte Density: Sets the density of the matte. This value cannot be set to a value lower than Noise Removal.
  • Spill Suppression: Sets the amount of spill suppression applied to the matte. This value cannot be set to a value lower than Noise Removal.
  • Mix: Sets what percentage of the original image is blended with the keyed image.
HUD Controls

The HUD contains the following controls: Output Type, Backing Color, Auto Sample, Replacement Color, Noise Removal, Matte Density, and Spill Suppression.

An Example Using Primatte RT

Getting the Primatte RT basics down is easy. Here’s an example.

To create a simple composite using Primatte RT
  1. Import a background image into your project.

    Figure. Canvas showing an unmodified (background) clip.
  2. Import the foreground image for which a matte needs to be generated.

    Figure. Canvas showing a second clip atop first clip.
  3. Select the foreground object, and turn off the background to directly observe the filter’s effects.

    Figure. Canvas showing top clip without background.
  4. Apply the Primatte RT filter to the object.

    The Primatte RT filter makes a guess as to the non-subject color you are trying to remove. It makes a guess based on the dominant color present in the image, which may or may not be the color of the background. For example, if the image is a large red object that obscures most of a green screen, Primatte RT selects Red as its base sample. In this case, however, Primatte RT correctly guesses that you’re trying to key out the blue color. If Primatte RT’s guess is incorrect, use the Auto Sample buttons to choose a different color.

    Tweaking the Noise Removal parameter can help for blue or green screens that have some variance in their color value. Additionally, the darker areas of your object can fool the keyer’s defaults, so in order to get a clean matte you may have to adjust Matte Density so the background doesn’t show through these dark areas. Lastly, Spill Suppression can be used to reduce blue screen reflections or interactions with the foreground object.

  5. Turn on the background layer.

    Figure. Canvas showing effect of the Primatte RT filter.

Spill Suppressor

Whenever you key an image that was shot against a blue or green screen, there’s a good chance that some color reflected off of the screen and illuminated the edge of the foreground subject. This fringing around the edge of the subject is called spill, and is usually difficult to eliminate because it’s actually part of the subject you’re trying to preserve. The Spill Suppressor filter deals with this by tinting the keyed color in order to turn it into a neutral tone.

Note: The Spill Suppressor may inadvertently tint other areas of the foreground subject in addition to the colored fringe, so adjust its settings with care.

Parameters in the Inspector
  • Amount: Sets the amount of spill to be suppressed.
  • Mix: Sets what percentage of the original image is blended with the spill-suppressed image.
HUD Controls

The HUD contains the following controls: Spill Type and Amount.