Join Angie Taylor for an in-depth discussion in this video What is wiggle?, part of After Effects Expressions for Premiere Pro Editors.
- As we've discovered After Effects expressions can save a lot of keyframing time. Either in Premiere Pro or After Effects. And one thing expressions really excel at is adding randomness to our value. And this is really useful anytime you want to create things like camera shake effects or some kind of interference on the screen, or even kind of glitchy video editing techniques. And there's an expression called the wiggle expression that absolutely excels at creating these kind of effects.
That's what we're gonna have a look at here. So in here I've got three text layers. I've got the top layer switched on, and I've got a wiggle controller in there that we'll have a look at later. But we've going to start by having a look at this one here. Now, applying the wiggle expression is so easy, you don't even need to use the expression language menu to apply it. All you need to do is alt click on the stopwatch, type in the word wiggle, ok? And then there's two other things that wiggle needs to operate. It need to now how often you want to create a wiggled, or random, parameter.
And by how much do you want it to wiggle. So those are known as frequency and amplitude. And they need to be put in parenthesis, so I'm going to open parenthesis and I'm going to type in a number for my frequency. So how many times per second do I want it to wiggle. Well let's say ten times per second. And then we separate the values by a comma, and then the next value is amplitude. By how much do we want it to wiggle? We're working with positions, so let's go 100 pixels.
So ten times every second, close the parenthesis. It's going to give us a wiggled value, or random value, within 100 pixels of this current value. And if we click away from the expression and preview that, you'll see that indeed I am getting a wiggled position value. If this was keyframes there would be ten every second. So adjusting those values would be quite tricky. The great thing about expressions is it's just a case of going in and changing the numbers.
So I can change that to one, and we can see it changing immediately to one wiggle per second. Let's also change this value. Let's change that down to ten. So it's a very small amount. So now we just get a very small amount of wiggle, which makes it look like it's just kind of free floating. If we combine a very small movement with a very high number like 50, we get something that looks more like it's shivering. Ok, and the smaller the number and the faster, the more shivery it looks.
So let's bring that down to five, and that up to 100. So you can create all sorts of different effects from undulating, smooth motion, to really rapid shivery effect. And it can be applied to any property. Obviously this is being applied to position, but imagine being able to apply this to cameras as they're moving around your 3D environment making them wobble from side to side. Or adding them to effects like colored effects to make the color fade on and off randomly as the video is played.
All sorts of uses for this, and we'll have a look at some of those later. But for now what I want to do is show you how you can maybe wiggle on a single dimension. We may just want to wiggle it up and down but not from side to side. So how would we do that? Well let's open up this one where I've already applied a wiggle and it's got a wiggle of 10, 30. Let's switch that on. So there you see the wiggle that we've got on this layer. And what we're going to do here is just change the wiggle expression slightly.
So we're going to use a variable, so we're going to just say W equals wiggle. And then we'll add a semicolon at the end of that line, and hit a return to add a new line. And then on the second line, we open square brackets and we can put a value for the x value of position and a value for y value. They need to be inside square brackets. So inside the square brackets we'll put value zero, in square brackets. Which is expression speak for the x value.
And we'll say plus W, and we need to say which dimension of W. So wiggle produces two values, a value for x and a value for y. So we need to say W, and then in square brackets zero. So we're adding the zero to the wiggled value zero. And then on the y axis we're just going to type in value, which returns the y value that we already have here. And if you close square brackets, click away from the expression, we should now have it wiggling on the x axis but not wiggling on the y axis.
And I can still use these scrubbable values because I used the word value in there I can actually still refer to the value. So I can adjust it, place it anywhere on the screen but just moving these. So that's how you can apply a wiggle, or a random value to a property. And also how to assign it to a single dimension. In the next tutorial we'll have a look at how you can vary a wiggle over time.
After Effects Expressions for Premiere Pro Editors is a creative, project-based workshop. Editors take a basic Premiere Pro edit and bring it to life using After Effects expressions and Dynamic Link, following author Angie Taylor's expert instructions. The concepts are broken down into manageable 3–5 minute videos, covering techniques such as randomizing effects, linking animation and color to sound, automating animation, and more.
- Linking footage from Premiere Pro in After Effects with Dynamic Link
- Understanding the expression language
- Automating animation with expressions
- Randomizing effect properties
- Linking color and light changes to audio
- Creating camera shake with a wiggle expressions
- Linking keyframes to create a lightening strike effect
- Synchronizing color and other design elements
- Creating amazing text animations