Showcase and discover digital art at yex

Follow Design Stacks

Subscribe to our free newsletter to get all our latest tutorials and articles delivered directly to your inbox!

Randomizing Your Animations With The Wiggler in AE 5.5

Article Focus:
One of the problems that may plague animators is that their animation is too perfect ~ too clean. In this article, Jim Tierney demonstrates how to add in a little randomness to your animation with the Wiggler tool in After Effects 5.5.

Download stuffit project file zipped project file

One of the problems that many animations have is that they are too clean. Too smooth. Too perfect.

In real life, things are very rarely, if ever, perfect. There’s always ‘noise’. Noise is that ‘thing’ that breaks up what should be perfect. Whether it’s the dust on a counter top, skips on a CD, the slight shake of a camera, the variation in the gate of someone’s walk, basically just the slight bit of randomness that is in everything around us.

Noise as we normally see it:

added to this

results in something like this:

Noise gives us the imperfections and detail that we’re used to seeing in the real world.
After Effects has the ability to make things perfect. You can specify things down to the smallest fraction of a pixel. For all the control freaks, obsessive compulsive people, and anyone else needing a high degree of precision in their daily lives, this control that AE gives is wonderful.

For the rest of us, integers generally work pretty well. Or at most one decimal place. When was the last time you needed a 1.238678 Gaussian Blur?

However, one thing that many animators notice early on is that with this level of precision, their animations look a little too structured. A little too perfect. If I have a bird flying across the screen, I don’t want it to go in an exactly straight line. Birds tend to dip and rise with the air current and don’t generally fly in perfectly straight lines.

A line without noise: A line with noise:


Likewise, if I have a moving camera, it’s very rarely as steady as a stationary camera. There’s always some degree of shake. Sometimes a lot, sometimes just a very small amount, but it’s almost always there.

So, what to do about all this damn randomness that seems to creep into our daily lives? How do I get that into my animations?

Well, you could set multiple keyframes. Set a keyframe every time you think there should be slight jiggle or movement of our camera. This can be very effective, but it tends to be somewhat time consuming. Especially if you need to set a LOT of keyframes. If you want to simulate a lot of shaking, as in earthquake or rough boat ride, you’ll need a keyframe every few frames. Setting all those keyframes is not particularly creative nor fun. Tedious, tedious, tedious. Ugh.

Not too tough… but imagine 30 sec. of it!

Luckily, After Effects has an easy solution for you. The Wiggler. (there’s also a slightly more difficult version which we’ll go into later)

Despite its somewhat comical name, which might be better suited for a horror movie, or, well, some other type of movie (paging Dirk Wiggler… )… it’s a very powerful tool. It allows you to automatically vary the values of your animation. Adding in that randomness that will go a long way to adding that extra bit of realism.

The wiggler takes the value of the property at whatever time it’s at, generates a random value, then adds or subtracts that value from the value of the property. The Magnitude parameter in the Wiggler sets min/max amount that can be added to the original value.

For example, one common use is to vary a property around a single value. Say you want a blur to usually be 2.0, but you’d like it to sometimes be a bit more than that and sometimes be a bit less. We want the blur to be in a range of 1 to 3.

You would set a keyframe at the beginning of your animation and at the end for 2.0. Then you set your Magnitude for 1.0.

2.0 plus or minus 1.0 gives you a range of 1.0 to 3.0.

Why animate from 2.0 to 2.0? Well that means that all the way across your animation the value will be 2.0. The Wiggler will start with 2.0 and whatever random value it comes up with, it’ll add/subtract from 2.0.

In the below example, frames 2 through 6 will have a value between 1 and 3 when wiggled. Which value? Who knows? It’s random! That’s half the fun of it! Guess the value and win a prize… picka number ‘tween one and three… any number!

I’m sure most of you would guess 1.8347032. All right, all right, so there’s no way to make math fun.

Frame 1 2 3 4 5 6 7
Normal value 2.0
keyframe
2.0 2.0 2.0 2.0 2.0 2.0
keyframe
Wiggle range 2.0 1 to 3 1 to 3 1 to 3 1 to 3 1 to 3 2.0


This way everything averages out to 2.0 more or less. If we animated from one value to another, say 1 to 3, and the magnitude was still set to 1.0, then our range would actually be vary over time. When the blur was 1.0, the range would be 0 to 2, when the blur was 3.0, the range would be 2 to 4. Like this…

Frame 1 2 3 4 5 6 7
Normal value 1.0
keyframe
1.3 1.7 2.0 2.3 2.7 3.0
keyframe
Wiggle range 1.0 .3 to 2.3 .7 to 2.7 1 to 3 1.3 to 3.3 1.7 to 3.7 3.0


OK, enough of this math nonsense… how’s it really work? Let’s take a look… Open up the jiggy_wiggler.aep project file (download from the green bar above, if you haven’t already).

We’re going to go through two exercises. The first will show you how to easily add some shake to your camera or image. It’s pretty easy to simulate an earthquake with the Wiggler and we’ll do that here. Second, we’ll turn a nice smooth line into a chaotic scribble. Virtual pre-school right here and now.

