Professional Documents
Culture Documents
Module 2
Introduction to After
Effects – Part 2
Intended Learning Outcome
• Copying and Pasting Keyframes
• Setting the Parent Layer
• Working with Null Objects
• Defining the Expression
• Modifying Simple Expression
• Use of Wiggle Expression
• Pre-compositing and Nesting
Copying and Pasting Keyframes
Keyframes
Keyframes are used to create and control animation, effects, audio properties, and
many other kinds of changes that occur over time.
A keyframe marks the point in time where you specify a value, such as spatial position,
opacity, or audio volume.
Values between keyframes are interpolated. When you use keyframes to create a
change over time, you must use at least two keyframes – one for the state at the
beginning of the change, and one for the state at the end of the change.
Copy and Paste Keyframes
You can copy keyframes from only one layer at a time. When you paste keyframes into
another layer, they appear in the corresponding property in the destination layer. The
earliest keyframe appears at the current time, and the other keyframes follow in relative
order. The keyframes remain selected after pasting, so you can immediately move
them in the destination layer.
You can copy keyframes between layers for the same property (such as Position) or
between different properties that use the same type of data (such as between Position
and Anchor Point).
Copy and Paste Keyframes
Note:
When copying and pasting between the same properties, you can copy from more than
one property to more than one property at a time. However, when copying and pasting
to different properties, you can copy only from one property to one property at a time.
Copy and Paste Keyframes
1. In the Timeline panel, display the layer property containing the keyframes you
want to copy.
2. Select one or more keyframes.
3. Choose Edit > Copy.
4. In the Timeline panel containing the destination layer, move the current-time
indicator to the point in time where you want the keyframes to appear.
5. Do one of the following:
• To paste to the same property of the copied keyframes, select the
destination layer.
• To paste to a different property, select the destination property.
6. Choose Edit > Paste.
Setting Parent Layers
Parent and Child Layers
• After a layer is made a parent to another layer, the other layer is called the child
layer.
• When you assign a parent, the transform properties of the child layer become
relative to the parent layer instead of the composition.
Parent and Child Layers
• Parenting affects all transform properties except Opacity: Position, Scale, Rotation,
and (for 3D layers) Orientation.
• A layer can have only one parent, but a layer can be a parent to any number of
layers in the same composition.
• You can animate child layers independent of their parent layers. You can also parent
using null objects, which are hidden layers.
Parenting
A very cool and useful feature is the Pick Whip. You can select it and drag the line to
another Layer, value or other controls (1.). This process is called Parenting. It defines
the Layer you choose as the Child (2.) of the Parent, in this case the Layer above. You
can also select a Layer from the Drop Down Menu (3.) on the right side of the Pick
Whip.
Parenting
Parenting - Example
• A null object is an invisible layer that has all the properties of a visible layer so that it
can be a parent to any layer in the composition.
• Adjust and animate a null object as you would any other layer.
• A null object is visible only in the Composition and Layer panels and appears in the
Composition panel as a rectangular outline with layer handles.
When you want to create and link complex animations, but want to avoid creating tens
or hundreds of keyframes by hand, try using expressions.
An expression is a small piece of code, much like a script— that you can plug into your
After Effects projects, that evaluates to a single value for a single layer property at a
specific point in time. However, scripts tell an application to do something, an
expression says that a property is something.
Use the Expression
The expression language is based on the standard JavaScript language, but you do not
need to know JavaScript to use expressions. You can create expressions by using the
pick whip or by copying simple examples and modifying them to suit your needs.
To open the expression controls, pick the layer property you want to affect and
hold Option on Mac or Alt on PC while you click the keyframe (stopwatch) icon. The
expressions box displays, you can use it to write. edit expfll then see the expression
options including a place to write or paste your expression. You can also use the pick
whip tool to reference another layer for your expression. And you can enable or disable
your expression here without having to delete it.
Modifying Simple Expressions
Expression Editor
You can customize the code editor interface of the expression editor, including
highlighting JavaScript syntax with custom colors, line numbers, code folding, and auto-
complete.
To customize these options, select Preferences > Scripting and Expressions.
Expression Editor
Error banner
Expression Editor
Example 2: Auto-suggestions based on the commonly used components.
1. In the same expression, change the layer name from mile to MILE.
2. As you type, After Effects displays a drop-down list with a set of suggestions that After
Effects pulls from the layer names of the project..
• To add an expression to a property, select the property in the Timeline panel and
choose Animation > Add Expression or press Alt+Shift+= (Windows) or
Option+Shift+= (Mac OS); or Alt-click (Windows) or Option-click (Mac OS) the
stopwatch button next to the property name in the Timeline panel or Effect Controls
panel.
• To remove an expression from a property, select the property in the Timeline panel
and choose Animation > Remove Expression, or Alt-click (Windows) or Option-click
(Mac OS) the stopwatch button next to the property name in the Timeline panel or
Effect Controls panel.
• To link a set of properties across layers and compositions, use property links.
Select any one property or set of properties and choose Edit > Copy With Property
Links or Edit > Copy With Relative Property Links, and then paste those properties
on any layer in a composition.
Add, Disable, Link, or Remove an Expression
The pasted properties remain connected to the layer from which the properties were
copied, such that any change made to the original property is reflected in all of the
instances of the pasted property links.
You can even copy an entire layer with property links and paste it to create duplicates
that follow the changes made to the original.
Edit an Expression Manually
2. Type and edit text in the expression field, optionally using the Expression
Language menu.
Note:
To see more of a multiline expression, drag the bottom or top of the expression field to
resize it.
Edit an Expression Manually
3. To exit text-editing mode and activate the expression, do one of the following:
If you are not familiar with JavaScript or the After Effects expression language, you can
still take advantage of the power of expressions by using the pick whip. You simply
drag the pick whip from one property to another to link the properties with an
expression, and the expression text is entered in the expression field at the insertion
point.
If text is selected in the expression field, the new expression text replaces the selected
text. If the insertion point is not in the expression field, the new expression text replaces
all text in the field.
Edit an Expression with the Pick Whip
You can drag the pick whip to the name or value of a property. If you drag to the name
of a property, the resulting expression displays all the values as one. For example, if
you drag the pick whip to the name of the Position property, an expression like the
following appears:
Edit an Expression with the Pick Whip
If you drag the pick whip to one of the component values of the Position property (such
as the y value), an expression like the following appears, in which both the x and y
coordinates of the property are linked to the y value of the Position property:
Edit an Expression with the Pick Whip
If the layer, mask, or effect that you drag the pick whip to does not have a unique
name in its local context, After Effects renames it. For example, if you have two or
more masks named “Mask” on the same layer, and you drag the pick whip to one of
them, After Effects renames it “Mask 2."
Edit an Expression with the Pick Whip
The format of expressions created by the pick whip is determined by the Expression
Pick Whip Writes Compact English preference (Edit > Preferences > General
(Windows) or After Effects > Preferences > General (Mac OS)).
By default, the pick whip creates compact English expressions, which use the names
for properties as they appear in the Timeline panel for the properties within an
expression.
Because these names are coded into the application and never change, these
expressions can work when After Effects is running in another language. Any property
names that you can change are enclosed in double quotation marks and remain the
same in any language.
If you don’t plan on sharing your projects across languages, you can deselect this
preference. This preference does not affect effect names or effect properties.
Edit an Expression with the Pick Whip
If you’ve ever seen animations where light is flickering or a camera shakes, it’s likely
you’ve seen the wiggle expression in action.
Wiggle is one of the most popular After Effects expressions, as it is easy to use and
visually interesting. Instead of creating a bunch of keyframes to make a layer randomly
move, we can do this with a couple of numbers.
The Wiggle Expression in After Effects (or ae wiggle for short) is a great way to make
objects move randomly, have some sort of idle Movement in character joints, animate a
random camera shake, create wobbly text or animate a blinking/flickering light.
The Wiggle Expression in After Effects.
//freq being the frequency, so how often per second the value should wiggle //amp being the
amplitude, so how far the value should wiggle
//octaves is the number of octaves of noise to add together.
//This value controls how much detail is in the wiggle.
//Make this value higher than the default of 1 to include higher frequencies or lower to include
amplitude harmonics in the wiggle.
//amp_mult is the amount that amp is multiplied by for each octave.
//This value controls how fast the harmonics drop off.
//t is the base start time.
The Wiggle Expression in After Effects.
//Shorthand:
[wiggle(5,50)[0],position[1]]
//Shorthand:
[position[0],wiggle(5,50)[1]]
Pre-compositing and Nesting
What is Precomposing?
Precomps are used mainly to help organize complex compositions. But let’s take a
look at some of the specific reasons to use a precomp.
• Precomps can organize your timeline by grouping certain layers together, freeing
up room in the timeline and making it easier to navigate a complex composition.
• You can build an animation in one composition and then add that composition to
another. This is also known as nesting.
• Precomposing allows artists to apply keyframes, effects, and other layer changes to
a precomposition layer, and therefore affect all of the grouped layers within.
How to Precompose
• As you can see precomposing layers in After Effects is a pretty simple process.
And it can definitely be used to great effect when working in complex compositions.
• But remember that when working with these complex compositions you’ll find that
it's usually beneficial to add an existing composition to another composition. This
process is called nesting.
Precomposing and nesting are useful for managing and organizing complex
compositions:
– Apply complex changes to an entire composition