After Effects Animations: Keying

Keying is an important part of AE if you are using items or characters on different backgrounds. You know the infamous green or blue screens. The reason green is used so often is that the human body has shades of red already in the skin–green is the opposite of red, so it’s a great background color for contrast. A vibrant green is easy to key, thus it’s also easy to extract and make transparent–this allows you to replace the screen with a different background.

In this next section let’s learn the following:

Built-in Keying Tools

After Effects offers many tools for keying that can be found inside the Effects and Presets Panel, you can also find them by going to Effect > Keying. Some of the keying tools that AE offers are:

Color Difference Key

Color Range

Keylight

Color Key

Plus many more depending on your version of After Effects.

Masking

It’s useful and more efficient to mask out unwanted areas of footage that you are not going to see. For example, if you have a dancer in front of a green screen, great! But if the footage was filmed from 45 feet away, and you can see various objects around the border of the green screen the dancer was filmed in front of, you’re going to want to mask out those areas to keep a solid selection in and around your focal point.

Just remember, the subject will move and you don’t want to have to consistently animate your mask, so try to maintain a decent amount of space around them. You want to just mask out the nonsense around the border of your footage. This will make keying much easier.

To create your mask, first select the layer you want to place the mask on, then select the Pen Tool from your toolbar. Draw out your mask directly on the layer. Your mask doesn’t have to be perfect the first time around–you can always go back and adjust the segment points.

Once you have completed the shape of your mask, the outside area will become transparent. This area will reveal the background color of your comp, so make sure your background is black for best results. You will want to scroll through your footage and make sure that no one moves beyond the borders of your mask or you will have to animate your mask’s shape as well.

Join Our Creative Community

Access the best video tips, design hacks, and deals straight to your inbox.

Removing Unwanted Background

Now that you have your area masked, you’ll want to remove the background. Select your layer and go to Effect > Keying > Color Key. Once you select this as your effect, the Control Panel will open up. Select the Eyedropper and click on an average green area to set the Key Color that will be removed.

Once you’ve clicked on this area, AE will start to cut out the green. To improve your final look, you will have to adjust the values for the Tolerance and Edge settings.