Week 08

Week 08 – Topics

Mattes, masks and stencils
Creating Transparency
In-class lab time: Work on Typography in Motion project

  • masking tools, creating mask shapes
  • Rounded Rectangle tool
  • Free Transform Points
  • masking in the Layer panel
  • Mask Feather
  • animating a mask path
  • creating a vignette; Mask Expansion
  • masking with the Pen tool
  • creating and editing Bezier masks
  • effecting a masked area
  • controlling mask path interpolation
  • using effects with the mask path
  • Mask Modes and multiple masks
  • Mask Opacity
  • creating and editing RotoBezier masks
  • Audio Spectrum effect
  • Alpha Track Matte
  • nesting a track matte composite
  • Luma Track Matte
  • animating matte layers
  • Stencil Alpha and Stencil Luma
  • effects with track mattes and stencils
Week 07 – Assignment

1) Your “Typography in Motion” project and the storyboard are due Tuesday, April 19 (Week 09). Be sure to have your project file ready to show in class.
Project specification:

  • Dimensions: 640 pixels x 480 pixels or you can use 720 pixels x 480 pixels
  • Length: 30 seconds or less.
  • Render the file as a QuickTime (.mov) file. This .mov file is the file you will copy to my dropbox.
  • You must add sound, feel free to use your own or use an audio file from the SMC sound library. On any SMC AET computer, click on the Finder to open a window. Click on the Globe icon with the question mark to connect to the server. You’ll see a disk marked SOUND LIBRARY.  These are audio files available for your use.

Helpful Dos and Don’ts

  • If a layer is created using vectors – such as Illustrator artwork – you can enable its Continuously Rasterize switch so that it remains sharp.

  • Use the Keyframe Assistant to add Easy Ease in (or Easy Ease out) to create more professional looking motion in your animations.
  • If you are having trouble Previewing your work, decrease your Resolution/Down Sample Factor from 100% to 50%.
  • Your design files should be RGB not CMYK.
  • Manually animating text in After Effects is complex … make use of the Text Animation Presets!
  • Remember that the objective of this assignment is for you ro demonstrate your understanding of the things we’ve covered in this class over the past six weeks: keyframing, basic animation, animation and text pre-sets, trimming layers, working with Text, working with shapes, rendering.
  • Pay attention to your file structure… remember you are linking your files to your .aep file so if you move it, you need to re-link it. Also, don’t work off of your Flash drive. Copy your files to your hard drive, always!
  • Be careful about the dimensions of your comp! Be sure you’re not creating a comp that is bigger than 720 x 480.  (Check it to make sure it’s not 4300 x 3200px or something equally too large!!)
  • To output sound make sure you have enabled your audio output. From the render queue, look for the Output Module, click on  “Lossless.” This will open the Output Module Settings. Check the box for Audio Output.
Importing Photoshop and Illustrator files

After Effects can import Photoshop and Illustrator files several different ways:

  • flattened into a single image (Footage: Merged)
  • selecting just a single layer to bring in (Footage: Choose layer)
  • as a composition where all of the layers exist as their own footage items which you can then animate. (Composition: Retain Layers)
Editing Photoshop Text layers

Import PSD as a Compostion with Retain layers>  Select Editable layers
Select a layer with Text and from Layer > Convert t0 Editable Text

2) We will discuss the second half of Lesson 4 – Creating Transparency next week.

Lesson 4 – Creating Transparency

Adding your own transparent areas to an image using masks, track mattes, and stencils.

Masking is a way to cut out sections of a specific layer.

A mask path says “I want to see only the area inside this shape; make the area outside transparent.”

You can draw your own shapes and paths directly on the layer, or copy paths from the Adobe companion programs Photoshop and Illustrator and paste them onto an After Effects layer to create a mask path.

Track mattes, by contrast, involve the combination of two layers. One layer – the matte – is used just to define transparency; you don’t directly see the image it contains. This matte is then used to decide what portions of the layer immediately below it are visible.

There are two types of mattes:
1. alpha mattes, which use the matte’s alpha channel to define the transparency of the second layer
2. luminance (or luma) mattes, which use the luminance – grayscale values, or brightness – of the matte layer to define the transparency of the second layer.

Stencils take the concept of track mattes further: Rather than define the transparency of the next layer below, a stencil layer defines the transparency of all the layers below, cutting a hole through the entire layer stack. Just like mattes, stencils can also be based around alpha channels or luminance.


  • Masks involve one layer
  • Mattes involve two layers (the fill and the matte)
  • Stencils are basically mattes that can affect multiple layers below them.
