By Ben Bardens

There are very popular effects these days; we’ve all seen them: A live action shot, usually something dynamic. The action freezes as the background drops out to be replaced by a solid color or illustrative treatment, leaving the silhouette of the action burned in our eye. The action doesn’t necessarily have to freeze-frame. This effect can have many variations, for example, a live shot of a basketball player slam-dunking in a crowded stadium. As he’s about to slam it home, the stadium wipes out to be replaced by a solid color or treatment as the action continues. The player completes his dunk in slow motion, lifted above the background with a fancy glow or color treatment. The visual impact is amazing! People always ask, “How did they do that? It looks so cool.” The answer: Rotoscoping and Time Remapping combined can create some very sophisticated and visually gratifying effects!

In this tutorial, we’ll cover the basics for creating this effect within After Effects. You’ll need a short video clip, preferably one with good action in it, like the basketball example described above, or you can use the sample clip provided with the materials for this lesson (on the Guild website).

Figure 1 - The video frame before and after rotoscoping.

What is Rotoscoping?

Rotoscoping means painting or cutting out elements from a single video frame or sequence of video frames. Basically any type of compositing, whether it be removing an element (such as a character from a background) or adding an element (such as placing an item into a scene) can be considered rotoscoping. The term comes from the old camera stands, called rotoscopes. The rotoscope projected video against a surface so that it could be traced or have cells layered against it. Now, thanks to computers, rotoscoping and compositing, it can be done using a variety of software programs.

Which software program you use to rotoscope your frames is purely a matter or preference. Certain video applications have specific features designed to make rotoscoping easier (like keying filters for removing solid color backgrounds), but generally speaking, the level of
difficulty is going to depend on the content of the frames. Unless the footage was shot against a color screen, it is going to take a human eye to differentiate between which area of the frame to keep and which area to cut out.

For complex rotoscoping tasks, such as cutting out and preparing frames for the type of graphics described above, most editors would export their video clip as a frame sequence. The individual frames can then be opened in an image editing application, such as Photoshop, where they can be easily cut out and manipulated, and then re-imported into the editing program. This technique works great, but can be tedious if you have a large number of frames to treat. It also requires using more than one software program, which can make previewing more difficult. This is where a motion graphics program like After Effects is the tool of choice. After Effects combines the masking and graphics capabilities of Photoshop with the video editing capabilities of a program like Avid or FCP.

After Effects has long had built-in masking capabilities that make cutting out areas of frames easy. Masks in After Effects are shapes created on layers using the pen or marquee tools. These shapes can then be keyframed allowing the mask to change from frame to frame. These capabilities make rotoscoping a sequence of frames much more manageable. After Effects also contains a powerful feature for varispeeding video, called Time Remapping (see "Time Remapping" July/August, 2003). Combining these two features make creating complex rotoscoping effects in After Effects easy.

Tutorial

In this tutorial, we’ll introduce the techniques involved for combining Time Remapping and Layer Masks to create rotoscoping effects. To keep it simple, we’ll only rotoscope one frame, but in your own projects, you can initialize keyframing for the Mask Shape property and rotoscope as many frames as needed.

Start by downloading the tutorial materials from the Guild website (www.editorsguild.com/AfterEffects.html). The archive contains a low resolution QuickTime clip of an airplane flying overhead, taken from the Artbeats Transportation collection (www.artbeats.com). The archive also contains an already completed project file and QuickTime movie for your reference. The project file was created in After Effects Version 6, but this tutorial and the fundamentals it covers are good for After Effects Version 4 or later.

