In this tutorial, we will learn about a really useful expression called wiggle in Adobe After Effects by using an example project.
In the example project, we have a bunch of separate leaves layers in the corner. And we already have some basic scale animations applied to each of them that are controlled using the adjustment layer at the top (called Leaf_Cont_01).
The final thing that I want to do with these leaves is give them some wiggle in the rotation property to add more life to the graphics. So rather than keyframe the animation, which would be very tedious, the wiggle expression will do that all for us and requires no keyframes.
How to Add a Wiggle Expression
To add a wiggle expression, Alt-Click on the rotation stopwatch to start. Then type in
wiggle into the expression console.
After Effects will then prompt you to type in a value inside the parentheses. So we need the word
wiggle and then a couple of values inside the parentheses for this expression to work. We need a frequency value and an amplitude value, and these two properties will be separated by a comma.
So let's add a frequency of 10 which is the first number, and this is going to be the amount that the rotation is going to move. So this means ten times a second.
And then we need a second number which will be the amount. For this example, we'll use 30 for now. And then let's press Enter on the numeric keyboard.
Press the play preview button to see what the animation looks like. And in this example it should look as if the leaves are blowing violently in the wind. So we might want to slow it down.
You can also go into the post expression graph and look at how the animation works. So over time, without doing any keyframes, this property is basically animating itself. And this is what wiggle does, and it does a great job of it.
But for this project we want something a little subtler: maybe something like 0.5, and then maybe 5 degrees of wiggle. And if you play preview it again, you should notice that the animation is much calmer.
How to Add a Wiggle Expression to a Controller
To make it easier to adjust the wiggle expression in the future, or to add the wiggle expression to other layers, we can add these properties to the controller layer located at the top of the layers panel.
This is done by creating a Null layer and adding sliders to it.
So let's add another slider control to the control layer (Effect > Expression Controls > Slider Control). And name it 'Wiggle Frequency'.
Duplicate the slider and rename the new slider 'Wiggle Amplitude'.
To apply the expression to the slider, we need to go down to the wiggle expression and select the 0.5 value. And then use the pick whip and click and drag it up to the Wiggle Frequency slider.
Select the 5 value and use the pick whip to click and drag it up to the Wiggle Amplitude slider.
If you get an error, you need to make sure that you close the parentheses at the end.
So once we have that, we're all good to go. Now you can use the sliders to easily adjust the values that you want. Make sure that you add the right values to the sliders in the Leaf_Cont_01 layer and play preview the animation to make sure it all works.
How to Apply a Wiggle Expression to Other Layers
The last thing that we need to do is copy the expression on the rotation. So press Control-C or right-click on the rotation and select Copy Expression Only.
Select the other layers you want to apply the expression to and press R on the keyboard to bring up the rotation option.
Select all of them and then paste the expression in (Control-V). And now all the layers have a wiggle expression applied to them, and they can all be controlled using the Leaf_Cont_01 layer.
The great thing about the wiggle expression is that it has some quasi-random variation to it. So even if you apply the same frequency and amplitude to different things, they're going to have a different animation because there are some random values happening in the background.
Congratulations! And that's how you can add the wiggle expression in Adobe After Effects. Now that you've learned how to use a wiggle expression, check out some of the other tutorials we have on Adobe After Effects below.
I hope you've found this tutorial useful, and I'll see you next time on Envato Tuts+!
- How to Animate Handwritten Text in After EffectsJonathan Lam19 May 2022
- How to Use Shape Layers to Animate in After EffectsJonathan Lam04 May 2022
- How to Use Spatial Interpolation for Motion Animation in After EffectsJonathan Lam03 May 2022
- How to Use Layer Controls in After EffectsJonathan Lam01 May 2022
- How to Animate the Layers of a Logo in After EffectsJonathan Lam23 Apr 2022
- How to Prepare Logo Artwork to Animate in After EffectsJonathan Lam22 Apr 2022