Green screen spill
Spill is green light that bounced off the screen onto your subject. It is real recorded light, not a keying mistake — which is why no threshold removes it. What it is, why it lands on the rim, and how far a slider can clean it up.
What spill actually is
A green screen is a lamp. Lit to a usable level, it throws green light in every direction, and some of that light lands on the person standing in front of it. The camera records it, so hair, shoulders, ears and light clothing come back with a green cast that has nothing to do with the backdrop behind them.
In one sentence: spill is light on the subject, not leftover background. Those pixels are your subject, fully opaque, and they should be. Keying them out punches holes in a person, and no threshold can tell "green because the screen lit it" from "green because it is the screen".
Why the rim goes green first
Three things put the worst of it at the outline:
- Geometry. The rim sits closest to the screen, so it catches the most bounce.
- Fine detail. Flyaway hair and fuzzy fabric pack huge surface area into a few pixels, and each strand catches bounce from both sides.
- Shine. Skin, satin, glasses and glossy plastic reflect the screen like a mirror, and a specular reflection of a green wall is pure green.
None of it is fixable with a threshold: in every case the pixel really is your subject.
Two problems, one name
People say "green edge" for two different failures, and they need different fixes:
- A cast. The subject is intact, but tinted green. This is spill.
- A rim. A thin halo of backdrop pixels survived around the outline, or the outline is jagged. That is a threshold problem, not a spill problem.
Our measurements separate them. On the fixture built to carry a green cast, default tolerance keys the backdrop perfectly — IoU 1.000, no subject pixel lost. A cast alone does not make skin transparent, so if you see a tint on an intact person, tolerance and trimming are the wrong tools and will cost you real pixels for nothing.
What spill removal does to a pixel
The operation is small and deliberately limited. Take the channel your key colour dominates — green, for a green screen — and pull it toward the brighter of the other two by however much the slider asks for. Three consequences follow, all asserted in the test suite:
- Only one channel moves, and only downward — it can never push a pixel toward magenta.
- It clamps at the higher of the other two. At 100, green falls to whichever of red and blue is brighter, so a pixel never ends up less green than the grey it came from.
- A pixel with no cast is left exactly as it was. If green is already below the other channels, nothing happens.
It runs only where alpha is above zero, so the transparent backdrop is untouched and alpha is never modified. It changes colour, never shape.
The tool ships at 50. That is a starting point, not an answer: every row in our edge sweep has spill at zero, so there is no number for how much is too much. Tune it against a face and stop as soon as skin looks right — over-doing it drains the warmth out of a person.
Stop the light before you fix the pixels
Spill suppression is damage control. Preventing the bounce is cheaper and looks better:
- Put distance between subject and screen. Bounce falls off fast; two metres of separation beats any slider.
- Light screen and subject separately. A screen lit on its own need not be blasted, and a front-lit subject already outruns the bounce.
- Add a backlight or hair light. Rim light from behind separates subject from screen and out-competes the green wrapping the edge.
- Kill reflection. Matte clothing, less product on skin, and tilting glasses a few degrees.
- Flag what you can. Black wrap beside the screen stops it throwing light sideways onto the subject.
The lighting guide covers the setup in detail; the OBS settings page explains the same three sliders in live-production terms.
The order that works
- Fix the lighting and the distance first. Most spill complaints are a setup problem wearing a slider costume.
- Set tolerance only until the last patch of backdrop disappears.
- Touch edge next, and only for a rim or a jagged outline — not for a tint.
- Raise spill removal last, watching skin tone, and stop early.
- Judge it in motion. A paused frame hides outline flicker, which is what a viewer sees.
When this does not work
- Trim will not fix a cast. On the cast fixture, pulling edge to its extreme erases 6,902 of 21,341 subject pixels and drops IoU to 0.889 — you destroy a third of the person to remove a tint that spill removal handles without touching shape.
- Deep shadow and spill together. Our hardest fixture scores 0.622672 at default settings with 20,925 backdrop pixels left behind. Trimming to edge -30 clears them and reaches 0.964303, but takes 2,053 subject pixels. Something always pays.
- Our metric cannot see the fix. IoU counts any non-transparent pixel as subject, so it does not move when spill suppression works. Absence of a number here is not evidence that nothing happened.
- A genuinely green subject. A green shirt, a green logo or a green prop is indistinguishable from spill by colour alone, and spill removal will drain it.
- Specular highlights. A mirror-like reflection of the screen is saturated green. There is no channel left to recover underneath it.
- Semi-transparent edges. Motion blur, smoke, glass and flyaway hair mix backdrop and subject in one pixel. Spill removal assumes a pixel is one thing or the other.
- Heavily compressed footage. 4:2:0 subsampling throws away half the colour resolution the key depends on, and smoothing smears green into the outline before you open the file.
- A cast from a colour you are not keying. Spill removal targets the channel your key dominates — green for our green preset, blue for our blue one.
Where the numbers come from
Every figure here comes from the CSVs in the public reference repository on GitHub; the write-up is on Zenodo under DOI 10.5281/zenodo.22916767. The fixtures are synthetic 320x240 images, not real footage, built from a seeded random number generator — treat the numbers as the behaviour of the algorithm, not a promise about your shoot.
To try the sliders on a file you shot, the tool runs it all in your browser with no upload. The benchmark page lists what was measured, and blue vs green covers switching key colour.