Lesson 1:

  1. Open up the Earthquake Start composition.

  2. Select the bg_still.psd layer and look at its Position property. Press the ‘P‘ key on your keyboard to use the Position keyboard shortcut and reveal the Position property by itself.

  3. At time 00:00 set a Position keyframe.

  4. Move the Time Marker to 01:00 and set another keyframe.

  5. Both keyframes should have the same value. In this case we want the layer to shake around a center point, so we want both keyframes to have the same value. This is basically the same situation as when we wanted the wiggler to average 2.0 in the charts above.
  6. Select both those keyframes.

  7. Go to Window>The Wiggler to open up the Wiggler

  8. Make sure Spatial Path is selected. Since we want to move the image around, we want to move it spatially. Temporal affects velocity and is more useful with non-position properties, like opacity or blur amount.

  9. Select Smooth Noise.

  10. Select All Dimensions Independently. Since this is a Position property, it has two components, the X and Y component. We want both of these to be wiggled, but not by the same amount. This way the Wiggler will generate a random number for X and a different random number for Y.

  11. Set Frequency to 11. This will cause 11 keyframes to be set over the course of each second. The higher this is set, the more chaotic your animation will be. Since we’re trying to replicate an earthquake, we want it to be very chaotic. If you were trying to animate a bird flying, you might want to have one keyframe per second or even every 2 or 3 seconds.

  12. Set Magnitude to 20.

  13. A look at the parameters:
  14. Click Apply

  15. Wah La! We’ve got some shakin’ and a wigglin’ and we’re gettin’ jiggy all over the place!

  16. Notice all the keyframes that got set in between our two original keyframes. If we render this out, you should have a nice little earthquake.

  17. To enhance this, turn Motion Blur on, or to really shake it up, pre-comp the bg_still layer and apply Echo to the pre-comp. Take a look at Earthquake Fini to see this in action.

  18. If you make the layer 3D, it will wiggle the layer position in 3D. This makes even more convincing, since your camera would no doubt be shaking forward and backward as well as side to side and up and down.


Some serious shakin’ going on! You can see the motion path of the position point in the lower left corner.


Lesson 2:

  1. Open up the Wiggly Lines comp.

  2. You’ll notice a curved line going from the bottom to the top. This was drawn by the write-on filter. We set two position keyframes for the Brush Position and instantly we get a perfect curved line. Bah. Perfect no good. Jim want scribble. Scribble fun, perfect boring.

  3. OK… so, let’s use the Wiggler to do some scribbling.

  4. Select the two keyframes for the Brush Position.

  5. Notice that this is a different situation than what we had with the Earthquake project. The keyframes are not the same value. The values are increasing over the course of the animation. This is pretty similar to our second chart (above the lessons). As the values for the Brush Position increase, the range will change along with them. The range of values will be very different at the end than they are at the beginning.

  6. Open the Wiggler (Window>The Wiggler).

  7. Once again select Spatial Path since we are animating a position point.

  8. Select Smooth Noise

  9. Select All Dimensions Independently

  10. Set Frequency to 6 (6 keyframes per second)

  11. Set Magnitude to 15

  12. Click Apply

  13. CRAZYYYY! The line is wiggled all over the place. Giving us a nice scribbled line, without having to set all those silly keyframes.

  14. Hit Undo, and apply it with 30. Or 3. Just to see what kind of line the different values will give you. Exciting stuff.


Wow. So now you should have a good handle on what that wascally Wiggler does.

But Wait! There’s more!

The Wiggler is great and very easy to use. But it’s a little limited and it requires that you have the production bundle version of After Effects.

There’s a more powerful way to wiggle that you can use even in the standard version of After Effects. The downside is that it’s an expression and people seem to be afraid of expressions because they think they’re all math. It’s not true! Go through a few tutorials on expressions and see how easy they can be. Maybe not quite as easy as the Wiggler palette, but you don’t need to be a rocket scientist or other unappreciated genius to use them.

Take a look at the Wiggly Lines- Expression Comp. This will give you a good example of how expressions are used in a regular project. Notice that we’ve applied a filter called Point Control to the Wiggly Lines layer. The Point Control filter is part of the Expressions Control filter set you’ll find in your Effect menu. These filters do nothing but provide a value for an expression to sample from. Essentially dummy filters.

Since you can’t have keyframes and expressions for the same parameter, sometimes you need a dummy filter to have the keyframes, so your effect filter can work with expressions. Notice that the Brush Position has an expression that points to the Position value of the Point Control filter. The Point Control Position is then wiggled, resulting in the same wiggly line that we got with the Wiggler animation assistant.

Expressions, unfortunately, are a little out of the scope of this tutorial, but take a look in the AE manual and elsewhere and learn to love the ‘wiggle’ expression. It’ll give you all the power of the Wiggler palette and a whole lot more. The AE online help pages that you’ll find by using the Help menu in AE, is an excellent resource for expressions.


Comments