Chroma Key — Shoot First: The Craft

Chroma Key
How It Actually Works

Green Screen Isn't Magic

One of my mantras when teaching VFX has always been "Green screen isn't magic". That's important, because there's this feeling in the zeitgeist of "well if you make a thing green, then the computer puts in CGI". Which in an AI world is now technically true BUT that's not chroma keying.

How colour is stored

Chroma keying is just a simple principle. In an additive system of colour (i.e light rather than pigment, which is how computers work with colour), you have 3 primaries - red, green, and blue. Computer images are stored as 3 separate channels, dedicated to these three primaries. So (1,0,0) is full red, zero green, zero blue. Pure, unadulturated redness. (0,1,0) and (0,01) are green and blue. Any other colours are created by mixing (1,1,0) is full red and full green, which in additive mixing gives you yellow.

Of course, in the real world, nothing is a pure colour, it's always a mix. But imagine if you COULD get a pure colour. Because that colour has its own channel in the image, you could just throw away everything in that channel.

What you are aiming for

That's basically chroma keying. You're aiming to get a pure primary colour, so that you can control it through its channel. Normally that control will be creating a mask so you that you can remove the colour, but keying isn't just about removal. Once you've "grabbed" that colour, you can do whatever you want with it - change it to another colour, use it to generate clouds, whatever.

So on set, setting up chroma screens is about getting a pure colour. The more mixed the colour is, the more difficult it is to isolate, because it's spread over several channels, and that colour is likely to appear in lots of places, which pure colours don't.

So here's the key principles of keying, with only a tiny bit of magic (abracadabra. There.)

Your image is three channels. The screen lives in one of them.

Which Colour, And Why

Green or blue screen? Well...don't use a green screen in a forest, or a blue screen in an aquarium. It's not rocket science. Green is the default, for technical reasons (camera sensors carry more green information. There's a bias in digital photography towards green, as the human eye is naturally more sensitive to it).

And almost never red

Welll, almost never red, because human skin carries a lot of red regardless of race, but there's times when it would be useful (maybe if I was chroma keying a tropical green and blue frog, for example)

Same subject, same denim, three screens

What A Screen Has To Be

Small, wrinkled, poorly lit screens are going to damage your key. A screen that looks fine to your eye will often fall apart under a key. Flat, bright, evenly lit green is always worth the extra setup time, if you can.

One keyer, four screens
Everything that deviates from pure green will have a worse key. Since full saturation exists in the middle values (ever seen a really saturated really light colour? Nope. Same for darks), anything that makes your screen too light or dark will give you a problem to solve in keying
The same subject, two set-upsDrag either view to look around
An ideal green screen will have its own lighting setup so that it's perfectly flat, and not affected by the dramatic lighting in shot. But try explaining that to a director of photography and you might find your own skin being used as a green screen, which would be terrible - no one's pulling a key from that.

Three Things, In Order

The pipeline, end to end

When you pull a key you aren't actually removing the colour. It's still there, but you are generating a matte: a black and white image where white means keep and black means remove. Grey means partly transparent, which is exactly what you want on hair and glass and exactly what you don't want anywhere else.

What it looks like in practice

Pulling a key is a delicate art, and in reality it often looks like doing separate keys for separate areas (for example, one pass for where your green screen is in shadow, and one for the light). Then you combine those masks, and use those masks to "chop out" the green (but again, IT'S STILL THERE. In the green channel. But the mask will be in your alpha, which will mean "don't show it, even though you're actually there)

Where the key has to be right

You're only interested in your key IN THE AREA WHERE IT COMES IN CONTACT WITH YOUR ACTOR/FOREGROUND ELEMENT. Everything else can be masked off, and doesn't need a key

Draw the garbage matte yourself
The white blob is shadowed screen the keyer has mistaken for your subject. Drag a rough shape around the person. It does not have to be neat, it only has to miss them, and everything outside it stops being the keyer's problem.
Shoot First · The Craft shootfirst.art