AfterEffects

Color Difference Key effect

The Color Difference Key effect creates transparency from opposite starting points by dividing an image into two mattes, Matte Partial A and Matte Partial B. Matte Partial B bases the transparency on the specified key color, and Matte Partial A bases transparency on areas of the image that don’t contain a second, different color. By combining the two mattes into a third matte, called the alpha  matte, the Color Difference Key creates well-defined transparency values.

The Color Difference Key produces high-quality keying for all well-lit footage items shot against a bluescreen or greenscreen and works especially well with images that contain transparent or semitransparent areas, such as smoke, shadows, or glass.

This effect works with 8-bpc and 16-bpc color.

Use the Color Difference Key effect

  1. Select the layer you want to make transparent, and then choose Effect > Keying > Color Difference Key.
    Note: To use any of the eyedroppers in the Layer panel, choose Color Difference Key from the View menu in the Layer panel.
  2. In the Effect Controls panel, choose Matte Corrected from the View menu. To view and compare the source image, both partial mattes, and the final matte at the same time, choose [A, B, Matte] Corrected, Final from the View menu. Other views available in the View menu are described in step 10.
  3. Select the appropriate key color: To key out a bluescreen, use the default blue color. To key out a nonblue screen, select a key color in one of the following ways:
    • Thumbnail eyedropper: Select and then click in the Composition panel or the original thumbnail image on an appropriate area.

    • Key Color eyedropper: Select and then click in the Composition or Layer panel on an appropriate area.

    • Key Color swatch: Click to select a color from the specified color space.

      Note: The eyedropper tools move the sliders accordingly. Use the sliders in step 9 to fine-tune the keying results.
  4. Click the  matte button to display the final combined matte in the matte thumbnail.
  5. Select the Black eyedropper, and then click inside the matte thumbnail on the lightest area of black to specify transparent regions. The transparency values in the thumbnail and Composition panel are adjusted.
  6. Select the White eyedropper, and then click inside the matte thumbnail on the darkest area of white to specify opaque regions. The opaque values in the thumbnail and the Composition panel are adjusted.
    To produce the best possible key, make the black and white areas as different as you can so that the image retains as many shades of gray as possible.
  7. Select a matching accuracy from the Color Matching Accuracy menu. Choose Faster unless you use a screen that isn’t a primary color (red, blue, or yellow). For those screens, choose More Accurate, which increases rendering time but produces better results.
  8. If you need to further adjust transparency values, repeat steps 5 and 6 for one or both of the partial mattes. Click the Partial Matte B button or the Partial Matte A button to select a partial matte, and then repeat the steps.
  9. Adjust transparency values for each partial matte and for the final matte by dragging one or more of the following sliders in the Matte Controls section:
    • Black sliders adjust the transparency levels of each matte. You can adjust the same levels using the Black eyedropper.

    • White sliders adjust the opaque levels of each matte. You can adjust the same levels using the White eyedropper.

    • Gamma sliders control how closely the transparency values follow a linear progression. At a value of 1 (the default), the progression is linear. Other values produce nonlinear progressions for particular adjustments or visual effects.

  10. When adjusting individual mattes, choose from the View menu to compare the mattes with and without adjustments:
    • Choose Uncorrected to view a matte without adjustments.

    • Choose Corrected to view a matte with all adjustments.

  11. Before closing the Effect Controls panel, select Final Output from the View menu. Final Output must be selected for After Effects to render the transparency.
    To remove traces of reflected key color from the image, apply Spill Suppressor using Better For Color Accuracy. If the image still has a lot of color, apply the Simple Choker or Matte Choker effect.