Page 90  masking tools, creating mask shapes

Open > 00-Masking*practice

Select the layer Wildflowers.mov
If no layer is selected, you will create a Shape Layer instead of a mask path
Use the Shape or Pen tool to draw a mask

To start over, either Undo or select Layer > Mask > Remove All Masks.

You can use modifier keys (see table on page 90) to alter shapes as you drag them.

Both Masks Paths (this lesson) and Shape Layers (Lesson 11) are created using the same Shape and Pen tools. So, how do you know which you are creating?

  • If no layer is selected, you will create a new Shape layer.
  • If any layer other than a Shape layer is selected, you will draw a Mask.
  • If a Shape layer is selected, a pair of buttons to the right in the Tools panel determine whether you are creating a new Shape Path or a Mask for the Shape layer.
Page 91  Rounded Rectangle tool

Comp >  01-Masking*starter

Select the foreground layer Cityscape.mov.
Select the Rounded Rectangle tool from the Shape tools menu
Click and drag in the Comp panel to surround a few of the major buildings on the right, plus some of the freeway.

After you release the mouse, Mask 1 will be revealed in the Timeline panel.
With Cityscape.mov selected, press “M” to reveal its Mask Path parameter as well. “M” is the shortcut to reveal Mask and Mask Path for any selected layer

Page 92   Free Transform Points

Press “V” for the Selection tool.
Then double-click on the yellow mask outline; this will enable its Free Transform Points, which means you can edit its shape.

Note the eight small boxes (“handles”) around its shape: As you hover your cursor over these, the cursor will change to icons that indicate you can click and drag to resize or rotate the shape.

Dragging anywhere else moves the entire shape.

Page 92  masking in the Layer panel

Double-click Cityscape.mov to open its Layer panel.
Along the bottom of the Layer panel is a View popup; check that it is set to Masks

Select the Ellipse mask shape tool.
Hold down the Shift key while dragging out a new mask shape in the left half of the layer; this will constrain it to draw a perfect circle.

Page 93   Mask Feather

With Cityscape.mov still selected, type Shift + F to reveal the Mask Feather parameter in addition to Mask Path.
Turn the Toggle Visibility button (at the bottom of the Comp panel) off to more clearly see the outlines, and scrub Mask Feather to soften the masks.
Set Feather for both masks.

Apply Effect > Perspective > Drop Shadow to Cityscape.mov

Slightly increase the Distance and Softness of the shadow

Page  94 animating a mask path

Start at beginning of timeline 0:00
Bring the Project panel forward, and open the Sources folder.
Import > the footage “Bring on the Night.ai”
Add to the Comp as the top layer

Add Effect > Generate > Fill.
Click on its Color swatch, and change it to white.

Add Effect > Perspective > Drop Shadow, and adjust the Distance and Softness

With Bring on the Night.ai selected, double-click on the Rectangle mask tool.
This will add a mask to it that is the same size as the layer
Enable the Toggle Visibility switch to see its outline in the Comp panel.

Type “M” to reveal the Mask Path parameter
Move to 01:00
Enable keyframing for Mask Path

Return to 00:00.
Double-click on the mask outline in the Comp panel to bring up the Free Transform Points.
Drag the handle on the right edge all the way to the left until the title is completely hidden.
A new Mask Path keyframe will be created automatically at 00:00

Increase the Mask Feather for the title’s mask. You need to increase only the first value, which is in the X (horizontal) direction.


Page 95  creating a vignette; Mask Expansion

Masks can also be used to create a “vignette” where the edges of an image are darkened, focusing the viewer more toward the center of the screen.

Return to 00:00
Create a Layer > New > Solid
Click the Make Comp Size button, and set the Color
Name it “vignette”

Click and hold on the Mask tool; a popup will appear.
You want a rounded mask for this task, so select the Ellipse tool option, and release the mouse.
Then, with the vignette layer selected, double-click this tool in the toolbar to create a full-size oval mask.

Type M + M (two Ms in quick succession) to reveal all of the mask properties, and make the following edits:

  • Click on the checkbox next to Inverted: Now the mask solid will be transparent inside and opaque outside.
  • Scrub the Mask Feather until you get a nice, soft falloff around the edges.
  • Scrub the Mask Expansion property: This offsets a mask to draw inside or outside of the original Mask Path. (To better see its effect, temporarily turn Mask Feather down to zero.) Increase Mask Expansion to push the vignette off into the corners.
  • If the corners are too dark, reduce the Mask Opacity value (or use the regular Transform > Opacity property). Then feel free to balance the Mask Feather, Opacity, and Expansions values off of each other to get the look you want.
