Key
Remove a colour background with a chroma key.
What it does
Key pulls a transparency matte by comparing every pixel against a reference, a key colour, a brightness level, or a clean background plate, and turning matching pixels transparent. It covers green-screen and blue-screen work, brightness keys, and difference keys against a locked-off empty background.
Five modes: Chroma and Chroma (Video) key out a specific hue, Luma keys out shadows or highlights, Color keys out an exact colour by distance, and Difference compares against a Clean Plate to key out anything that has not changed. Tolerance and Softness set how tight the key is and how soft its edge falls off. Despill cleans colour spill from the screen onto the subject's edges.
When to use it
Green-screen or blue-screen cutouts: Chroma, or Chroma (Video).
Noisy or compressed footage where a plain Chroma key tears: Chroma (Video), tuned for video colour-difference keying.
Keying out shadows or blown highlights rather than a colour: Luma.
A locked-off shot of the empty background available: wire it into Clean Plate and use Difference.
Green or blue fringing on the subject: raise Despill.
A matte with holes, fringing or jagged edges: enable Edge Refinement and use Erode, Dilate and Blur.
| Parameter | Type | Default | What it does |
|---|---|---|---|
content_in | Raster | — | — |
clean_plate | Raster | — | Clean plate for difference keying (empty background plate) |
depth_in | Raster | — | Depth buffer (R channel = [0,1] depth, 0 = near, 1 = far). Connect from a 3D render's depth output. |
object_id_in | Raster | — | Object ID buffer (R channel = per-object integer id). Connect from a 3D render's Object ID output. |
mode | String | "Chroma" | Chroma: HSL hue-based, Chroma (Video): optimized for video footage, Luma: brightness, Color: RGB distance, Difference: plate comparison, Depth: keep a depth range from the wired Depth AOV, Object ID: keep one object by its render id. One of: Chroma, Chroma (Video), Luma, Color, Difference, Depth, Object ID. |
target_object | String | "" | The object to keep — pixels belonging to it stay, everything else keys out |
antialiased | Boolean | false | Soft, anti-aliased object matte (summed coverage) instead of hard-edged id equality |
key_color | Color | rgba(0.00, 1.00, 0.00, 1.00) | The color to key out (green for green screen, etc.) |
tolerance | Number | 0.200 | Core tolerance - colors within this distance are fully keyed |
softness | Number | 0.100 | Soft edge width - colors in falloff zone get partial alpha |
depth_near | Number | 0 | Near depth bound — pixels closer than this are rejected (matte 0) |
depth_far | Number | 1 | Far depth bound — pixels farther than this are rejected (matte 0) |
clip_black | Number | 0 | Clip matte black point - pixels below this become fully transparent |
clip_white | Number | 1 | Clip matte white point - pixels above this become fully opaque |
invert | Boolean | false | Invert the matte (swap opaque and transparent) |
despill | Number | 0.500 | Strength of color spill removal from foreground |
despill_method | String | "Average" | Average: (R+B)/2, Double: max(R,B), Limit: min(R,B). One of: Average, Double, Limit. |
luma_target | String | "Dark" | Dark: key out shadows, Light: key out highlights. One of: Dark, Light. |
edge_refine | Boolean | false | Enable morphological operations for matte cleanup |
erode | Number | 0 | Shrink matte edges (removes fringe) |
dilate | Number | 0 | Expand matte edges (fills holes) |
edge_blur | Number | 0 | Soften matte edges |
output_mode | String | "Keyed" | Keyed: RGB with alpha, Matte: grayscale matte preview. One of: Keyed, Matte. |
spatial_strength | Field | — | Spatial field controlling where the effect applies (0=bypass, 1=full) |
strength | Number | 1 | Effect strength / wet-dry (0 = no effect, 1 = full). Editable, wirable, keyframable. |
Gotchas
Despill acts only when Key Color is a green or blue hue. With a red, yellow or other off-hue key colour the Despill slider stays visible and has no visible effect: spill suppression is built around the green and blue screen case.
Difference mode needs a Clean Plate wired in, an empty background plate shot from the same locked-off camera position. Without one there is nothing to compare against and the key does not work.
Edge Refinement (Erode, Dilate, Blur) affects the alpha edge only, so it does nothing when Output Mode is set to Matte, which is fixed fully opaque for preview. Switch back to Keyed to see refinement take effect.
Worked example
Add a Key node and wire green-screen footage into Content In.
Leave Mode on Chroma and set Key Color by sampling the screen colour.
Raise Tolerance until the background disappears, then raise Softness slightly to smooth the cutout edge.
If a green fringe shows around the subject, raise Despill.
If the matte has small holes or ragged edges, enable Edge Refinement and adjust Erode, Dilate and Blur to clean it up.