Vous êtes sur la page 1sur 23

Creating masks

You can create one or more masks for each layer in a composition
using any of the following methods:
Draw a path using the shape tools or Pen tool.
Drawing a mask path is similar to drawing a
shape path. (See Create a shape or mask by
dragging with shape tools and Create a Bezier
shape or mask using the Pen tool.)
Specify the dimensions of the mask path
numerically in the Mask Shape dialog box.
(See Create a rectangular or elliptical mask
numerically.)
Convert a shape path to a mask path by
copying the shapes path to the Mask Path
property.
Convert a motion path to a mask path.
(See Create a mask or shape from a motion
path.)
Trace color or alpha channel values to create a
mask using the Auto-trace command.
(SeeCreate a mask from a channel with Auto-
trace.)
Paste a path copied from another layer or from
Adobe Illustrator, Photoshop, or Fireworks.
(See Copy a path from Illustrator, Photoshop,
or Fireworks.)
Convert a text layer to one or more editable
masks on a solid-color layer by using the
Create Masks From Text command.
(See Create shapes or masks from text
characters.)
When you create masks on a layer, the mask names appear in the
Timeline panel outline in the order in which you create the masks. To
organize and keep track of your masks, rename them.
To rename a mask, select it and press Enter (Windows) or Return (Mac
OS), or right-click (Windows) or Control-click (Mac OS) the mask
name and choose Rename.

When creating additional masks for one layer in the Layer panel, make
sure that the Target menu in the Layer panel is set to None; otherwise,
you replace the targeted mask instead of creating a new mask. You can
also lock a mask to prevent changes to it.


