Aftereffects Wiggle



Cover image via

  1. The Top Wiggle Expressions In After Effects Multiple examples and methods of wiggle expressions in After Effects from wiggle text to camera shake, providing you the AE project source files so you can see how wiggle expressions are integrated with the layers.
  2. It loops automatically after 3 seconds in Dan's example. The expression merely blending between two wiggles with different seeds, since the wiggle itself isn't loopabable. The cutoff/ blending duration is determined by the loopTime parameter.
Aftereffects Wiggle

Wiggle (camera shake) is one of the most common, easy to remember After Effects expression and is applied to the position property of a layer. Wiggle (x,y) where x and y are in digits, x stands for a number of times you want the layer to wiggle and y stands for the number of frames in which you want that layer to move.

Use an expression to create random movement with the wiggle expression in After Effects. In this post we’ll show you how to create wiggle easily by modifying numbers…not keyframes.

Editors sometime cringe at the word expressions, but have no fear. When you understand them they really aren’t scary and can end up saying you a lot of time.

If you’ve ever seen animations where light is flickering or a camera shakes, it’s likely you’ve seen the wiggle expression in action. Wiggle is one of the most popular After Effects expressions, as it is easy to use and visually interesting. Instead of creating a bunch of keyframes to make a layer randomly move, we can do this with a couple of numbers.

The Wiggle Expression in After Effects

For this example I created the word ‘wiggle’ from text. I want the position of this text to wiggle, so select the text layer and hit P to open the Position Transform properties.

Option (Mac) or Alt (PC) click on the stopwatch to create the expression. The text turns Red, telling you there is an expression applied.

Type wiggle(2,50). This expression states that twice a second the text should wiggle 50 pixels on the x & y axis – the first number is how many times a second, the 2nd is the amount of pixel movement.

After effects wiggle expression

If you want to modify the wiggle simply change the numbers. If we had done this with keyframes, every time the client wanted changes we would have to change the keyframes – not fun!

Wiggling One Dimension

After Effects Wiggle Script

What if you want to wiggle just the x or y position? This expression is a little more complicated, but you don’t have to write it.

I went to motion-graphics-exchange.com (an online resource for After Effects expressions), and searched for “wiggle one dimension”. This is the expression they have for ‘wiggle in one dimension’:

wiggle only in x (horizontal):

Shorthand:

wiggle only in y (vertical):

Copy this text into your After Effects project and you’re done!

For more After Effects expressions check out motion-graphics-exchange andaenhancers.com. If you want to learn about creating expressions, check out: JJGifford, MotionScript and Gray Machine.

Controlling the Wiggle Expression

What if you don’t want the layer wiggling constantly? A common technique is to add an expressions control to a null layer so we can keyframe the wiggle. For AE newbies, a null is an object that doesn’t render that we can use to control other layers.

We are going to use the null with the original position wiggle we created on the Wiggle text (above).

From the Layer Menu select New and then Null Object. Rename the Null “wiggle control” and then apply the effect “Sliders Control” (in the Expressions Controls category).

Select the wiggle control layer in the timeline, and type E to reveal the Slider Control effect. Click the twirly for Slider Control to see the stopwatch.

Go to the Wiggle text expression and select just the 2. with the 2 selected, click the pickwip (looks like a curly cue), and drag the pick whip to the Slider stopwatch.

After Effects Wiggler

Pick whip is highlighted in Red:

Here is the larger view:

We no longer see a wiggle, as the Slider is now controlling how many times a second the text wiggles. Click the stopwatch to create a keyframe at the beginning, then move the playhead further in time and change the amount for the Slider to increase the wiggle. You can turn on motion blur to enhance the effect.

After Effects Wiggle Code

Motion Blur Highlighted in RED (click for larger view):

Now you know how to create a wiggle expression in After Effects and how to control it using a null and an expression slider effect – a huge timesaver.

What After Effects expressions do you rely on?
Share them with us in the comments below!