SUPPORT : +1 (888) 344-0936

The Wiggle Expression In Adobe After Effects

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.

the-wiggle-expression-in-adobe-after-effects-1

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

the-wiggle-expression-in-adobe-after-effects-2

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

the-wiggle-expression-in-adobe-after-effects-3

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-wiggle-expression-in-adobe-after-effects-4

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);”

[value[0],w[1]]

the-wiggle-expression-in-adobe-after-effects-5

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

the-wiggle-expression-in-adobe-after-effects-6

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

the-wiggle-expression-in-adobe-after-effects-7

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

the-wiggle-expression-in-adobe-after-effects-8

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”

the-wiggle-expression-in-adobe-after-effects-9

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

the-wiggle-expression-in-adobe-after-effects-10

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

the-wiggle-expression-in-adobe-after-effects-11

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

Leave a Reply

Your email address will not be published. Required fields are marked *

This site uses Akismet to reduce spam. Learn how your comment data is processed.