Menu selections to specify a mask to target in the Layer panel
A. View menu B. Target menu
When creating or editing masks, look in the Info panel for information
such as the mask name and the number of vertices in the mask.
To create a mask that you can move independently of the primary layer
that it is masking, do the following:
1. Create the mask on a separate white solid layer, and use that
solid layer as a track matte for the primary layer.
2. Use parenting to make the solid layer a child of the primary
layer, so that the mask moves with the primary layer as if it were
applied directly. Because the solid layer is a child layer, it can
also be animated independently of its parent.
3. You can use motion tracking to make the solid layer (and
therefore the mask) follow moving objects in the primary layer.
(See Convert a layer into a track matte and Parent and child
layers.)
To the top
Create a rectangular or elliptical mask numerically
1. Select a layer in the Composition panel, or display a layer in the
Layer panel.
2. Choose Layer > Mask > New Mask. A new mask appears in the
Composition or Layer panel with its handles at the outer edges
of the frame.
3. Choose Layer > Mask > Mask Shape.
4. Select Reset To, choose Rectangle or Ellipse from the Shape
menu, and specify the size and location of the bounding box for
the mask.
To the top
Create a mask from channel values with Auto-trace
1. You can convert the alpha, red, green, blue, or luminance
channel of a layer to one or more masks by using the Auto-trace
command.
2. Auto-trace creates as many Bezier masks as necessary to outline
the specified channel values in the layer.
3. It also creates masks with the smallest number of vertices
possible while conforming to the settings that you choose.
4. You can modify a mask created with Auto-trace as you would
any other mask, and you can link its path to other path types,
such as shape paths on a shape layer, using expressions.
When you apply Auto-trace, affected layers are automatically set to
Best Quality to ensure accurate results.
To reduce the number of masks created by Auto-trace, apply a keying
effect to the layer to isolate your subject before applying Auto-trace.
1. In the Timeline panel, do one of the following:
To create mask keyframes at a single
frame, drag the current-time indicator
to the desired frame.
To create mask keyframes across a
range of frames, set a work area that
spans that range.
2. Select one or more layers.
3. Choose Layer > Auto-trace.
4. Select one of the following:
Current Frame
Creates mask keyframes at only the current
frame.
Work Area
Creates mask keyframes for frames within the
work area.
5. Set any of the following options:
Invert
Inverts the input layer before searching for
edges.
Blur
Blurs the original image before generating the
tracing result. Select this option to reduce
small artifacts and to smooth jagged edges in
the tracing result. Deselect this option to
closely trace details in a high-contrast image.
Specify the radius, in pixels, of the area used
for the blurring operation. Larger values result
in more blur.
Tolerance
How far, in pixels, the traced path is allowed
to deviate from the contours of the channel.
Threshold
Specifies, as a percentage, the value that a
pixels channel must have for that pixel to be
considered part of an edge. Pixels with
channel values over the threshold are mapped
to white and are opaque; pixels with values
under the threshold are mapped to black and
are transparent.
Minimum Area
Specifies the smallest feature in the original
image that will be traced. For example, a value
of 4 removes features smaller than 2 pixels
wide by 2 pixels high from the tracing result.
Corner Roundness
Specifies the roundness of the mask curve at
vertices. Enter a higher value for smoother
curves.
Apply To New Layer
Applies the mask to a new solid the same size
as the selected layer. This control is
automatically selected for layers that have
Collapse Transformations enabledit creates
a new layer the same size as the composition
that contains the layer.
Preview
Select to preview the mask results and the
results of the various options of the Auto-trace
command.
To the top
Creating shapes and shape layers
You create a shape layer by drawing in the Composition panel with a
shape tool or the Pen tool. You can then add shape attributes to existing
shapes or create new shapes within that shape layer. By default, if you
draw in the Composition panel when a shape layer is selected, you
create a new shape within that shape layer, above the selected shapes or
group of shapes. If you draw in the Composition panel using a shape
tool or Pen tool when an image layer other than a shape layer is
selected, you create a mask.
Press F2 to deselect all layers before drawing in the Composition panel
to create a new shape layer.
You can create shapes and shape layers using any of the following
methods:
Draw a path using the shape tools or Pen tool.
Drawing a mask path is similar to drawing a
shape path. (See Create a shape or mask by
dragging with shape tools and Create a Bezier
shape or mask using the Pen tool.)
Convert a text layer to shapes on a shape layer
by using the Create Shapes From Text
command. (See Create shapes or masks from
text characters.)
Convert a mask path to a shape path.
Convert a motion path to a shape path.
(See Create a mask or shape from a motion
path.)
Paste a path copied from another layer or from
Adobe Illustrator, Photoshop, or Fireworks.
(See Copy a path from Illustrator, Photoshop,
or Fireworks.)
Create a new, empty shape layer by choosing
Layer > New > Shape Layer.
In most cases, a new shape has a fill and a stroke that correspond to the
Fill and Stroke settings in the Tools panel at the time that the shape is
drawn. You can use the same controls in the Tools panel to change
these attributes for a selected shape after it has been drawn. Shapes
created from text are created with fills and strokes that match the fills
and strokes of the original text.
Note:
To draw a mask on a shape layer, click the Tool Creates Mask
button in the Tools panel with a shape tool or Pen tool active. For
more information about creating masks, see Creating masks.
Aharon Rabinowitz provides a video tutorial on the Creative COW
website that shows how to combine multiple paths into a single
compound shape using the Merge Paths path operation.
To the top
Vector Art Footage-to-Shape Conversion | CC, CS6
In previous versions of After Effects you could import an Illustrator
(.ai), EPS (.eps), or PDF (.pdf) file, however you could not modify the
file. Now you can create a shape layer from a vector art footage layer,
and then modify it.
With the ability to bevel and extrude objects in After Effects, you can
extrude the artwork (for example, extruded logos), as well.
See Extruding text and shape layers.
To convert a vector art footage layer to shape layer:
Choose Layer > Create Shapes from Vector
Layer. A matching shape layer will appear
above the footage layer, and the footage layer
will be muted.
The following issues are known:
Not all features of Illustrator files are
currently preserved. Examples include:
opacity, images, and gradients.
Converted shapes ignore PAR overrides
specified in the Interpret Footage dialog
box.
Gradients and unsupported types may
show as 50% gray shapes.
Files with thousands of paths may
import very slowly without feedback.
The menu command works on a single
selected layer at a time.
If you import an Illustrator file as a
composition (i.e., several layers), you
cannot convert all of those layers in one
pass. However, you can import the file
as footage, and then use the command
to convert the single footage layer to
shapes.
In this video by Todd Kopriva and video2brain, see how to quickly
convert vector graphics from Illustrator to shape layers and animate the
paths in After Effects CS6. This process is much simpler than previous
versions of After Effects.
To the top
Create a shape or mask by dragging with shape tools
The shape tools are the Rectangle , Rounded Rectangle , Ellipse
, Polygon , and Star tools.
To activate and cycle through the shape tools, press Q.
A polygon is a star without an Inner Radius or Inner Roundness
property, so the name of the shape created for a polygon or a star is the
same: polystar.
You can create a mask by dragging with a shape tool on a selected
layer in the Composition panel or Layer panel. You can create a shape
by dragging with a shape tool on a selected shape layer in the
Composition panel. If you drag with a shape tool in the Composition
panel with no layer selected, you create a shape on a new shape layer.
Note:
To draw a mask on a shape layer, click the Tool Creates Mask
button in the Tools panel with a shape tool active.
When you create a shape by dragging with a shape tool in the
Composition panel, you create a parametric shape path. To instead
create a Bezier shape path, press the Alt (Windows) or Option (Mac
OS) key before you click to begin dragging. You can release the key
before you complete the drag operation. All mask paths are Bezier
paths. (See About shapes and shape layers.)
Dragging starts when you click in the Composition panel or Layer
panel to begin drawing, and ends when you release the mouse button.
Pressing modifier keys at different times during a single dragging
operation achieves different results:
To reposition a shape or mask as you are
drawing, hold the spacebar or the middle
mouse button while dragging.
To scale a circle, ellipse, square, rounded
square, rectangle, or rounded rectangle around
its center while drawing, hold the Ctrl
(Windows) or Command (Mac OS) key after
you begin dragging. Dont release the key
until you have released the mouse button to
finish drawing.
To cancel the drawing operation, press Esc.
Note:
Each shape tool retains the settings of the most recent drawing
operation with that tool. For example, if you draw a star and modify
the number of points to be 10, then the next star that you draw will also
have 10 points. To reset settings for a tool and create a shape with the
default settings, double-click the tool in the Tools panel. (See Create a
shape or mask the size of the layer.)
Draw rectangles, rounded rectangles, squares, and
rounded squares
1. Select the Rectangle tool or the Rounded Rectangle tool ,
and do one of the following:
To draw a rectangle or rounded
rectangle, drag diagonally.
To draw a square or rounded square,
Shift-drag diagonally.
2. (Optional) If drawing a rounded rectangle or rounded square, do
the following before releasing the mouse button:
To increase or decrease the corner
roundness, press the Up Arrow key or
the Down Arrow key, or roll the mouse
wheel forward or backward.
To set corner roundness to the
minimum or maximum, press the Left
Arrow key or the Right Arrow key.
3. Release the mouse button to finish drawing. If drawing a square
or rounded square, release the Shift key after releasing the
mouse button.
Note:
Squares are created to be square according to the pixel aspect ratio of
the composition. If the pixel aspect ratio of the composition is not 1,
then squares only appear square in the Composition panel if the Toggle
Pixel Aspect Ratio button is selected at the bottom of the
Composition panel.
Draw ellipses and circles
1. Select the Ellipse tool , and do one of the following:
To draw an ellipse, drag diagonally.
To draw a circle, Shift-drag diagonally.
2. Release the mouse button to finish drawing. If drawing a circle,
release the Shift key after releasing the mouse button.
Note:
Circles are created to be circular according to the pixel aspect ratio of
the composition. If the pixel aspect ratio of the composition is not 1,
then circles only appear circular in the Composition panel if the Toggle
Pixel Aspect Ratio button is selected at the bottom of the
Composition panel.
Draw polygons and stars
1. Select the Polygon tool or the Star tool , and do one of the
following:
Drag to scale and rotate the polygon or
star as you draw it.
Shift-drag to scale the polygon or star
as you draw it, preventing rotation.
2. (Optional) Do the following before releasing the mouse button:
To add or remove points, press the Up
Arrow key or the Down Arrow key, or
roll the mouse wheel forward or
backward.
To increase or decrease the outer
roundness, press the Left Arrow key or
the Right Arrow key.
To keep the inner radius of a star
constant as you move the mouse to
increase the outer radius, hold the Ctrl
(Windows) or Command (Mac OS)
key.
To increase or decrease the inner
roundness of a star, press the Page Up
key or the Page Down key.
3. Release the mouse button to finish drawing. If Shift-dragging to
prevent rotation, release the Shift key after releasing the mouse
button.
To the top
Create a Bezier shape or mask using the Pen tool
You can create a Bezier mask using the Pen tool on a selected layer in
the Composition panel or Layer panel. You can create a shape with a
Bezier path using the Pen tool on a selected shape layer in the
Composition panel. If you draw with the Pen tool in the Composition
panel with no layer selected, you create a shape on a new shape layer.
Creating a RotoBezier path is similar to creating a manual Bezier path.
The primary difference is that direction lines for vertices and curvature
for path segments are automatically calculated.
Create a manual Bezier path using the Pen tool
1. With the Pen tool selected and the RotoBezier option deselected
in the Tools panel, click in the Composition panel where you
want to place the first vertex.
2. Click where you want to place the next vertex. To create a
curved segment, drag the direction line handle to create the
curve that you want.
To reposition a vertex after youve clicked to
place it but before youve released the mouse
button, hold the spacebar while dragging.
The last vertex that you add appears as a solid
square, indicating that it is selected. Previously
added vertices become hollow, and deselected,
as you add more vertices.
3. Repeat step 2 until you are ready to complete the path.
4. Complete the path by doing one of the following:
To close the path, place the pointer over
the first vertex and, when a closed
circle icon appears next to the
pointer , click the vertex.
Note:
You can also close a path by double-clicking
the last vertex or choosing Layer > Mask And
Shape Path > Closed.
To leave the path open, activate a
different tool, or press F2 to deselect
the path.
Draw straight manual Bezier path segments with the Pen
tool
The simplest path that you can draw with the Pen tool is a straight line,
made by clicking with the Pen tool to create two vertices. By
continuing to click, you create a path made of straight line segments
connected by corner points.


