Green Screen Keying in Blender: From Chroma to Final Composite
Diego Cortés
Author
Green screen keying in Blender is not about dragging a node and hoping for the best: it is a workflow of sampling, tuning and cleanup that separates your subject from the background without dirty edges. Here is the full path, from chroma to final composite.
What Keying Is and Why the Keying Node Is Your Starting Point
Keying (or chroma keying) removes a uniform color —usually green or blue— from footage and replaces it with another background or with 3D elements. The result is an alpha channel: transparent areas where the screen was, and the subject in the foreground.
In Blender, the Keying node in the Compositor is the closest thing to an all-in-one solution for green and blue screens: it combines chroma keying, which removes the background, and despill, which corrects the color cast the screen leaves on the subject. It is the right starting point for almost any project, though the best results always come from combining several techniques.
Setting Up the Compositor
Bringing Your Footage In
Open the Compositing workspace and enable "Use Nodes". Add an Image or Movie Clip node with your footage, connect it to the Keying node, and connect that to a Viewer node; finally, connect the Viewer to Composite to see the result. The key output of keying is the alpha channel, which you can inspect by switching the channel view in the Viewer header.
Working with a Live Preview
To evaluate the matte in real time, connect the Keying node output to a Viewer and toggle between the full image and the alpha channel using the channel button in the Viewer. You will instantly see whether the background is fully transparent and where the edges of your subject are being eaten away.
Keying Node Settings
Key Color: Sample the Real Green
The first step is telling the node which color to remove. Use the eyedropper on the Key Color parameter and sample the actual green of your set —not a theoretical "perfect" green— ideally from a well-lit, reflection-free area of the screen. The node does the rest from that sample.
Clip Black and Clip White: Matte Density
These two parameters control how aggressive the cut is. Raising Clip White and lowering Clip Black makes the key denser: more background is removed, but you also risk eating fine details like hair. The goal is to push them until the background is completely gone without damaging the subject.
Tolerance and Edge Softness
Tolerance defines how much color variation the key accepts: if your screen is unevenly lit, raising it helps capture every shade of green. Edge Softness, as the name suggests, softens the matte edge to avoid a cut-out-with-scissors look.
Dilate/Erode: Cleaning or Recovering Edges
Erode contracts the matte and removes halos or leftover green at the edges; Dilate expands it and recovers areas the key ate too aggressively. This is the fine tuning that finally defines the silhouette.
Screen Balance and Despill: The Color Bounce
The green screen casts a green bounce on your subject, especially on shoulders and hair. Screen Balance adjusts the hue of the key to compensate for that cast, while the Despill controls (balance and factor) determine how much green tint is removed from semi-transparent areas. With despill calibrated, skin tones recover their natural look.
Combining Techniques for Difficult Mattes
Channel Key as a Complement
When the green is uneven or the footage is noisy, the Channel Key node can remove most of the background based on a specific color channel. It rarely works alone, but it is great as a first pass that makes the Keying node's job easier.
Despill Node and Color Ramp for Fine Tuning
The Despill node removes leftover spill that the main key did not catch. A Color Ramp connected to the matte allows fine adjustments: by remapping the ramp values you push mid grays toward transparent or opaque, rescuing hair or translucency.
Blur and Smoothing
Edges with noise or harsh transitions are cleaned with a Blur node applied to the matte, not to the color image. A small blur is enough to make the transition between subject and background believable.
The Professional Workflow: Keying, Despill, Edge Treatment and Light Wrap
The Sequence Taught in Production
The workflow you will see in any serious compositing course is always the same: keying first (remove the background), then despill (remove the color bounce), then edge treatment (erode, blur and silhouette cleanup), and finally light wrap: the light of the new background softly wraps around the subject so it does not look like a cutout pasted on top.
Final Integration
Light wrap is achieved by mixing the subject's edge with the new background, often using a slight directional blur or a blurred background combined with the matte. Finish with a light color grade so subject and background share the same atmosphere: same color temperature, same contrast. When the eye finds no lighting differences between them, the composite works.
Shooting a Good Green Screen (It Saves Hours of Keying)
Even Lighting, Separated Subject
Good footage is worth more than any node. The screen must be lit evenly, with no wrinkles, shadows or blown-out areas; the subject is lit separately, with its own lights, so the green does not bounce onto it; and exposure is set so the screen stays consistent across the frame. The cleaner the source material, the less time you will spend fighting Clip Black and Clip White.
Conclusion
Green screen keying in Blender is mastered with method: sample the real color, densify the matte with Clip Black and Clip White, clean the edges with Dilate/Erode, correct the bounce with Despill, and finish with edge treatment and light wrap. With that workflow, your characters and 3D objects will integrate into real footage without that cutout look that gives amateurs away. To see it in motion, explore our video tutorials on VFX, motion tracking and compositing on the platform.