How to use the Wiggle Expression in After Effects.
It's no secret, expressions are a powerful way to automate tedious animations. And, One of the best expressions you can learn in After Effects is the wiggle expression. The wiggle expression is an easy to learn expression in After Effects, and it will be your friend all throughout your career.
Careful though, the wiggle expression will make you start questioning why you don't know more expressions. Eventually you'll be looking for more and more ways to automate movements using code in After Effects. But what can you use the wiggle expression for? Well...
- Want to animate a lot of little things, but you don't want to keyframe all their movements? Wiggle Expression!
- Want to add a subtle camera shake in After Effects? Wiggle Expression!
- How do you make a light flicker in After Effects? Wiggle Expression!
Okay, okay, that's enough selling the wiggle expression. Let's learn how to use it!
What is the Wiggle Expression?
So, the wiggle expression can be complicated, and it can be simple. It really depends on what kind of control you need. For example, here's a fully expanded wiggle expression in After Effects; it's quite lengthy...
wiggle(freq, amp, octaves = 1, amp_mult = .5, t = time)
There is a lot going on there, and we really don't need all of that to get started. Instead, let's break it down a more basic version of the wiggle expression so you can focus on what's needed to get started.
wiggle(freq,amp);
That seems way less scary! In fact, the minimum code you need to write when using the wiggle expression is just two simple parts:
- Frequency (freq) - How often do you want your value (number) to move per second.
- Amplitude (amp) - How much your value is allowed to change above or below the starting value.
So if you copy and paste the wiggle expression below into a property (position, rotation, etc.) in After Effects you will have a value that jumps around 3 times a second up to 15 points above or below the original starting value.
wiggle(3,15);
In short, to use the wiggle expression in After Effects just follow these quick steps:
- Option (alt on PC) + click on the stopwatch icon next to your desired property.
- Type in wiggle(
- Add your Frequency (Example: 4)
- Add a comma (,)
- Add your Amplitude Value (Example: 30)
- Add ); to the end.
That's all there is to it. Your wiggle expression will now work on your property. If the wiggle expression above was written out it'd look like this:
wiggle(4,30);
Let's look at some visual examples to help that sink in.
Changing Wiggle Expression Values
To help get a clearer understanding of what's going on, I've created a few wiggle expression GIFs that show what happens when frequency and amplitude are changed. For these examples I isolated the x position of the layers to help illustrate the point.
As you can see above, the higher the value frequency input, the more wiggles After Effects produces per second.
The higher you increase amplitude, the further your layer will move from its original position.
This can be used for many more things than just position! The wiggle expression can be added to to any of the transform properties like rotation, scale, and many effects within After Effects. If there is a number value needed for the effects, then you can apply wiggle.
The Value in Wiggles
Those were just a few use cases for how you can use the wiggle expression in After Effects. Keep messing with the wiggle expression and seeing what you can come up with. Even though it's simple at its core, it can be incredibly useful in day-to-day After Effects work.
For some advanced wiggling, Dan Ebberts (the Godfather of After Effects expressions) has an article on his site that shows us how to loop the wiggle expression. There you can learn how to maximize the use of the entire wiggle expression.
Want to Learn More?
If you want to learn more about using expressions in After Effects we have a ton of other great expression content here on School of Motion. Here are a few of our favorite tutorials:
- Amazing Expressions in After Effects
- After Effects Expressions 101
- How to Use the Loop Expression
- How to Use the Bounce Expression in After Effects
Also, if you really love learning expressions, check out Expression Session!
ENROLL NOW!
Acidbite ➔
50% off everything
ActionVFX ➔
30% off all plans and credit packs - starts 11/26
Adobe ➔
50% off all apps and plans through 11/29
aescripts ➔
25% off everything through 12/6
Affinity ➔
50% off all products
Battleaxe ➔
30% off from 11/29-12/7
Boom Library ➔
30% off Boom One, their 48,000+ file audio library
BorisFX ➔
25% off everything, 11/25-12/1
Cavalry ➔
33% off pro subscriptions (11/29 - 12/4)
FXFactory ➔
25% off with code BLACKFRIDAY until 12/3
Goodboyninja ➔
20% off everything
Happy Editing ➔
50% off with code BLACKFRIDAY
Huion ➔
Up to 50% off affordable, high-quality pen display tablets
Insydium ➔
50% off through 12/4
JangaFX ➔
30% off an indie annual license
Kitbash 3D ➔
$200 off Cargo Pro, their entire library
Knights of the Editing Table ➔
Up to 20% off Premiere Pro Extensions
Maxon ➔
25% off Maxon One, ZBrush, & Redshift - Annual Subscriptions (11/29 - 12/8)
Mode Designs ➔
Deals on premium keyboards and accessories
Motion Array ➔
10% off the Everything plan
Motion Hatch ➔
Perfect Your Pricing Toolkit - 50% off (11/29 - 12/2)
MotionVFX ➔
30% off Design/CineStudio, and PPro Resolve packs with code: BW30
Rocket Lasso ➔
50% off all plug-ins (11/29 - 12/2)
Rokoko ➔
45% off the indie creator bundle with code: RKK_SchoolOfMotion (revenue must be under $100K a year)
Shapefest ➔
80% off a Shapefest Pro annual subscription for life (11/29 - 12/2)
The Pixel Lab ➔
30% off everything
Toolfarm ➔
Various plugins and tools on sale
True Grit Texture ➔
50-70% off (starts Wednesday, runs for about a week)
Vincent Schwenk ➔
50% discount with code RENDERSALE
Wacom ➔
Up to $120 off new tablets + deals on refurbished items