Animating a Draw Mask in Final Cut Pro

Recently, Paul wrote:

“I am having an issue with the Draw Mask in Final Cut Pro. I have a 7 minute clip that I have had to put a mask on to make it look like a similar location to where the rest of the video was shot. I do need to add an animated mask, because the masked area appears behind the interview and interviewee, so the mask needs to move as the subjects move. I watched several tutorials on Youtube and feel like the tutors may have neglected to mention a step, because as I was adjusting the mask, frame by frame, I stopped to see how it was working, and as I played back the clip, the mask did not move.”

Good question. The draw mask is an effect that creates a free-form shape that determines which part of an image remains visible.  Draw masks almost always require two layers of video.

Draw masks are useful in a variety of ways. For example, blurring backgrounds, removing mics and light stands, or color correcting a face without changing the rest of the scene.

To answer this question, let’s take it in three steps:

A NOTE ON KEYFRAMES

A “keyframe” is a point of change during playback. If the object you are masking doesn’t change position, shape or size during the clip, you only need to create one set of mask control points for the entire clip and no keyframes.

In terms of position, create the mask on the first frame of the clip.

However, if the object you are masking changes position, size or shape during playback, create the first mask on the LAST frame before that movement starts. If the movement is immediate, then put the initial set of control points on the first frame of video. Otherwise, put the initial set of control points on the frame before movement starts.

As a reminder, the frame that contains these control points is determined by the position of the playhead in the timeline. (You could use the skimmer, but the playhead is easier to position precisely.)

When the mask changes during playback, you’ll also need to create keyframes that reflect these changes. This tutorial shows you how.

GET READY

In this example, I want to mask this moving slab of nearly-molten steel so that it is in full-color, while the background is black-and-white.

This means I’ll need two copies of the clip in the Timeline. The top clip holds the mask which isolates the foreground, while the bottom clip has the desaturated background.

To remove the color from a clip, apply Effects > Color > Black & White to the clip on the bottom layer. Then, select the lower clip and type V to make it temporarily invisible.

CREATE A DRAW MASK

The screen shot on the left is where the clip starts, while the image on the right is where the clip ends. Obviously, we will need to change the size and position of the mask as the shot progresses. This involves creating the mask, then modifying its shape during playback using keyframes.

To add a Draw Mask go to Effects Browser > Masks > Draw Mask and drag the effect on top of the clip you want to mask. In our example, this is the clip on the top layer.

Make sure the playhead is on the frame where you want the mask to start, then click in the Viewer to draw a Bezier shape around the area you want to mask. Each time you click in the image FCP sets a mask “control point.”

NOTE: Click to create corners. Click and drag to create curves. I’ll explain how to adjust curves in a bit.

Keep clicking until you’ve traced the edges of the entire object. Make sure to click back on the starting point to close the shape.

One the shape is closed, you’ll only see that portion of the frame that’s inside the mask. This is why we need two layers, the clip on the lower layer provides the missing background.

To convert a corner into a curve, or to convert a curve into a corner, control-click one of the black control dots and select Smooth. Two white “handles,” ending in white dots, appear. If you created a curved corner when you drew the mask, simply clicking the control point will display these handles.

Drag a white handle to change the shape of the curve on both sides of the control dot.

The easiest way to see how these controls work is to play with them.

A NOTE ON CONTROL POINTS

The secret to setting control points is to create as few as possible and use curves as much as possible. As objects move and change position, having too many control points becomes a problem.

While it is frustrating, it is not unusual to have to start all over and redo a mask to reduce the number of control points you use. Masks are tricky.

ADJUST A DRAW MASK

Once the initial mask is drawn you can adjust the settings.

Shape type:

Most of the time, Bezier is the best choice.

NOTE: Feathering can be added at any time. My STRONG recommendation is to draw the mask with feathering off, then add feathering once the mask is complete. It is easier to see exactly where you are putting and adjusting control points when feathering isn’t getting in the way.

Feel free to play with each of these settings to see what they do.

ANIMATING A MASK

Animation, in this case, means to change the position of each control point – often on a frame-by-frame basis – so that the shape of the mask changes during playback.

NOTE: If the object you are masking doesn’t change size or position you don’t need to animate anything.

Before you move the playhead from that first frame, click the Set Keyframe button (red arrow) in the Control Points menu. This tells Final Cut you plan to change keyframe positions during playback of this clip.

NOTE: You know you clicked the correct button when a yellow diamond appears on the same line as “Control Points.” Going forward, once you create your first set of control points and enable keyframing, FCP will create all other keyframes automatically.

SECOND NOTE: If you only need to move the mask, but not change its shape or size, apply keyframes to the Transforms settings.

Where you put the playhead next depends upon how much movement the object being masked creates. You may get lucky and only need to set new controls every few seconds. Or, you may need to adjust them every frame. Sigh… I rarely get lucky, which is why masking takes seemingly forever.

In the two screen shots above, the object got bigger and changed location during playback. So I needed to move the existing control points, and adjust their curves to cover the new shape. Remember: move the existing points, not create new ones.

To add keyframes to the mask do NOT! create new control points. Instead drag an existing control point to a new position.

COMPLETE THE EFFECT

When you’ve customized the mask for the entire clip, select the bottom clip (the one that’s black-and-white) and type V to make it visible again.

Then, play the timeline and study the effect. If all goes well, it looks great. If not, tweak your control points until it does.

Masking is a time-consuming and persnickety task. However, if you do it right, your viewers will say: “Hey that looks cool.” And it does.


Bookmark the permalink.

4 Responses to Animating a Draw Mask in Final Cut Pro

  1. Rich S says:

    Thanks Larry! I was editing a clip yesterday of my sons riding bikes with a 3D text graphic that casts a shadow. I’ve never really had to mask something with so much motion before. Instead of copying the clip and putting it over the original, I tried to mask inside the 3D title and it didn’t go so well (I had already nested multiple compound clips to ask out each of my sons, so I think my brain had masking overload!). This method seems so much more straightforward – heading back down to the salt mines to try it out!

  2. Tristan says:

    Thank you for this.

    When I want to transform a draw mask (e.g. a laser beam moving across the screen), is there a shortcut for add a transform keyframe.

    • Larry says:

      Tristan:

      Maybe. If you have drawn the mask and need to change its SHAPE using the Transform controls in the mask, enable the keyframe button discussed in this article. Each time you move the playhead and adjust the position of a mask control point, it will automatically create a new keyframe. No keyboard shortcut is necessary – just drag the control point.

      If you have drawn the mask and need to change its POSITION, without changing its shape, that’s done using the Transform settings in the Video Inspector. There, you can type Option + K. This sets a keyframe for EVERY Transform settings. The good new is this is fast and easy. The bad news is that you may not want a keyframe created for every setting.

      Inside Final Cut, go to Final Cut Pro > Command > Customize and search for “keyframe” to see all the existing keyframe shortcuts.

      Larry

Leave a Reply

Your email address will not be published. Required fields are marked *

Larry Recommends:

FCPX Complete

NEW & Updated!

Edit smarter with Larry’s latest training, all available in our store.

Access over 1,900 on-demand video editing courses. Become a member of our Video Training Library today!

JOIN NOW

Subscribe to Larry's FREE weekly newsletter and save 10%
on your first purchase.