Pull a key with the Keyer filter

Getting started with the Keyer filter is easy. You apply a Keyer filter like any other filter in Motion—via the Library or the Add Filter pop-up menu in the toolbar. For information about applying filters, see Apply and remove filters.

After you apply the filter and create a basic key, you can fine-tune the default color sampling. (Alternatively, you can override the Keyer filter’s default sampling, then set the key colors manually.) If necessary, further refine the key using advanced color-selection controls and matte tools in the Filters Inspector.

Create a basic key

  1. Import a background image into your project.

  2. Import a foreground image or video clip of a subject positioned in front of a green screen or blue screen.

    This example uses video footage of an actor standing in front of a green screen. Make sure the foreground layer (the actor and green screen) is above the background layer in the Layers list.

    Two objects arranged in Layer list for keying
  3. Move the playhead to a frame where the green screen is visible in the Canvas, then apply the Keyer filter to the foreground layer.

    The Keyer filter analyzes the frame and guesses the color you’re trying to remove, based on the dominant color in the image (if blue or green). For best results, apply the filter to the frame with the greatest amount of the color to key.

    If the automatic guess is incorrect (for example, if you want to key on red), you can manually set the color you want to key. See “Override automatic color sampling and set your own key colors,” below.

    The background layer shows through as long as the View control in the Filters Inspector is set to Composite.

    Canvas showing effect of Keyer filter

    Note: If the clip you add a Keyer filter to is not visible in the Canvas, the initial key is pulled based on the first or last frame in which the subject appears, whichever is closest to the playhead.

  4. If the automatic key is too aggressive (keying out soft details of the foreground subject that you want to preserve), open the Filters Inspector, then slowly drag the Strength slider left to reduce the tolerance (core transparency) of the matte until you’re satisfied with the amount of edge detail in the key.

    Doing so allows areas of marginal transparency like hair, smoke, and reflections to show through. In general, it’s better to err on the side of a less aggressive key, using the parameters within the Matte Tools group to fine-tune the soft details you’re trying to preserve. For more information, see “Refine a key using Matte Tools.”

    Comparison of two keyed images in Canvas. In first example, Strength is set to 100 percent. In second example, Strength is set to 35 percent

    Tip: To see how the Chroma and Luma parameters are affected as you adjust the Strength slider, look at the Color Selection controls in the Filters Inspector. (Click the disclosure triangle beside the Color Selection parameter to see the controls.)

Override automatic color sampling and set your own key colors

Although the Keyer filter automatically samples your keying color, you can override that sampling and set the key colors manually. You might want to do this if you use a background screen color other than green or blue, or if the green screen or blue screen was unevenly lit.

  1. Select an applied Keyer filter in the Layers list, then open the Filters Inspector or HUD.

  2. Set the Strength slider to 0.

    Automatic color sampling is disabled, and the color screen background becomes visible in the Canvas.

    Green screen clip prior to keying
  3. In the Filters Inspector (or HUD), click to select the Sample Color tool.

    Clicking Sample Color tool in HUD
  4. In the Canvas, drag a selection rectangle over an area of the screen color that you are attempting to key.

    Dragging a Sample Color box in Canvas

    Most of the color screen should disappear and be replaced by the image in the layer underneath the foreground layer in the Layers list. You can add as many selection rectangles as necessary to sample areas of the color screen (for example, highlights or shadows on the color screen) to achieve a better result.

    Dragging a second Sample Color box in Canvas

    If the edges of the foreground subject are too sharp, use the Edges tool to soften the foreground edges. The Edges tool is also effective for fine-tuning semitransparent features such as smoke, glass reflections, and shadows.

  5. In the Filters Inspector or HUD, click to select the Edges tool.

  6. In the Canvas, drag over the edge of the foreground subject and, when an Edges control line appears, keep dragging so that one end point lies in the interior of the foreground subject and the other end point lies in the background.

  7. In the Canvas, drag the center handle of the Edges control line to adjust the edge transparency of the keyed subject.

    You can also set the View mode to Matte in the Filters Inspector, which helps you see the effect of using the Edges tool.

    Adjusting Edges control in Canvas; keyed image is set to Matte view

    Tip: To see how the Edges control alters the outer softness graph of the Chroma control and the bottom softness handles of the Luma controls, look at the Color Selection controls in the Filters Inspector as you make adjustments. (Click the disclosure triangle beside the Color Selection parameter to see the controls.)

Set your own key colors using keyboard shortcuts

When manually sampling colors to create a key, you can use keyboard shortcuts instead of clicking the Sample Color and Edge tools in the Inspector.

  1. In the Layers list, select the Keyer filter to adjust.

  2. Do one of the following:

    • To create a Sample Color selection rectangle, hold down the Shift key while dragging over the color you want to key in the Canvas.

    • To create an Edges sampling control, hold down the Command key while dragging to draw a line that crosses over the edge of the subject you’re keying in the Canvas.

    • To remove a Sample Color or an Edges control, Option-click anywhere in the sample control you want to delete, or click to select a sample control, then press the Delete key.

