Keying and compositing. The act of removing and replacing portions of a shot to put together something new. For most of us, most of the time, this means keying out a green or blue screen (or any other solid color, for that matter) and placing the subject - usually a person rambling about something that makes little sense to us - over top of a different background.
Regardless of the background, there are some things that can be done to minimize the potential for a tough keying job.
In this post we’ll cover keying tips for Adobe After Effects using their native tools, but when working with footage there are some tips to keep in mind prior even to importing any footage. Good keying starts at the shoot, and anybody who has had to “fix it in post” knows that the less fixing the better.
Note that this first section only applies if you are running the shoot, or have creative input into the shoot.
First of all, putting some distance between the subject and the green screen helps in avoiding light bouncing from the screen onto the subject, creating spill. It also allows space for lights behind the subject and minimizes the harshness of thrown shadows from the lit subject.
Next, the screen. Let’s assume it’s green for the sake of this post, and besides, digital cameras are more sensitive to green anyways so we can expect better results with green.
The screen should be a non-reflective material (cotton, muslin cotton, matte paint, etc. - even a green bed sheet, if it’s a green close enough to chromakey green), and should be evenly lit, with the subject and screen lit separately. Hotspots where light is brighter than other areas may not key properly, and the darker areas will need to be cropped or compensated for.
There are lights designed to make lighting a screen easier, some even projecting a green light onto the green screen to force the evenness. Work at making the light even and ensure no parts of it are blowing out (overly bright). If the camera and software see the blown out regions as white - or anything other than green - keying will be difficult.
One cool trick is to use the subject lights (key and fill) to aid in lighting the screen if there aren’t enough lights to get the screen looking perfect on their own. Use two large softbox lights - or other large soft light sources - and place each of them aimed toward the subject, but in front of them and on angle, so that each one cancels out the thrown shadow of the other. The most important thing is that the area behind the subject is lit evenly. The rest of the frame can be dealt with later if it’s impossible to make perfect. Don’t forget regular lighting fundamentals, such as hair lights to add separation and perspective, but only if they suit the final scene.
There are a million ways to light screens and subjects, so agree or disagree with these pointers, and find which techniques work best for the scenarios you face. Feel free to post which techniques have worked best for your shoots!
To additionally avoid shadows from wrinkles and creases, clamp the screen thoroughly to the stands holding it up. While there are expensive options from video stores, most hardware stores should carry inexpensive clamps that will do the trick just fine. Alternatively, if clamps aren’t available, use something heavy and consistent to weigh the front of the screen down, pulling the wrinkles out straight down.
Cameras play a large part when figuring out a keying shot. While there are many factors which can determine the ease by which a key is pulled (cameras, codecs, etc.) we’re going to keep things generic and easy.
Some simple things to keep in mind for any camera are to, first of all, remember that the background is a non-issue in the final, composed image. Shallow depth of field is really a no-no. To avoid the possibility of the screen being out of focus, and as a safeguard against the subject moving out of focus, decrease the aperture of the camera to bring about infinite - or near infinite - focus. E.g. set the aperture to f/22 versus f2.8.
Motion blur with the subject can be an issue, particularly with DLSR cameras and any kind of movement, so be sure to increase the camera’s shutter speed to compensate. Try 1/80 of a second or better to lose that blur, as it’ll be difficult to remove green from blurred footage. Additionally, try to keep ISO set as low as possible, as higher ISO settings introduce noise into the shot. More noise means a more crumbly, pixel-ly keying job.
There are plenty more best practices, but many will be learned on the set. It’s time to import the footage into After Effects and get keying.
While most of us will have our own tips and tricks, here are a few of our favorite techniques:
Keylight settings - many settings exist in this plug-in which ships with After Effects. Let’s look at a few:
1) Screen Pre-blur: This setting adjust how much blur to apply to the matte before the key is pulled. This is handy for removing any bizarre imperfections in the footage edges. After choosing the screen color, this is generally the first place to go.
2) Screen Matte view: By working in this view to adjust the screen matte, it’s easy to see what our matte is looking like. There’s nothing worse than having a shadow from a not-totally-gone screen. Adjust Clip Black and Clip White until the subject is white and the screen area is black. If there is a line around the edge of the subject, feel free to roll back the screen with Screen Shrink. Start with -0.5 and work from there. Return to Intermediate or Final Result to finish.
There are plenty more settings, but these will get you started with Keylight.
Garbage Matte - In any keying situation, it’s good practice to create a garbage matte, which is a mask surrounding the subject to remove as much excess background as possible. This removes any darker edges, and generally saves the keyed the effort required to key out the entire screen.
Using a Track Matte to Fix Ugly Keys - Another trick to try, is using a track matte to fix rough keys. Once Keylight has been applied and set on the layer needing to be keyed, duplicate the layer. On the bottom layer, remove the Keylight effect. On the bottom layer, set the track matte to “Alpha Matte” using the top layer as the track matte. That will use the matte created by Keylight, but the clean non-keyed footage is what is seen as a final result. Pre-compose the two layers so they can be affected as one layer.
Continue to work on the pre-comped layer using things like a matte choker to clean up the edges, spill suppressor to get rid of any green spill, or use hue/saturation to desaturate green areas of the clip.
Next add “Light Wrap” to give the subject the appearance of space between them and the background.
There are many other things which can improve keying, but these will get you started. If the native After Effects plug-ins aren’t cutting it, try the keying suite including Primatte from Red Giant. It’s got a host of powerful tools to ensure great keys.
For more about improving green screen skills, be sure to visit Video Copilot with Andrew Kramer or Film Riot with Ryan Connolly, Adobe TV, and Red Giant. There are many great tutorials to help get things keying beautifully.
A tip of the hat to Brian Maffitt, Video Copilot and Film Riot for their posts, which have taught a great many of us - including this writer - to improve our work.