By Rev. John Jackman, July 15, 2008
Rotoscoping is one of the tedious necessities of many visual effects today. Any time a CGI element is placed in a live scene and an actor walks in front of it, a mask or matte must be created to overlay the actor over the CGI element. There are numerous tools to do this with, ranging from the basic After Effects animated masks to plug-ins such as Silhouette. They all have one thing in common: hours of frame-by-frame tweaking.
The term “rotoscoping” originally referred to the technique developed by the Fleischer Brothers in the 1930s for filming live subjects and tracing them into animation cel frames as a foundation for hand-drawn animated human motion. This technique was used to animate the original Superman cartoons and a number of other classics from the Fleischer studio.
Digital Film Tools Power Matte ($195, Windows or Mac OS X 10.4 or above) does not eliminate the time-consuming element of animating masks, but it does solve some issues of creating complex edges (such as hair) in a matte overlay where the subject has not been shot in front of a green- or bluescreen — though it can be used with blue- or greenscreen shots as well. And it does so with animated masks that are much simpler (and thus much less time-consuming to animate) than would be necessary to produce the same results on a complex foreground shape.
Power Matte operates as a plug-in for Adobe After Effects. It is quite similar to the AE Inner/Outer Key effect, except that it works much better for many images. Two AE animated masks are used, one drawn just inside the foreground image and one outside to define the background. The area in between the masks is examined for edge values, and a transparency matte is created.
 Figure 1 – Actor Burgess Jenkins (Remember the Titans, The Reaping) portrays John Wesley in the feature film Wesley. Masks are drawn just inside the foreground area and just outside.
To use Power Matte, set up an AE project and import the scene that you need to rotoscope, as well as other background footage or CGI elements that must be included in a final composite. I’ve intentionally chosen a shot that will demonstrate what Power Matte does well and where it will struggle. Now, starting just before the needed in-point, draw the two masks that will define the foreground and the background. (See Figure 1). Unlike the AE Inner/Outer Key, these can be either open masks (as we’ll see on our footage) or closed masks. The Inner/Outer Key effect can only utilize closed masks.
To create masks in After Effects, select the Pen tool and left-click to add mask points to the image in the Composition window. Make sure the mask extends to the edge of the frame if it will be an open mask. To close the mask, click on the first point that you selected. To create the next mask, you have to select another tool and click on the frame before re-selecting the Pen tool to start the next mask. The easiest way to do this while the Pen tool is selected is to use Ctrl-click (Win) or Cmd-click (Mac) on the image in the Composition window. This temporarily activates the Convert Point tool. The next time you left-click, a new mask is created. Add the fewest points possible to create an effective mask! The more points you add, the more tedious the animation; but adding too few points will also created problems following a changing shape. Be sure to fully exploit the Bezier curve option whenever possible; this permits the use of fewer points, yet the shape of the curve can be animated easily. Non-Bezier points should only be used at fairly sharp corners. All masks should be set to Mode/None.
 Figure 2 - The Mask Shape Timevary stopwatch must be selected to animate the shape of the masks.
Now, the masks must be animated to roughly match the motion of the foreground subject
. To animate masks so that they move over time, you need to turn on the Timevary Stop Watch icon for the Mask Shape parameter in the Timeline (see Figure 2). You want to create the fewest possible keyframes and let After Effects interpolate the rest. To do this, scroll next to the out point in the clip and adjust the masks for that frame. Now scroll to a midpoint and adjust the mattes, creating keyframes for that point. Scroll through the footage and find where other keyframes must be added to keep the motion of the masks consistent with the foreground subject. Segments with sudden changes in trajectory or speed will need more keyframes than other areas.
Once the dual masks are animated to your satisfaction, apply Power Mask to the footage layer. In the control for Foreground, select the mask that is inside the foreground subject (in this case, Mask 1). In the control for Background, select the mask that is outside the foreground, defining the background (in this case, Mask 2). See Figure 3, which shows the Effect controls. The area outside of Mask 2 will be transparent and the area inside of Mask 1 will be opaque; the area between them is where Power Matte will work to define edge and transparency.
 Figure 3 – The effect controls for Power Matte; the foreground and background masks are selected here.
Other controls are available as well, though the classic edge controls usually found in keying plug-ins are absent. You can link multiple masks together using either a common color or a common name. Sill control is available for blue- and greenscreen footage; and additional masks can be linked as Holes in the principal foreground.
 Figure 4 – The final output shows the strengths of Power Matte in the clean wisps of hair, but also shows that where the difference between foreground and background is muddled or noisy, Power Mask can’t read your mind!
The output (Figure 4) shows that Power Matte works best where there is a clean, non-noisy background that is clearly different from the foreground. It does a great job on clear, well-defined edges and in dealing with wispy hair edges or semitransparent foregrounds such as smoke or water. But let’s face it, no matter how fancy the algorithm, software can’t read your mind. If there is little visible difference between the foreground and background, Power Matte is going to have trouble finding the edge. You can see this on the actor’s left arm, where the busy weave of the curtain together with a marginal difference in the luminance values combine to create a messy edge. When necessary, these areas can be dealt with through more detailed, careful animation of the masks so that they closely follow the desired edge. The closer the masks are together, the easier it is for Power Matte to find a clean edge. This is a lot of work, but it’s still a lot less work than manually animating the entire complex mask that would be needed for this shot!
Once a clean matte is created, any number of effects can be applied to this shot. The color balance of the wall can be changed without changing the subject; the wall rack can be eliminated or swapped out for a CGI unit; a painting can be hung on the wall. The matted actor can still walk in front of these features.
Power Matte makes the tedious chore of rotoscoping significantly easier for many shots. As always, it’s best to know you will be using roto and plan shots to accommodate the need for relatively clean backgrounds in production. Avoid background colors that are too close to colors in the edge of the foreground subject. Often this can be done with a minor lighting tweak or angle change; but lack of planning will mean it’s back to hand-animating every bit of a complex mask!
|