355
Chapter 10. Expressions
Music is math.
—Michael Sandison and Marcus Eoin (Boards of Canada)
Expressions extend the functionality in After Effects by enabling you to link elements of your project together
and apply logical and mathematical relationships.
Did your eyes just glaze over? Here is where the standard disclaimer is usually added about how artists dont
like logic and bits of math and where I promise to shield you from it as much as possible.
I dont buy it: As an After Effects artist, you already deal with this stuff all the time. If youre not making full
use of expressions, youre missing out on a more elegant approach that can eliminate tedium.
Eliminate tedium? But, you reply, expressions require the use of code. What could be more tedious to a visual
artist than managing code?
This chapter makes the case that its worth dealing with a little codeoften just one line in these examples, all
or part of which can be entered automaticallyto attain the flexibility and power of expressions. The examples
given here relate directly to other techniques explored in this book. They are practical, not theoretical.
To give you a taste of what is possible with expressions, here are some of the case studies explored in this
chapter:
Create an automatic one-to-one relationship between data from two animation channels (whether from the
same layer, separate layers, or even separate compositions)
Scale and offset property values
Link values to a slider control for easy access
Mute keyframe values by replacing them with a constant value
Loop, with several different options how you do it
Destabilize or smooth camera moves or any animation data (without affecting or destroying the data)
Use time and index values to progress animation data
Create a conditional statement that causes something to happen when specified criteria are met
Trigger actions to occur automatically under specific circumstances

Get Adobe After Effects 7.0 Studio Techniques now with O’Reilly online learning.

O’Reilly members experience live online training, plus books, videos, and digital content from 200+ publishers.