Refine a key using the Color Selection controls

  1. With the Keyer filter selected in the Layers list, set the View mode in the Filters Inspector to Matte.

    Matte mode lets you see how your adjustments affect the transparency of the image. The keyed image now appears in grayscale: white areas represent solid pixels in the final matte; black areas represent transparent pixels in the final matte; and varying levels of gray represent translucent pixels in the final matte (darker gray is more transparent; lighter gray is more opaque).

  2. Click the disclosure triangle in the Color Selection row of the Filters Inspector to reveal additional controls.

    Graph controls within Keyer filter's Advanced controls
  3. Choose one of the two Graph views to select a mode for the adjustments you need:

    • Scrub Boxes: Remain in Scrub Boxes mode (the default) if you’re satisfied with the current key but want to adjust the edge softness of the resulting matte. In Scrub Boxes mode, you can adjust the outer graph of the Chroma control and the lower handles of the Luma control to increase or decrease the translucency of the edges of the matte.

    • Manual: Click Manual to make substantial alterations to tolerance (core transparency) and edge softness in the matte. In Manual mode, you can adjust the inner and outer graphs of the Chroma control, as well as the upper and lower handles of the Luma control to alter all aspects of transparency in the matte. In Manual mode, you cannot alter the Strength parameter or add more Sample Color or Edges controls in the Canvas.

      After you enter Manual mode, do not return to Scrub Boxes mode.

      Note: For more information on keyframing the Color Selection controls, see About animated parameters in the Keyer filter.

  4. Depending on the mode you selected in the previous step, adjust the controls to alter your matte:

    • In Scrub Boxes mode, drag any side of the outer graph in the Chroma control to alter the range of hue and saturation contributing to the matte’s edge softness (transparency around the edges of the key).

      Dragging outer edge of Chroma control to adjust softness

      Note: In Scrub Boxes mode, you can also drag the two lower handles of the Luma control to alter the range of lightness and darkness contributing to the matte’s edge softness.

    • In Manual mode, drag any side of the outer graph in the Chroma control to alter the range of hue and saturation contributing to the matte’s edge softness. Drag any side of the inner graph to alter the range of hue and saturation contributing to the matte’s tolerance (core softness). Drag in the center of the inner graph to rotate the graph to a new position in the color wheel.

      Dragging inner border of Chroma control to adjust Tolerance

      Note: In Manual mode, you can also drag any of the four Luma control handles. The two upper Luma handles alter the range of lightness and darkness contributing to the matte’s tolerance (core transparency); the two lower handles alter the range of lightness and darkness contributing to matte’s edge softness.

    In either mode, expanding the Chroma graph or Luma handle outward increases the regions of transparency in the keyed image. Dragging the side of a Chroma graph or a Luma handle inward diminishes the transparent regions in the keyed image. In the example below, the top image shows the holes in the matte that result from increasing edge softness using the outer graph of the Chroma control. The bottom image shows how reducing edge softness closes these holes.

    Effect of widening and narrowing softness, compared
  5. If you haven’t adjusted the Luma control, drag the left or right lower handles to alter the softness of the luma component of the image.

    Adjusting softness handles of Keyer filter's Luma control

    Tip: In Manual mode, you can adjust the lower handles by dragging the bar connecting the top and bottom handles. To adjust all handles simultaneously, drag inside the curve in the graph.

  6. Adjust the Chroma and Luma Rolloff sliders to subtly alter the falloff between the tolerance and softness of the key.

    Adjusting Luma Rolloff slider of Keyer filter

Refine a key using Matte Tools

  1. With the Keyer filter selected in the Layers list, set the View mode in the Filters Inspector to Matte.

    Matte mode lets you see how adjustments affect the transparency of the image. The keyed image appears in grayscale: white areas represent solid pixels in the final matte; black areas represent transparent pixels in the final matte; and varying levels of gray represent translucent pixels in the final matte (darker gray is more transparent; lighter gray is more opaque).

  2. In the Filters Inspector, click the disclosure triangle of the Matte Tools row.

    The row expands to reveal the Levels control, which adjusts the contrast of the matte. Also revealed are the Shrink/Expand slider, the Soften slider, and the Erode slider.

  3. Use the Levels control to modify transparency and contrast in the matte.

    A general rule for using the Levels control is to drag the center Bias handle left to decrease transparency in the matte or right to increase transparency in the matte. The Black slider on the left and the White slider on the right modify contrast in the shadows and highlights of the matte.

    The effects of Levels adjustments are best seen when View is set to Matte. In this view, the white area of the matte is the solid part, and the black area of the matte is the transparent part. Gray is translucent, with lighter grays creating progressively more transparency. With this in mind, here are some guidelines:

    • Dragging the black bias handle right pushes gray areas to black, expanding areas of transparency within the matte.

    • Dragging the center bias handle left pushes the grays in the matte towards white, widening solid areas of the key as semitransparent areas are made solid.

    • Dragging the center bias handle right pushes the grays in the matte towards black, widening transparent areas of the key as semitransparent areas are made transparent.

    • Dragging the white bias handle left pushes the grays in the matte towards white, expanding areas of solidity within the matte.

  4. Drag the Shrink/Expand slider left to shrink the matte inwards, widening holes in the matte; drag the Shrink/Expand slider right to expand the matte outward, filling in holes in the matte.

    Original matte as seen in Canvas, compared to shrunken and expanded version of same matte
  5. Drag the Soften slider right to blur the matte overall, resulting in softer edges throughout the matte.

    Original matte in Canvas, compared to softened version of matte
  6. Drag the Erode slider right to soften the matte from the edge inward, while preserving the original matte outlines as a translucent outer boundary.

    Original matte in Canvas, compared to eroded version of matte