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[0],w[0]]

wiggle scale proportionally expression

If you ever wanted to wiggle individual letters on a text follow these steps.

  1. Type your text in After Effects
  2. Click on the Animate icon and choose position
  3. Next to Animator1 Click on Add > Selector > Wiggly
  4. Add this wiggle expression wiggle(18,3) to the position of the Wiggly Selector 1
  5. You should now be able to see something like thisText Letter Wiggle

Download the Text Wiggle Expression AE project.

I am sure one day you’ll have to create a fake camera shake movement or a shake effect to your video, using a Wiggle expression is probably the easiest method to simulate a random shake camera movement.

Watch this video tutorial which explained very well how camera shake is done with a wiggle expression.

The other alternative you should consider if you are pressed by the time is to use presets, I found a couple of websites that have already made camera shake presets for free.
15 Free Camera Shake Presets
Handheld Camera Presets

The looping wiggle expression become handy when you want an object to move randomly in your composition. Looping wiggle should be seamless and you shouldn’t see a cut, this expression is also used for background animation.

freq = 1;
amp = 110;
loopTime = 3;
t = time % loopTime;
wiggle1 = wiggle(freq, amp, 1, 0.5, t);
wiggle2 = wiggle(freq, amp, 1, 0.5, t - loopTime);
linear(t, 0, loopTime, wiggle1, wiggle2)
Loop-wiggle

Download the Loop Wiggle expression example here.

Thanks to Dan Ebberts for this expression

Other way to wiggle in After Effects

For those who don’t like programming expressions and codes After effects has other way to add a wiggle movement, here are a few methods below.

The Behaviors wiggle presets

wiggle presets After Effects has multiple wiggle presets you can find them in the Effects & Presets window (screenshot on the right)
– Animation Presets > Behavior Presets

The advantages of using the wiggle presets are the controls and options they include such as:

  • Wiggle Speed
  • Wiggle Amounts
  • Wiggle Width
  • Wiggle Nervousness
  • Wiggle Skew

How apply the Wiggle Presets?
Just drag and drop the wiggle presets directly to your layer and see if you like the movement and controls.

If you want to see a preview of the wiggle presets please check the behaviors presets page.

The Wiggler

Another alternative to make a wiggle animation without using expression is to use the Wiggler tool.
In After Effects you can find the tool under the Windows tab > Wiggler

Here is how the wiggler tool works

  1. Create a text or a shape layer
  2. Create your first keyframe and your last keyframe
  3. Select Position
    select-position-ae-timeline
  4. Go to the Wiggler Windows and click Apply
    After Effects Wiggler Tool
  5. Once you click Apply, the Wiggler tool will create multiple keyframes to make the wiggle animation

Wiggle Plug-Ins

Another alternative to avoid wiggle expression is to use plug-ins below is a list of plug in that have wiggle options with controls.

Learn more Expression

Wants to learn more about after effects expressions ?  I recommend checking out the websites below

Hope you found this blog post helpful if you have any question,suggestion,improvement please write a comment in the area below.