© 2020 Chunk Motion Design.
0401 966 898
Expressions really open up After Effects to another level, and there’s just some things that you couldn’t do otherwise without a little bit of code to help out.
Below is a list of our favourite expressions in not particular order that we have found online at some point or another.
The Slider Control in After Effects will only go so high (1,000,000), so in comes the Angle Control to save the day.
All you need on your text layer is an “Angle Control”, and you’ll be keyframing the full rotation number. In the expression itself, you can add to the textBefore and the textAfter variables to include any text you like.
The classic loopOut expressions sadly don’t work on Path properties, thankfully we have the expression below to help us out.
If you want your wiggle to be a touch more predictable and loop after a set amount of seconds, then below is for you!
Putting this on your stroke width property means that regardless of the layer’s scale, the stroke will maintain the same thickness. Thanks to Ben Marriott and Adam Plouff for this code!
Thanks to Ben Marriott for this one, this expression when applied to the Scale property, maintains the layer’s original scale even while it’s parent’s scale changes. Check out Ben’s video here for a great example on how to use it.
Oh boy, this one is a life saver. If you’ve tried to animate the frequency of a wiggle before, you’ll find out that After Effects likes to flip the table. MotionScript has an amazing writeup that I found when I was hunting a solution that really breaks down everything there is to the Wiggle function.
To use this, you’ll need a Slider Control (which represents your frequency amount) and apply this expression below to the property you wish to wiggle. Keyframe the slider to your heart’s desire and everything will function as expected.
Dan Ebbert has a sweet little write up regarding this, and it essentially boils down that when you use the wiggle expression, it returns an array of values dependent on the property. For rotation, it’ll return one value, but when it comes to scale or position, it’ll return two, affecting both axises.
To affect just one axis, we have to split it open and apply it to the specific axis we want. Below is an example for just affecting the X-axis.
To make it affect just the Y-axis, we just switch the position of the ‘value’ and ‘w’.
When it comes to 3D position and scale, it introduces a third array entry. Here’s an example of affecting just the Z-axis.
A classic expression. Apply this to a property for automatic, math driven overshoot. Adjust the Amplitude (amp), Frequency (freq), and Decay to achieve the desired results.