Clicking with Pen tool creates straight segments.
1. Place the Pen tool where you want the straight segment to begin,
and click to place a vertex. (Do not drag.)
2. Click again where you want the segment to end. (Shift-click to
constrain the angle between segments at the corner point to a
whole multiple of 45.)
3. Continue clicking to set vertices for additional straight segments.
Draw curved manual Bezier path segments with the Pen
tool
You create a curved path segment by dragging direction lines. The
length and direction of the direction lines determine the shape of the
curve.
Shift-drag to constrain the angle of the direction lines to whole
multiples of 45. Alt-drag (Windows) or Option-drag (Mac OS) to
modify only the outgoing direction line.
1. Place the Pen tool where you want the curve to begin, and hold
the mouse button down.
A vertex appears, and the Pen tool pointer
changes to an arrowhead.
2. Drag to modify the length and direction of both direction lines
for a vertex, and then release the mouse button.


Drawing the first vertex in a curved path
A. Placing the Pen tool B. Starting to drag (mouse button
pressed) C. Dragging to extend direction lines
3. Place the Pen tool where you want the curved segment to end,
and do one of the following:
To create a C-shaped curve, drag in the
direction opposite from the direction
that you dragged the previous direction
line, and then release the mouse button.


Drawing the second vertex in a curved path
A. Starting to drag B. Dragging away from previous direction
line, creating a C curve C. Result after releasing mouse button
To create an S-shaped curve, drag in
the same direction as the previous
direction line, and then release the
mouse button.


