The Wiggle Expression In Adobe After Effects

Share on facebook
Share on google
Share on twitter
Share on linkedin

Wiggle is probably the most popular expression from After Effects, and in today’s article, we’ll take a look at an alternative way of using it to create an animation

We will use an expression to separate the x and y dimensions, something that we cannot achieve directly in the wiggle expression and apply the effect only to the y dimension. We’ll then add a slider for the amplitude so we can control the animation.


So let’s jump right into it and see how it’s done

In this example, we have 3 shape layers and we’re looking to animate the Y dimension using the wiggle expression. All the 3 bars have the anchor point set to the bottom and you can do that by pressing the Y key to select the anchor point and moving the anchor target to the bottom of the shape layer.


We’ll then create a null object by going to “Layer – New – Null Object”


and add a slider control “Effect – Expression Controls – Slider Control” and rename the effect “Amplitude”


Lock the Effect Controls panel so that it stays in view. You can do that by pressing on the small lock icon.

Next we’ll choose the first bar and press “s” to bring down the scale and alt+click on the stopwatch to add the expression.


The expression that we need to add is: “a=” and then pickwhip the scale property with the slider property from the null object

On the next line: “w=wiggle(2,a);”



What this expression means:

-in the first line we define a variable which is linked to the slider we’ve created earlier

-in the second line we define another variable that wiggle 2 times per second at the amplitude of the first variable

-in the third line we are telling AE to use the give value for the X property and to only wiggle the Y property of the scale

At this point nothing happens as the amplitude is set to 0, so we need to set a few keyframes on the null layer


We’ll then select all the keyframes and right click – keyframe assistant – easy ease, to make the animation smoother


Next, we need to add the expression to the other shape layers as well so we’ll select the scale property and choose Edit – Copy Expression Only


and then select the first two shape layers, pull down the scale property and highlight it and press Ctrl + V


Next, to make the animation look more appealing, we’ll add 3 texture layers and place them under each shape layer and set the track matte to “Alpha Matte”


To make the bars look nicer and thicker, we’ll apply a stroke effect to the texture layers by going to Layer – Layer Styles – Stroke


In the stroke drop down menu, set the color to black and the position to center. You can increase the size a bit if needed


We can then just copy and paste the stroke effect on the other bar layers as well


Thank you for taking the time to read this article and we hope you’ve found the information useful. This is one way of using this technique but you can think of many more possibilities to apply it, such as connecting the slide to the amplitude of an audio file.

Stay tuned for the next post

Remus Hosu

Remus Hosu

Leave a reply

Scroll to Top

By continuing to use this website, you consent to the use of cookies in accordance with our Cookie Policy.