COLOUR KEY

It's possible to use After Effects to select a colour region in a movie file and "turn the colour off," thus making the colour field transparent. This process is called "colour keying." It's a handy feature. For example, if you have animation that occurs against a colour background (such as green), you can select the region and, as a result, all of the colour pixels in the background and movie will become transparent. You can then composite the animation against artwork of some kind. The process works well for stills and image sequences, as well as movie files.

On one hand, the colour key process can be remarkably simple and straightforward, or it can be fussy and complicated. It all depends on how well you light or illuminate the colour field. But, let's not worry about that yet. Let's go through the process first.

You should import the movie or image sequence into After Effects, which should include a colour that you intend to “key out.” Make a composition and drop the movie into the composition, as a layer. It should sit above a background layer, such as a image file, colour solid, other movie, etc.

In the Timeline, click on the layer to activate it, and then go to the Main Menu > Effect > Keying, and choose Colour Range.

To set colour key options, you should call up the Effects Controls (Main Menu > Window > Effects Controls). There, you will also find the following items:

  • A Preview Window, with:
    • Key Colour Picker or "Eye Dropper"
    • Plus Colour Picker or "Plus Eye Dropper"
    • Minus Colour Picker or "Minus Eye Dropper"
  • Fuzziness
  • Colour Space (choose RGB)
  • A series of Minimum and Maximum values -- on sliders

You can also adjust the effects from the Timeline. On the movie layer, click on the Expand/Collapse button, the “triangle-shape” to the left of the Layer Name. When you expand the layer, you should find, in addition to the default Transform features, the Effects. By expanding Effects and further, you will also find the controls.

Before you remove a colour background, you should magnify the composition and artwork you intend to key out. Your selections will be more precise if you make the artwork nice and big. You do this by using the Magnification Ratio Popup, in the Main Composition Window. For example, try magnifying to 400%. For better keying, you should also set the resolution in the Composition Window to Full Resolution (but turn it back to a lower resolution later).

  1. Find the region/colour that you would like to key out:
    • Zoom into the selection, if necessary.
    • Use the Grabber Tool to move around the Composition Window, and find a good area of colour that you would like to key out.
  2. To remove a colour region, and key out the colour:
    • Refer to Colour Range in the Effects Controls (Main Menu > Window > Effects Controls). Select the Key Colour Picker (or Eye Dropper). Once you activate the button, the curser will become a Colour Picker. Move the curser/picker to the Composition Window.
    • Use the Colour Picker to select the section in the Composition Window that you intend to key out. Once you do this, the selection will appear in the Effects Controls Preview Window.
    • To add to the selection, use the Plus Colour Picker and repeat the steps above, by selecting another, similar colour section in the Composition Window. Magnify into the selection if you have to. Keep picking colour pixels. The more precise that you can be, the better. You might have to do this step several times over.
  3. You might find that some residue of the colour will remain, especially around image elements that are meant to remain in the frame. You can adjust the colour range by playing with the effect’s tolerance:
    • Fuzziness: This value, in particular, is useful in fine tuning the chromakey
    • Colour space: Use "Lab"
    • Min (L,Y,R)
    • Max (L,Y,R)
    • Min (a,U,G)
    • Max (a,U,G)
    • Min (b,V,B): This value, in particular, is useful in fine tuning the chromakey
    • Max (b,V,B):This value, in particular, is useful in fine tuning the chromakey

N.B. If you are trying to key colour around a character that you've animated, it might be easer if you were to place a mask around the animation, rather than key the whole colour field. This way, you won't have spend time trying to key regions of the field that you don't really have to key in the first place.

To make a mask:

  • On the Timeline, select the layer that you intend to mask and key, and then go to the Main Menu and choose Layer > Mask > New Mask. The Mask will appear on the layer in the Timeline.
  • In the Timeline, refer to the Mask Layer and expand it (i.e., click on the Expand/Collapse button, the “triangle-shape” to the left of the Mask Layer Name) and choose the Mask Shape. From there, refer back to the Layer Window double-click on Mask's Transform Handles and adjust them, by making a fairly tight mask around the character.
  • The new mask will appear in the layer. Expanding the layer will reveal Masks, and if you expand the Mask Layer, you will find the following:
    • Mask Path
    • Mask Feather
    • Mask Opacity
    • Mask Expansion
  • Refer to the Composition Window and look at the buttons on the lower left-hand edge of the Window. There, you will find a button that Toggles Mask and Shape Visibility (it's located between the Magnification Ratio Popup and Current Time). You should click to toggle the visibility of the Mask.
  • Once you've selected the Mask in the Timeline (and provided that the visibility is on), you'll be able to edit the Mask.
  • Use the Selection Tool to select the Mask in the Composition Window and then double-click on the Mask to activate its Transform Handles. You can use the Selection Tool to resize the Mask. Frame it around the object that you intend to mask, so that it's fairly tight around the object. This way, you won't have to try and key regions of the field that you don't really have to key anyway.
  • Use the Convert Vertex Tool (i.e., go to the Pen Tool > Convert Vertex Tool or press the G-key on the keyboard), to adjust the shape of the Mask. Using the Convert Vertex Tool will activate a vertex's handles (the small "squares" on the Mask). Hold down the Control Key while selecting a vertex and you'll be able to move the vertex around. With the Convert Vertex Tool you will be able to grab vertex handles and change the shape of the Mask.
  • To add vertex points on the Mask, you can use the Add Vertex Tool (and consequently use the Delete Vertex to remove vertex points).

You will be able to animate the mask so that it follows the character.