Drawing an S curve
A. Starting to drag B. Dragging in same direction as previous
direction line, creating an S curve C. Result after releasing
mouse button
4. Continue dragging the Pen tool from different locations to create
a series of smooth curves.
To the top
Create a shape or mask the size of the layer
1. Select the destination for the new mask or shape:
To create a shape on an existing shape
layer, select the shape layer.
To create a shape on a new shape layer
with the dimensions of the composition,
deselect all layers by pressing F2.
To create a mask, select a layer in the
Timeline panel, Layer panel, or
Composition panel. To create a mask
on a shape layer, select Tool Creates
Mask in the Tools panel with a
shape tool active.
To replace a mask path, select the mask
in the Timeline panel, Layer panel, or
Composition panel.
To replace a shape path, select the
shape path (not the group) in the
Composition panel or Timeline panel.
2. In the Tools panel, double-click the Rectangle , Rounded
Rectangle , Ellipse , Polygon , or Star tool.
To the top
Create shapes or masks from text characters
The Create Shapes From Text command extracts the outlines for each
character, creates shapes from the outlines, and puts the shapes on a
new shape layer. You can then use these shapes as you would any other
shapes.
The Create Masks From Text command extracts the outlines for each
character, creates masks from the outlines, and puts the masks on a new
solid-color layer. You can then use these masks as you would any other
masks.
Some font families, such as Webdings, include characters that are
graphical images, rather than text. Converting text from these font
families can be a good way to get started with simple graphical
elements in shape layers.
Create shapes from text
1. Select the text to convert to shapes:
To create shapes for all characters in a
text layer, select the text layer in the
Timeline panel or Composition panel.
To create shapes for specific characters,
select the characters in the Composition
panel.
2. Do one of the following:
Choose Layer > Create Shapes From
Text.
Right-click (Windows) or Control-click
(Mac OS) the layer or text and choose
Create Shapes From Text from the
context menu.
The Video switch for the text layer is turned off.
The new shape layer is created at the top of the layer stacking order.
The new layer contains one shape group for each selected character,
plus fill and stroke properties that match the fills and strokes of the text.
For characters that consist of compound pathssuch as i and e
multiple paths are created and combined with the Merge Paths path
operation.
Effects, masks, layer styles, and keyframes and expressions for
properties in the Transform property group of the text layer are copied
to the new shape layer or solid-color layer.
Create masks from text
1. Select the text to convert to masks:
To create masks for all characters in a
text layer, select the text layer in the
Timeline panel or Composition panel.
To create masks for specific characters,
select the characters in the Composition
panel.
2. Do one of the following:
Choose Layer > Create Masks From
Text.
Right-click (Windows) or Control-click
(Mac OS) the layer or text and choose
Create Masks From Text from the
context menu.
The Video switch for the text layer is turned off.
The new solid-color layer is created at the top of the layer stacking
order.
For characters that consist of compound pathssuch as i and e
multiple masks are created and combined with the Subtract mask mode.
To the top
Copy a path from Illustrator, Photoshop, or Fireworks
You can copy a path from Illustrator, Photoshop, or Fireworks and
paste it into After Effects as a mask path or shape path.
To make the data copied from Illustrator compatible with After Effects,
the AICB option must be selected in the Files & Clipboard section of
the Adobe Illustrator Preferences dialog box.
For a path imported from Photoshop to be scaled correctly, the
Photoshop document must have a resolution of 72 dpi. 72 dpi is the
Resolution setting of documents created in Photoshop using a Film &
Video preset.
note: You can also use a copied Illustrator, Photoshop, or Fireworks
path as an After Effects motion path. SeeCreate a motion path from a
mask, shape, or paint path for more information.


