Chroma key
Turn one colour transparent with tolerance, softness and spill suppression: the green screen.
- Video
- Since 0.2.0
- chroma key
- green screen
- effect
Chroma key turns one colour transparent: the green screen.
What it does#
Hue picks the colour to remove, 120 for green and 240 for blue. Saturation sets how colourful a pixel must be to count, Tolerance how far from the hue still counts, Softness how gently the edge fades and Spill how much key colour is removed from what remains. The output keeps an alpha channel; place it as a layer of a Composite. It processes every stream of the input at that stream's size and keeps the stream count.
When to use it#
Use it to put a person in front of a backdrop image or video.
Ports#
| Port | Direction | Signal | Lanes |
|---|---|---|---|
video | Input | Video | Inferred from the cable |
video | Output | Video | Inferred from the cable |
Parameters#
| Parameter | Label | Range | Default | Unit | Scale | Notes |
|---|---|---|---|---|---|---|
hue | Key hue | 0 to 360 | 120 | ° | linear | Hue of the colour to remove; 120 is green. |
saturation | Saturation floor | 0 to 1 | 0.3 | linear | Pixels less saturated than this are never keyed. | |
tolerance | Tolerance | 0 to 180 | 25 | ° | linear | Hue distance that is fully transparent. |
softness | Softness | 0 to 90 | 15 | ° | linear | Extra hue distance over which transparency fades in. |
spill | Spill | 0 to 1 | 0.5 | linear | How strongly the key colour is desaturated at the edges. |
Key hue (hue)#
Colour to remove, in degrees around the colour wheel.
Saturation floor (saturation)#
Minimum colour strength a pixel needs to be keyed.
Tolerance (tolerance)#
How far from the hue, in degrees, still counts as the key colour.
Softness (softness)#
Width of the soft edge, in degrees.
Spill (spill)#
How much of the key colour is neutralised on what remains.
Tips#
- Light the screen evenly; a clean key needs little Tolerance.
- Raise Spill if the subject has a green fringe.
- Video needs the browser's WebGPU video engine. The Player and exports do not run video yet and report it unavailable. To see a video output, bind a live Screen in the Frame to it.
See also#
Composite, Color, Image, Video, Control lanes.
Help patches
Each help patch is an ordinary Toy that teaches one idea. The diagram shows the Patch; the preview shows its Frame. Open it in TuneToys to play and edit it.
1. Green room
intermediate Teaches: hue, saturation, tolerance, softness, spill, video
Camera keyed over an image backdrop.
Connections as text
- Camera video output connected to Chroma key video input
- Image video output connected to Composite base input
- Chroma key video output connected to Composite layer1 input
- Hue 120 is green; set 240 for a blue screen.
- The keyed camera is the top layer of the composite over the backdrop image.