Keying and Green Screen in After Effects: Keylight, Spill Suppression, Edge Cleanup, Garbage Mattes and Compositing Subjects

Adobe After Effects 65 min min read Updated: Nov 17, 2026 Intermediate
Keying and Green Screen in After Effects: Keylight, Spill Suppression, Edge Cleanup, Garbage Mattes and Compositing Subjects
Intermediate Topic 2 of 3

Good Green Screen Starts on Set

  • Light the screen evenly
  • Keep the subject away from the screen to reduce spill
  • Use a screen color the subject does not wear
  • Shoot at a high bitrate to keep clean edges

Keylight Steps

  1. Place a background layer below the green screen clip
  2. Apply Effect > Keying > Keylight (1.2)
  3. Use the Screen Colour eyedropper and click the green
  4. Switch View to Screen Matte to see the white subject and black background
  5. Adjust Clip Black and Clip White until the subject is solid white and the background is solid black
  6. Switch back to Final Result

Important Controls

ControlUse
Screen GainStrength of the key
Screen BalanceFine-tune what counts as screen color
Clip Black / WhiteClean up gray areas in the matte
Screen Shrink/GrowTighten or loosen the edge
Despill BiasReduce green on the subject

Garbage Matte

Draw a rough mask around the subject to remove the unlit edges of the screen, rigs and stands. This is called a garbage matte.

Spill and Edges

  • Use Despill Bias or Advanced Spill Suppressor to remove green reflections
  • Use a small Screen Shrink and a little feather to hide halos
  • Use Light Wrap ideas: let some background color bleed into the subject edge

Screen Channel Math

python def green_key_strength(r, g, b): # Simple measure: how much more green than the other channels return max(0, g - max(r, b)) samples = {"green screen": (0.1, 0.8, 0.2), "skin": (0.8, 0.6, 0.5), "white shirt": (0.9, 0.9, 0.9), "green spill": (0.5, 0.65, 0.4)} for name, (r, g, b) in samples.items(): print(name, "key strength:", round(green_key_strength(r, g, b), 2))
Result

green screen key strength: 0.6 | skin key strength: 0 | white shirt key strength: 0 | green spill key strength: 0.15

The green screen has a high value, skin and white are near zero, and spill is in between. Keyers use a similar idea, but with more advanced steps.

Practice

  1. Key a green screen clip and view the Screen Matte
  2. Remove stands using a garbage mask
  3. Reduce green spill on hair
  4. Place the subject over a background and match color

Conclusion

Keying removes a screen color. Good lighting plus Keylight, matte cleanup and spill control give a believable composite.

Quick Summary: Set tips; Keylight; garbage matte; spill; math.

Get Newsletter

Subscibe to our newsletter and we will notify you about the newest updates on Edugators