Path drawn in Adobe Illustrator (left) and pasted into After Effects as a mask (right)
1. In Illustrator, Photoshop, or Fireworks, select an entire path, and
then choose Edit > Copy.
2. In After Effects, do one of the following to define a target for
the paste operation:
To create a new mask, select a layer.
To replace an existing mask path or
shape path, select its Path property.
Note:
To paste a path as a shape path, you must
select the Path property of an existing shape in
a shape layer. This selection tells After Effects
what the target of the paste operation is; if the
target isnt specified in this way, After Effects
assumes that the target is the entire layer and
therefore draws a new mask. If there is no
Path propertyperhaps because the shape
layer is emptythen you can draw a
placeholder path with the Pen tool and then
paste the path from Illustrator into the
placeholder path.
3. Choose Edit > Paste.
If you paste multiple paths into a shape path,
the first path goes into the shape path, and the
remaining paths are pasted into new mask
paths. This behavior is because the paths other
than the first one dont have a clearly defined
target, so they are added to the entire layer as
masks.
To paste multiple paths into multiple shape
paths simultaneously, first create and select
multiple placeholder shape paths in After
Effects. Trish and Chris Meyer provide details
of this technique, plus related tips and tricks
on the ProVideo Coalition website.
Andrew Devis shows how to use paths from Illustrator as motion paths
in After Effects in this video on the Creative COW website.
To the top
Create a mask or shape from a motion path
You can copy position keyframes, anchor point keyframes, or an effect
control points position keyframes and paste those keyframes into a
selected mask path or shape path. When you create mask paths or shape
paths from motion paths, make sure that you copy keyframes from a
single Position property onlydo not copy the keyframes of any other
property.
Draw a motion path with Motion Sketch and then paste the path into a
mask path or shape path.


