If you have worked with After Effects for a while you’ll notice that creating random animation movements with key frames can be a real pain and a challenging task, luckily there is a better solution thanks to the wiggle expressions you can achieve random movement fairly quickly without spending hours tweaking key frames right and left.

In this blog post I’ll show multiple examples and methods of wiggle expressions from wiggle text to camera shake, I will also provide you the After Effects project source files so you can see how wiggle expressions are integrated with the layers. This should allow you to get a good understanding of how the wiggle expression works and use it for your own project. For those who hate programming expression I’ll also go over other ways to create Jiggle movement without using codes.

What’s a Wiggle Expression in After Effects ?

A wiggle expression in After Effects is a piece of JavaScript code that allow to move,scale,rotate… a layer back and forth in a random fashion.

The basic code look like this
wiggle(5,10)

  • The 1st number 5 define the number of time your layer will wiggle per second. This case it move 5 time in 1 second
  • The 2nd Number 10 define the how much it will move up and down this case 10 pixels

wiggle expression codes details

Here is a Wiggle animation example based on the setting wiggle(5,10)  wiggle expression animation

Apply a Wiggle Expression in After Effects?

Using and applying an expression is fairly simple, below are the steps to add the wiggle expression to a layer,image,text or video.

– Assuming you have a layer/text/image on your After Effects timeline like below
ae timeline with shape layer

– Select the layer on your timeline and press P (It will show the position)
shape layer position open

– On your keyboard Press Alt (PC) or Option (Mac)  click on the stopwatch icon
alt-to-apply-wiggle-expression

– Position numbers X and Y should now be red, replace transform.position with this: wiggle(5,10)
wiggle expression on the layer position

Here is the wiggle-expression After Effect project just in case you need to see it in action.

Other Examples of Wiggle Expressions

Your wiggle expression is making a good and smooth animation now what if you want to control the start or stop of the wiggling movement? No need to look for another expression.

Here is a method that should help you controlling the wiggle expression

  1. Create Null Layer | Ctrl+Alt+Shift+Y for Windows  |   Command+Option+Shift+Y for Mac
    create null layer in after effects
  2. Drag and Drop the “sliders control” from the effects and presets windows to your Null Layer
    slider control to null layer
  3. Select the Null layer and press E, expand slider control to see the stopwatch
  4. Highlight 5, then drag and drop the expression pick whip
  5. Add keyframes to the slide control of you null layer, ex: 50.00 for the first keyframe and 0.00 for the second keyframe
    keyframe-onslider-control
  6. You Should have the wiggle animation starting and slowing down to completely stop such as below
  7. Download the Control Wiggle Expression After Effects project

Copy and Paste this expression below to your layer position to Wiggle your layer on the Y axis

org=value; temp=wiggle (8,40); [org[0],temp[1]];

Wiggle on Y axis

Demo of Wiggle on Y Axis

Download the Wiggle on Y axis After Effects Project

Copy and Paste this expression below to your layer position to Wiggle your layer on the X axis

org=value; temp=wiggle (8,40); [temp[0],org[1]];

Demo of Wiggle on X Axis
demo Wiggle Animation X axis

Download the Wiggle on X axis After Effects Project

  1. Make sure you turn on 3D layer on your layer
  2. Add this expression to the position
    a =wiggle(0,0);
    b =wiggle(0,0);
    c = wiggle(5,95);[a[0],b[1],c[2]]

Demo of the Wiggle Expression on Z Axis

Download the Wiggle on Z axis After Effects Project

Make colors wiggle can be very difficult with expression, thanks to rowbyte this free plug in allows you to have a nice color wiggle animation.

Download the free wiggle plug-in for After Effects here

The scale wiggle expression can be used in 2 ways

The regular wiggle expression on scale will wiggle the scale height and width separately

wiggle(5, 80)

If you’d like a wiggle with uniform scale use this expression below

w = wiggle(5, 80);
[w[