Wiggle Expression in After Effects

I’ll dive deep into the world of wiggle expressions in Adobe After Effects. Learn how to harness the power of the wiggle expression to create dynamic animations with more organic and natural movement.

I’ll walk you through the basics, and then show you some advanced techniques to make your animations really stand out. No matter your skill level, you’ll leave this tutorial with a newfound understanding of wiggle expressions and how to use them to take your animations to the next level.

The Wiggle command works as follows. The first number is frequency (how many times per second it will move) and the second number is amplitude (how many pixels in area it will move), in other words, how far it will move away from its current position.


Moving on the X axis

In more advanced terms, we have the possibility to restrict the movement points even further. For example, for X axis only, we use one of the following codes.

org=value; temp=wiggle (5,80); [temp[0],org[1]];
// or

Moving on the Y axis

To move it only in the Y axis, we use one of the following codes.

org=value; temp=wiggle (5,80); [org[0],temp[1]];
// or

Moving on the Z axis

To move it in the Z axis, we first need to activate the 3D feature of the layer and apply the code below.

a = wiggle(0,0);
b = wiggle(0,0);
c = wiggle(5,30);[a[0],b[1],c[2]]

Starting action after the specified second

If you want your movement to start after a certain number of seconds, you should apply a code like the one below. According to the example, the wiggle effect will appear after the 3rd second.

start = 3; 
if (time > start){ 

Stopping the movement after the specified second

To stop the movement after the specified second, we apply a code like the one below. In this example, the vibration will stop after the 5th second.

stop = 5; 
if (time > stop){ 

So where can we use the Wiggle effect? For example, we can use Wiggle to apply a camera shake effect. Wiggle is also good for randomly moving text or an icon so that it vibrates.

Start and stop in specified time

Using the code below and specifying the start and stop values, you can set the start and stop times of the movements.

start = 5; 
stop = 15; 
if ((time > start) && (time < stop)){