The beat . A blog by premiumbeat

January 30, 2013
Author:
Categories:
After EffectsTutorialsVideo Editing

Using Wiggle to Create Random Movement in Adobe After Effects

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.

Adobe After Effects

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.

creating an 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

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):

org=value; temp=wiggle (5,50); [temp[0],org[1]];

Shorthand:

[wiggle(5,50)[0],position[1]]

wiggle only in y (vertical):

org=value; temp=wiggle (5,50); [org[0],temp[1]];

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

wiggle one dimension pasted in

For more After Effects expressions check out motion-graphics-exchange and aenhancers.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).

Layer > New > Null Object

null object named wiggle control

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.

Pick whip is highlighted in Red:

select number and drag pick whip

Click for larger view:

Pick Whip connected to Null

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.

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

Wiggle controlled by Null with slider

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

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

Need Royalty Free Tracks?

Browse our Exclusive Music Library

Related Posts:

Become a better editor!