The motion path of the spaceship (top) is copied to the background layer (lower-left) and
used by the Vegas effect (lower-right).
Note:
When copying between a mask path to a motion path, keep in mind that
the mask paths values are expressed in the coordinate system of the
layer (layer space), whereas the motion paths values are expressed in
the coordinate system of the composition (composition space). This
difference may cause the pasted path to be offset, requiring you to
reposition the path after pasting it. (See Coordinate systems:
composition space and layer space.)
Create a mask path from a motion path
1. In the Timeline panel, click the name of the Position property or
Anchor Point property from which you want to copy the motion
path. (This selects all keyframes. To select only some of the
keyframes of a motion path, Shift-click them.)
2. Choose Edit > Copy.
3. To create a new mask, select the layer on which to create the
mask, and choose Layer > Mask > New Mask.
4. In the Timeline panel, click the name of the Mask Path property
for the mask into which to paste the keyframes from the motion
path.
5. Choose Edit > Paste.


Selecting and copying Position keyframes (left); then pasting
them in the selected Mask Path property (right)
Create a shape path from a motion path
1. In the Timeline panel, click the name of the Position property or
Anchor Point property from which you want to copy the motion
path. (This selects all keyframes. To select only some of the
keyframes of a motion path, Shift-click them.)
2. Choose Edit > Copy.
3. To create a new shape layer, press F2 to deselect all layers, then
click in the Composition panel with the Pen tool to create a
single-point Bezier path.
4. Press SS to reveal the Path property for the shape. Click the
name of the Path property into which to paste the keyframes
from the motion path.
5. Choose Edit > Paste.
To the top
Duplicate a shape group while transforming
When a shape group is selected in group selection mode, you can
duplicate the group while moving, rotating, or scaling it in the
Composition panel.
Hold the Alt (Windows) or Option (Mac OS) key as you drag to
transform a group.
The pointer changes to a duplication pointer (
or ) as you hold the key and place the
pointer near the group transform box.
To the top
Creating Contrasting Color for Mask Path
When the Use Contrasting Color For Mask Path preference (under
Preferences > Appearance) is enabled, After Effects analyzes the
colors near the point where you start drawing a mask. After Effects
then chooses a label color that is different from the colors in that
region. It also avoids the color of the last mask drawn.