Page 96   masking with the Pen tool

Comps> 02a-Bezier*starter
Select PinkTulips.psd

Select the Pen tool. When you do, a RotoBezier option will appear on the right end of the Tools panel; turn it off for now.

Page 96   creating and editing Bezier masks
  • To create straight line segments, click with the mouse to create a series of points.
  • To create curved segments, click and drag to pull out Bezier handles for the point you are creating.
  • To reposition any point or handle before you’re finished drawing a mask, temporarily toggle to the Selection tool
  • Click any point other than one you just drew to delete it
  • To add a new point between points you’ve already drawn, click on the line joining them
  • To close a mask path, click back on the first point. Only closed masks create transparency

You can switch back to the Selection tool for editing a mask. However, some of the shortcuts will then change. Because closing the mask creates transparency, if you need to see the entire image, we suggest you edit the mask path in the Layer panel with the Render switch off. Feel free to zoom in as well.
Press V to change to the Selection tool, and practice the following:

  • To add or delete points, hold down G (to temporarily switch to the Pen tool) and click. The cursor will automatically change to a Delete Vertex tool when you are near a mask point, and an Add Vertex tool when you are between points.
  • To toggle a point between a smooth and sharp corner point, press Control + Alt and click on the point.
  • To break Bezier handles, hold down gand drag on one of the handles. To rejoin the handles, start dragging one of the handles, then press Alt and continue dragging to create a smooth point again.

Practice drawing a mask around the foreground tulip. It will require a combination of smooth shapes and sudden direction changes where some of the petals overlap or meet the stem. It’s fairly challenging, but a good example of a task you will often need to perform in the real world. Our version is in the Comps_Finished folder (02a-Bezier_final), pictured to the right.

Page 97  effecting a masked area

Comp > 02b-Masked Effects*starter

  • Select the PinkTulips.psd layer, and select Edit > Duplicate
  • Select the bottom layer, and select Layer > Masks > Remove All Masks.
  • With the bottom layer still selected, apply Effect > Color Correction > Tint to make it black and white

Because closing the mask creates transparency, if you need to see the entire image, we suggest you edit the mask path in the Layer panel with the Render switch off.

Page 98   controlling mask path interpolation

Comp > 03-Interpolation*starter

If the Mask Path property and its keyframes are not visible, select the layer leaf shapes and press “U”


When you see mask interpolation problems such as this, the most likely culprit is the little-known First Vertex Point (FVP). The FVP of one mask path always interpolates to the FVP of the next mask path, and the rest of the points do what’s necessary to follow.

Click on the words Mask 1 in the Timeline to select the mask path
Make sure Toggle Mask Views is on.
Move to 00:00
(Hint: it is at the bottom left of the maple leaf stem).
This larger point is its FVP.
Jump to the second keyframe, and look for the FVP; it is at the top of the oak leaf.

Interpolation works best if all of the FVPs are at the same relative point of a shape, such as the top or bottom.

Jump to the earlier maple leaf shape keyframe.
Drag a marquee around the top mask point so just this one keyframe is selected.
Select Layer > Mask and Shape Path > Set First Vertex; you can also right click on the point and choose the same option.

Another reason mask paths don’t interpolate smoothly is if there are different numbers of points in each shape. Watch the mask points move as you scrub the time indicator; they will “crawl” around the leaf stems, causing the shape to twist. You can often fix this by adding extra points to one side of one shape to balance them out.

Page 99  using effects with the mask path

Comp >  04-Effects*starter

Select the Sunprints_A layer, and apply Effect > Generate > Scribble
Scrub the Start and End values; they control how much of the leaf is filled. Set Angle to 90° so that the scribble will fill in from top to bottom.

Start at 0:00
Set both Start and End to 0%; the scribble will disappear.
Click on the stopwatch to enable keyframing for End, which will set a keyframe at this value.
Move the current time indicator to 02:00, and set End to 100%, which fills the mask shape. A keyframe will be created for you. Preview

Page 100   Mask Modes and multiple masks

Open Comps > 05-Mask Modes*starter

Select the Wildflowers.mov layer.
Double-click the Ellipse took to add a full-frame oval mask.

Type “M” to reveal Mask 1
Rename Mask 1 by selecting it, pressing R, typing “oval mask”, and pressing Return.

Open Comps_Finished > 03-Interpolation_final.
It contains the finished piece
Select the layer, reveal Mask 1, click on the words Mask Path to select its keyframes, and copy.
Bring the comp 05-Mask Modes*starter forward again
Make sure Wildflowers.mov is still selected, then deselect your first mask path but leave the layer selected – otherwise, you may paste over the first mask by accident!

