LEARN BETTER ANIMATION WITH THESE EXPRESSIONS IN AFTER EFFECTS TUTORIAL! | We’ll ramp up from very simple animation expressions to slightly more complex expressions that will help your animations in After Effects.
In this After Effects tutorial, we’ll build an animation that has objects linked to a slider in After Effects so you or people you send the file to can easily make updates and changes to the After Effects file and to different elements that you want to allow people to be able to edit and adjust for easy editing later. Whether you have a ton of experience writing expressions or whether you’re brand new to this game, you’re going to love this tutorial a learn a whole bunch about it! Thanks for watching, I hope you love it!
Tags: after effects tutorial, after effects tutorials, after effects expressions, how to write expressions after effects, how to, tutvid, nathaniel dodson, after effects expressions 101, after effects expressions wiggle, after effects sliders, after effects expressions turbulent displace, after effects expressions tutorial, after effects expressions loopout, after effects expressions help, expression, after effects, after effects CC 2018, AE
Tutorial Recording Notes:
Disclaimer: these are the actual notes I used to record this video and are written in a language you may or may not understand. Hopefully, you find them useful or cool.
I.) Link changing stroke size to a slider
Open the 2560×1440 composition that has the background video in place already.
Create a large ellipse and center it in the doc
Add a 65px large orange stroke and reset the anchor point to center
Find the Stroke Width parameter and Alt/Opt + click to open the expressions editor. Show a couple examples of how it works (type out a simple number, use “time”, use “random(100);)
Add a new Null Object and add a slider using the Effects panel to this object
Open up the Effects>Slider Control>Slider in the layers area
Move back down to our expressions and use the pick whip to just tell the stroke to be whatever size to which the slider is set.
Show how you can also use a Color
II.) Change how much of the stroke you see (Trim Paths)
Collapse all the extra opened layer parameters we don’t need and add a Trim Paths to the Ellipse 1.
Now add another slider to the Null Obj.
Link the Start parameter to the slider. Show how this rolls from 0-100
Now explain the clamp expression that we want to add to limit this slider to that range.
Add: clamp(SLIDEROBJ, 0, 100);
If you want the stroke to unfurl from the other direction, simply link up the End parameter in the Trim Paths.
III.) Link the turbulent displace effect to a slider
Add turb displace to the circle layer
We want to make the evolutions number change continuously and have control over how extreme it gets.
Add another slider to the Null Obj.
Go down to the Effects>Turbulent Displace>Evolution in the ellipse object area
Open the expressions and link this to the slider. Show that this still just gives us a single static look. We want constant motion!
Multiply the slider output number by random(100,800);
This will give us a constantly changing number that reacts to the slider like it’s a force multiplier.
Go and clamp the slider to a 1-5 range.
Everyone seems to talk about and love on the wiggle expression so I might a well through it in here. Let’s do a totally randomized wiggle to drive how that random thing we’ve done a couple of times here already.
Go Contents>Ellipse 1>Ellipse Path>Size and add an expression.
We want to use a couple different random numbers, so let me introduce you to variables. They’re basically little containers that you can fill with information and reuse them whenever you want.
Type any variable name you want. This can be anything from a letter, to your mother’s hometown, to your pet’s name, to the most crude blue-streakin’ cuss word your mind can conjure. I’ll name my variable “a” and then tell After Effects that whenever I use “a” it’s equaled to random(1,2);
Then I’ll create a second variable “b” and tell After Effects that this is equaled to random(125,500);
Basically we just created two little containers. The letter “a” will be the same as typing out that whole “random(1,2); nonsense wherever we type it. So if the random number generated is 2, for that split second, a=2. If the random number generated is 1, then a=1, and on and on.
To create a wiggle it’s pretty easy. Here below out variables, let’s just add “wiggle(a,b); Whatever number a is, that is the number of times per second After Effects will move our shape and whatever number b happens to be will be the number of pixels After Effects moves our shape. This will be quite the random wiggle effect.
For the last expression, let’s say that I create an animation here that is a scale from 10% back up to 100% over the course of 1 second.
Then the client sees the project and they love the zooming wiggle circle so much they want it to repeat until the video project is finished. We could manually keyframe it to death, OR we could use the loopOut expression.
Alt/Opt + click the stopwatch for the Scale parameter for this layer and add “loopOut();”
Preview this and point out that it works, but it gets this harsh reset every time it finishes zooming in. We want something that comes and goes over and over again.
We can change the loop type to something called “pingpong” which will do the trick by changing out expression to read “loopOut(“pingpong”); and now we have out completed effect.
Of course we could still go and change the size, color, or how much of the stroke we see and even tweak the craziness of the displacement effect too to try to get the perfect effect.