1.   Launch After Effects and import the TA121T.mov file. You can import either by choosing File -> Import -> File…or by dragging and dropping the TA121T.mov file into the AE project window.
2.   Create a new composition that matches the resolution and duration of the footage item by dragging the TA121T.mov file to the new composition button within the project window (see figure 2). Your new composition will open up and the first frame of the movie will display in the composition window.
Figure 2 - Create a new composition that matches the resolution and duration of the source clip by dragging the clip to the new composition button.
3.   Scrub along the timeline by dragging the blue time marker to Time=3:19. You now see the airplane in the frame.
4.   Enable Time Remapping for the TA121T.mov layer by choosing Layer -> Enable Time Remapping. In the timeline, the Time Remap property should appear under the layer name. If it doesn’t, make sure the layer is selected and push the U key on your keyboard to reveal the property.
5.   Set a new Time Remap keyframe at the current time by placing a check in the keyframe checkbox to the left of the Time Remap property in the timeline.
6.   With the new keyframe still selected, go to Animation -> Toggle Hold Keyframe. This will cause the movie to freeze-frame when the time marker gets to that keyframe on the timeline. (In older versions of AE this option is under the Layer menu.)
7.   Make a cut at the current time by choosing Edit -> Split Layer. Keep in mind that AE is a layer-based timeline. Splitting the layer creates an additional layer in your layer stack. You’ll now have two instances of the TA121T.mov layer: One which runs from Time=0 to 3:19, and then another which runs from the 3:19 (where our freeze-frame occurs) through the end of the composition.
8.   Select layer #2 and double-click it to display it in its layer window. If the layer window opens up tabbed together with the composition window, click on the layer windows tab and separate it from the composition window so that you can see both side by side.
9.   Select the Pen tool from the tools palette and then, in the layer window, draw a pen path around the shape of the airplane. The Pen tool in AE functions the same way as the Pen tool in both Photoshop and Illustrator: click once to establish a starting anchor point. Click again to add a second anchor point. A straight line will appear connecting the two anchor points. Continue to click and create new anchor points and line segments until you have outlined the airplane. As you click to make new anchor points, you can click and drag to create curved anchor points, or anchor points that contain Bezier handles or spline controls. After you have outlined the airplane, make sure to close the pen path by clicking on the first anchor point that you created. If your shape is not quite perfect, select the move tool and reposition individual anchor points to refine the shape. Just make sure to deselect the path and then select just the anchor point you intend to move. Editing path shapes can take some practice. If you get into trouble, just select the “mask 1” property under the timeline, hit delete, and start again. (See figure 3)
Figure 3 - The yellow line represents the pen path or Mask Shape, which is composed of anchor points and line segments.
10.   After you have finished your mask, only the airplane (not the sky) will be visible in the composition window. Close the layer window and deselect the mask by
choosing Edit -> Deselect all.
11.   Select layer #2 by single clicking its layer name in the timeline and then choose Edit -> Duplicate, to create a duplicate of the layer and its mask.
12.   Select layer #3 and display its Mask property by pushing the M key on your keyboard. To the right of the Mask 1 property, change the Mask Operation pop-up from Add to Subtract. This inverts the mask so the layer will display the sky background instead of the airplane cutout.
13.   Create a new solid layer by choosing Layer -> New -> Solid. In the Solid Settings dialog box, click the Make Comp Size button and then the color swatch to specify a color. I used a purplish color. Click OK.
14.   Drag the new solid layer in the layer stack so that it appears between your two duplicate TA121T.mov layers (between the sky and the airplane).
15.   With the solid layer still selected go to Filter -> Transition -> Linear Wipe.
16.   In the Effects Control window that appears, specify the Wipe Angle at 160 degrees and set the Transition Complete to 100%. Initialize keyframing for the Transition Complete property by clicking the little stopwatch next to it in the Effects Control window.
17.   Move the time marker to Time=3:26.
18.   In the Effects Control window, change the Transition Complete to 0%. A new keyframe will automatically be recorded.
19.   With the solid layer still selected, go to Edit -> Duplicate.
20.   With the duplicate solid layer selected, go to Layer -> Solid Settings. In the Solid Settings dialog box click the eyedropper of color picker and change the solid color to white. Make sure the “Affect all layers that use this solid” option is NOT checked (AE 6 only).
21.   Select layer #2 (the cutout airplane) and choose Edit -> Duplicate.
22.   Select layer #4 (the white solid) and choose Alpha Matte from the Track Matte pop-up menu to the right of the layer name. If the Track Matte pop-up menu is not visible in your timeline, click where it says Switches/Modes at the bottom of the timeline window. Choosing Alpha Matte for the solid layer will make the white solid visible only in the shape of the duplicate airplane layer above. When you choose Alpha Matte, the eyeball switch for the duplicate airplane layer above is toggled OFF. (For more on using track mattes, see “Using Track Mattes” March/April, 2003.)
23.   Select layer #2 and drag it beneath the white solid layer in the layer stack.
24.   Save and Preview your animation. The airplane now flies into view and then freeze frames. A linear wipe transition crosses the screen revealing the solid color graphic treatment..

You can now experiment by adding more solid layers with masks to create more interest. In the project2.aep sample file, I've added another solid layer with two masks, an animated position and rotation for the layer so that it moves in the same direction as the plane. When it comes to designing graphics, you are limited only by your own imagination. You can import new elements created in Photoshop or Illustrator. Create new solids and mask shapes. Add blending modes and effect filters …the possibilities are endless.

Final Word

This tutorial only scratches the surface of what can be done combining these powerful techniques. To rotoscope more than one frame, don’t make the Time Remap keyframes into Hold Keyframes. Then, initialize keyframing for the Mask Shape property and change the shape of the mask for each new frame you wish to rotoscope. You can use Time Remap or Time Stretch to change the speed of your source clip, and then use animated Mask Shapes on your layers to rotoscope frames as needed. Using the Toggle Hold Keyframe option will prevent AE from in-betweening your mask shape, which is useful if you want to rotoscope every other frame instead of every single frame.

Readers interested reviewing a tutorial on rotoscoping can go to www.barkanimation.com/guild/materials.zip.


Ben Bardens, a member of the Motion Picture Screen Cartoonists Local 839, works as a technical director and motion graphics artist in the Burbank area. He teaches After Effects and Photoshop at Glendale Community College, as well as occasional classes at Studio Arts in Los Angeles, and Moviola in Hollywood. You can find out more about his classes by visiting: www.glendale.edu/~bbardens. He can be reached at: ben@barkanimation.com..