Automatically animate the anchor point, position, rotation, and scale of a layer without having to use expressions or animation presets.
- Hi, I'm Chris Meyer, and I'd like to share with you some tips for how to use the new shape layers Wiggle Transform operator that was added in After Effects CS4. Now, if you're already familiar with the Wiggle Selector for Text Layers, it's a very similar concept. It allows you to randomize various transform properties, scale, position, rotation, and such, for shape paths in Shape Layer, just like the Wiggly Selector randomizes individual characters inside a text object. So let's go see how it works.
Here in After Effects CS4, I have a very simple shape layer. First thing I need to do is select the shape group that I want the shape operator to go inside of. Then I'll select add Wiggle Transform, and you'll see it's been added to my stack. Initially, it doesn't do anything. The object doesn't move because all of the transforms default to zero change. I'll twirl it open. You'll see I have speed parameters and some other things like correlation I'll talk about later, and transform parameters. Let's say I want this object to wander back and forth.
I'll type in numbers like 300 in the X-dimension, hit 0 on the numeric keypad to ran preview, and now you see that my object wanders back and forth in the x direction. If I find that to be too fast, I'll just change the Wiggles/Second to something slower, like one Wiggle/Second, ran preview again, and now I have much more sedate wandering. Now here's where things get interesting. Let's say you want to wiggle more than one parameter. Let's say I want this object to rotate at the same time it's wandering about. I'm gonna go ahead and set the rotation to one full revolution, ran preview again and see my result.
Now, watch what's going on. As the object goes to the right, it's rotating clockwise. As the object goes to the left, it's rotating counter-clockwise. This reveals a very important point about how Wiggle Transform works underneath the hood. What's going on underneath the hood is that Wiggle Transform is generating a flowing stream of numbers that varies between -1 and 1, and then takes that wiggled value and multiplies it by your transform offsets.
So in this case, we have one revolution entered for my transform value. It goes between -1 revolution and 1 revolution. I entered 300 pixels in the x-dimension, it wanders between -300 in the x and 300 in the x. The problem is, those two action are coordinated because the underlying wiggle stream is the same stream. It's the same numbers going from -1 to 1. So, if I want those two transform properties to wiggle independently, I need two wiggle transform operators.
I'm back here in After Effects, and I've decided that my first Wiggle Transform operator is going to do just my position. And I can even rename it. It's selected, I'll hit return, and say "Wiggle Position." Hit enter. I'll zero out the rotation. And I'll go ahead a keep the x position transform for this. And I'll twirl it up. And now I'll go ahead and add another Wiggle Transform operator. I'll rename it "Wiggle Rotation," twirl it open, and go ahead and give it one rotation of wiggle.
Now when I ran preview, you'll notice that the rotation is disconnected from the x movement, and since it is a separate operator, I can go ahead and do things such as change how fast it's wiggling, say the rotation wiggles more slowly than the x-position. Now this is what I get. So, to have truly random transformations of your wiggled objects, you need to have a separate wiggle operator for each parameter you wish to wiggle.
Next, we're gonna play with using Wiggle Transform in conjunction with the Repeater operator, and that's where things get really interesting and really powerful. But again, you have to pay attention to what you're doing to get the results you desire. Here I have a simple shape again, but this time I want to repeat the shape around in a circle to create something like a pinwheel or a flower. To do that, I'll select my shape group and say add Repeater. Twirl it open, decide how many copies I want -- I've already decided ahead of time, I'd like to have 18 petals on my flower -- and then go ahead and change its transform properties.
I don't need a repeating off-screen, so I'll go ahead and zero out my position. And a little bit of simple math tells me there's 360 degrees in a circle. 18 copies, 360 divided by 18 says I need 20 degrees of offset for each repeat. Right now, they're stacked on top of each other, but to go ahead and create a flower, I'll take my ellipse path, just start to slide it off center a little bit until I've got a nice arrangement. And if I want the petals to overlap, I'll take advantage of the blending modes that are built into the shape layers.
In this case, I'll have the gradient layer use an overlay mode to go ahead and stack on top of each other, and then I'll go ahead and have the stroke also blend on top of each other. So now I've got a nice starting flower. I'll twirl these up, go ahead and clean out my window. Now I want to randomize the position of each of those petals. I've got my group selected, and I say add Wiggle Transform. I'll go ahead and twirl it open here, and then go ahead and set some offsets. Let's go ahead and say a y-position of 20, so the petals'll jump up and down or away from the center of the flower.
I'll have each petal rotate around a little bit, and I'll go ahead and have each petal change its scale a little bit as well. Now let's go ahead and ran preview and see what happens. The whole flower is pulsing in unison. The petals are not acting independently from each other, and here's the reason why: Let's go back into the timeline panel, and I'll notice that my Wiggle Transform is after my Ellipse Path, so my ellipse is being wiggled, but it's before the Repeater, so I'm having one shape wiggled, then repeated.
That's why it's all moving in unison. If I want each petal to be wiggled independently, I need to drag Wiggle after the Repeater. Now each repeated shape will get an independent wiggle. And you see how the petals go crazy. I'll go ahead and ran preview, and now they're each doing their own thing. So stacking order is very important to determine how the Wiggle Transform operator is gonna work on your shape paths. Now, in this case, I want to bring a little bit of order to this flower.
It's a little bit crazy here. This is where these other parameters come in handy. Correlation says how different is the wiggle path or the wiggle wave for each independent shape object. Let's go ahead and increase the correlation to something like 90% or so. Now when I ran preview, you'll see the petals are doing a very similar thing to each other. Now, if I was gonna go all the way to 100% correlation, I'm back to my flower going in unison again. On the other hand, if I want complete randomness, I'll put correlation down to 0.
There'll now be no correlation or relationship between the independent petals, and they'll each be doing their own things based on my wiggle transform offsets. And again, if I want to change the speed, just go ahead and change that. Now, a Wiggle Transform does automatically animate it just like the Wiggly Selector for text layers. If you want to hand animate it, put the speed down to 0. Now I have a frozen flower; nothing's happening. And then you can manually animate or key frame the phases to get your desired motion when you want it to happen.
We'll go back to our automatically random flower and try high correlation so the petals are doing very similar things. And you can just imagine how long it might take you to animate each of those petals independently to get that sort of movement. This is where these things like Repeater and Wiggle Transform come in really handy. And there's a couple tips on using the Wiggle Transform operator in After Effects CS4. It's very important to keep track of where it appears in the stack in your transform panel, for example, whether it's before or after the Repeater, and also to keep track of what parameters you're wiggling and whether or not you want them to be all coordinated or independent.
If you want independent wiggles, then you're going to need more than one Wiggle Transform operator. But that's okay, add as many as you need. Hope that helps, see you again later.
After Effects CS4 features a new operator for shape layers: Wiggle Transform. This useful tool can automatically animate the anchor point, position, rotation, and scale of a layer without having to use expressions or animation presets. In After Effects CS4: Wiggle Transform Tips, Chris and Trish Meyer present helpful advice for using Wiggle Transform to its full potential. For example, they show how to combine it with the Repeater operation to create writhing, pulsing, wiggling masses of automatically animating shapes.
This video assumes prior knowledge of how to use shape layers inside After Effects. For an introduction to this topic, we recommend watching the "shape layers" movie from After Effects CS4: Apprentice's Guide to Key Features in the lynda.com Online Training Library®.