Position the current time indicator at 00:00, and paste the leaf mask and its keyframes.
It will default to Add mode, which was its setting in its original comp.
Make sure Toggle Visibility is enabled; you should now see the leaf mask inset inside the oval mask. Rename this new mask “leaf shapes” to help remember which mask is which.

Change the Mask Mode popup for leaf shapes to Subtract: You will now see the wildflowers inside the oval, but not inside the leaf shapes.
Continue to experiment with the Mask Modes to get a better feel for them – for example, set the oval mask to Subtract and leaf shapes to Add.

Page 101   Mask Opacity

Open > Comps_Finished > 06-Transition_final
Select Cityscape.mov, and make sure Toggle Visibility is enabled

Scrub the current time indicator through the timeline, and note how the mask shapes inside the Comp panel are filled in as you go between Mask Opacity keyframes.

Open Comps > 06-Transition*starter

  • To view the entire, unmasked video while creating your mask paths, double-click Cityscape.mov to open its Layer panel. Set the View popup to Masks, and uncheck Render.
  • Draw a series of masks, focusing on different parts of the video. If your shapes do not add together to cover the entire video, draw one more mask shape that includes the entire video image.
  • Close the Layer panel, and type T + T (two Ts in quick succession) to reveal the Mask Opacity properties for your masks. Keyframe them fading up from 0 to 100% to bring on the masks. Offset the timing of the keyframes to create a staggered fade.
Page 102   creating and editing RotoBezier masks

Open Comps > 07-RotoBezier*starter
Select PurpleFlow.mov

Select the Pen tool
A checkbox for RotoBezier will appear. Check it.
Get a feel for RotoBezier masks by clicking around in the Comp panel. You don’t need to drag any handles to create a Bezier curve; After Effects will create curves automatically.

To form a hard corner at a RotoBezier point, with the Pen tool still active hold down the Alt key and click on a point. To change its tension, hold down Alt and click-and-drag left and right to select from a range between a sharp corner to a generous curve.

Select Layer > Mask > Remove All Masks.

Press H, and using the same technique, create an open path that runs just above the flowing purple shape. This will be your first mask path. Press “M” to reveal its Mask Path in the Timeline panel, and enable keyframing by clicking on its stopwatch.

The yellow mask path can be hard to see against the white background, so click on the yellow swatch for Mask 1 and choose a more visible color, such as red.

Next, you will edit this starting mask path to animate along with the undulations of the flowing purple ribbon. Move the current time indicator forward 15 frames, and press “Y” return to the Selection tool. By default, all of the mask points are selected. Drag a marquee around just one mask point to select that point, and move it into a new position that better follows the purple shape.

If you want to add or delete a point, hold G click on a point or along the mask shape. Note that adding or deleting a point will affect existing and future keyframes as well.

If you want to tweak tension of a point when the Selection tool is active, press Control ALT, click on a point, and drag left and right through that point.

Continue this for the duration of the comp. You can scrub the current time indicator back and forth to check your progress.
If you lack patience, open our comp 07-RotoBezier_final where we’ve animated the mask path and changed the temporal keyframes to Auto Bezier. Continue with the rest of this exercise using our comp. Audio Spectrum Effect

Page 103   Audio Spectrum effect

Audio Waveform and Audio Spectrum are two examples of effects that draw along a mask path. Although they must be driven by an audio layer in the comp, you don’t apply them to the audio layer – you apply them to a layer with pixels!

Select PurpleFlow.mov
Apply Effect > Generate > Audio Spectrum effect.
The Effect Controls panel will open. Make the following changes to the default settings:

  • Set the Audio Layer popup CoolGroove.mov (the audio track in this comp).
  • Set the Path popup to Mask 1; otherwise, Audio Spectrum will draw along a straight line defined by its Start and End Point.
  • Enable the Composite On Original option at the bottom of its settings. RAM Preview, and feel the groove.

Disable the Toggle Visibility option to see the effect more clearly in the Comp panel.
You can tweak the other Audio Spectrum settings to taste.
For our version, we eyedroppered colors from the PurpleFlow.mov for Audio Spectrum’s Inside and Outside Colors. We also increased the Thickness, reduced the Softness, and set Hue Interpolation to 90 degrees.
Play with increasing the Maximum Height, and check out the different styles in the Display Options popup. Save your project when you’re done.


No comments yet.

Add Yours

  • Author Avatar


Comment Arrow

About Author


Instructor for Graphic Design 71