top of page

Basic After Effects Expressions to Speed up any Animation Workflow



There are three types of people in this world: People who constantly have to dig through and tweak unnecessarily large mountains of keyframes, people who can write good expressions, and non-animators.


If you’re the first, this blog post is for you. If you’re the second or third, well, I’m not sure why you clicked on this blog post, but hey, you’re welcome to stick around.


Intro to After Effects Expressions

After Effects expressions are one of the best ways to stay organized, speed up your workflow, and build out more and more complex animations. Written in Javascript, they allow a user to write snippets of code on specific properties, often referencing other properties to simply tell an object how to behave across time, rather than manually inputting every value.


The difference between a keyframes-only animator and one who can write a good expression is the difference between a backyard veggie gardener with a hand spade, and a multi-acre commercial farmer tilling things with a tractor. Are both hand tools and tractors good things to know how to use? Yes, obviously. But one has a lot more power behind it than the other.


Here are a few expressions that I use all the time to get you started.


If / Else

More of a building block than an actual expression unto itself, learning to write a clean if/else statement will unlock endless ways for you to use your creativity to come up with more complex expressions. Simply set your first condition and the outcome you want to associate with it, then set an outcome in case that condition is not met, and you’re off to the races.


if else expression inside of adobe after effects

Use this on individual properties, or as a tool to link together more complex bits of code.


Index

Every layer, every effect, every mask, every marker inside of After Effects gets an index number assigned to it. Starting at 1 and counting down from the top of the layer stack, each of these gets a number that you can use in any expression your heart desires. By default, index; refers to the layer number, but you can specify masks, markers, effects in a stack, and more by using their associated arguments: mask(index); , markerkey(index); , effect(index);.


time and index expressions inside of adobe after effects

Time

The time expression is one of the easiest ways to get an object moving. Time outputs the amount of seconds into a composition the playhead is currently on. Why this is so powerful is that it’s a number that is always increasing. Often used as a multiplier, applying time; to a rotation property keeps an object spinning forever, or tied to the evolution of a fractal noise it helps keep the texture in motion. Multiply it times itself to get exponentially higher values.


Linear

Another one of the most versatile expressions out there is linear();. Like its counterpart ease(); , linear(); looks at a specific property or variable, and maps the range of values on that variable to a different range of values on another variable.



linear expression inside of adobe after effects

If you’re lost, you’re not alone. This is a conceptual one, but something that if mastered can allow you to automate so much of your more complex rigs. Control a transition with just one slider, fade a color from one to the next based on the position or size of the object, or clean up motion graphics templates for other users via linear(); .


Conclusion

Hopefully there are a few nuggets of wisdom in here to help get you going on your After Effects expressions journey. Ultimately this is about process more than anything. But my hope is that it gives you some ideas for how to do more, and do it better. The possibilities are endless.


0 comments

Comments


bottom of page