How to key hair against a green screen without rotoscoping it
The strands are not opaque or transparent. They are both at once, and most tools refuse to accept that.
7 min read
Hair is where a key gets judged. The body of your subject keys itself; anyone can pull a matte off a jacket. The flyaways are the problem, because a strand of hair one pixel wide does not own that pixel. The camera averaged it with the screen behind it, so the pixel is forty percent hair and sixty percent green, and it needs to stay forty percent hair in the composite or the whole head reads as a wig.
Every tool that fails on hair fails for the same reason: it refuses to accept that a pixel can be partially there.
Why your keyer gives up at the hairline
A chroma keyer builds the matte from color distance. Pixels near the screen color go transparent, pixels far from it stay opaque, and everything in between lands on a slope you control with two or three sliders. Mixed hair pixels sit exactly in that in-between zone, alongside noise, compression artifacts, and spill. Tighten the slope and the wisps vanish. Loosen it and the screen bleeds through the whole hairline as a green fog. There is no slider position where both survive, which is why the traditional answer is a core matte for the body, an edge matte for the hair, and an evening of blending them.
AI roto fails differently. It decides, per pixel, subject or not subject. That produces a clean silhouette and destroys the very idea of a half-transparent strand. The wisps either get swallowed into a blobby outline or cut off entirely. Why AI roto looks cut out covers that failure on its own.
The honest options
Light it better next time. The free fix, and the real one. Distance between subject and screen kills most hair problems before they exist: less spill, less contamination, cleaner separation. If you are reading this before the shoot, pull your subject three metres off the green and put a warm edge light on the hair. Most of this guide exists because that did not happen.
Work the keyer you have. If the hair is short and controlled, a careful chroma key with a separate edge pass can hold up. Budget real time for it, and read the Ultra Key guide first if that is your tool.
Let a model unmix the pixels. Key Studio Pro runs the CorridorKey neural keyer on your Mac. Instead of measuring color distance, it predicts, for every pixel, the true color of the foreground and how much of the pixel the foreground actually owns. A strand that is forty percent there comes back as hair-colored foreground with 0.4 alpha, which is what your composite needed all along. It is free, so trying it on one shot costs you a download.
Pulling the key
- Drop the shot into Key Studio Pro. A clip or an image sequence both work.
- Let it process. You get a Matte pass, a straight FG pass, and a premultiplied Processed pass in linear EXR.
- Check the Comp preview against the checkerboard and look at the hairline at 200 percent. The strands should have soft, believable edges, not a cut line.
- Bring the passes into your comp, or drop the Processed EXR or a ProRes 4444 export straight onto a timeline.
What it will not rescue
Detail the camera never recorded. If the hair is motion blurred into the screen across thirty pixels, you get a faithful reconstruction of blurred hair, which is correct, not crisp. Heavy compression is the other ceiling: 4:2:0 footage stores color at quarter resolution, so single-pixel strands may simply not exist in the data. The model is honest about what is there. It does not invent hair.
Spill is related but separate. Unmixing removes the screen’s contribution to the pixel, but green bounced onto the hair from the side is lighting, and that is what despill is for. The spill guide covers when to bake it in and when to leave it for the comp.
Common questions
Do I still need a garbage matte?
For rigging, stands, and crew at the frame edge, crop or matte them out as usual. What you do not need is the core-versus-edge matte dance around the hair itself.
Does this work on blond or bleached hair full of green?
Bright hair takes spill badly, and the answer has two parts: the unmixing recovers the alpha, and despill recovers the color. Run both and judge the result before deciding the shot needs hand work.
What about blue screens?
Same workflow. There are dedicated checkpoints for green and blue plates, and the despill targets whichever you shot.
My screen was badly lit. Does that change anything?
It changes a lot, mostly for the better compared to a chroma keyer. See keying a badly lit green screen.
Keep reading
- How to get green spill off skin and hairThe screen does not stay behind your subject. It bounces, and by the time you key, it is in their skin.
- How to pull a matte from motion blurA moving hand is half background for most of its width. Clip that to a hard edge and it reads as a cutout instantly.
- What to do when Ultra Key eats your edgesEveryone finds the same three sliders and the same trade: keep the hair and keep the green, or lose both.