Unlimited AE and Premiere Pro templates, videos & more! Unlimited asset downloads! From $16.50/m

Next lesson playing in 5 seconds

Cancel
  • Overview
  • Transcript

5.4 Boutique Text: Wiggle Expression

[MUSIC] In this lesson, we're gonna pick it up right where we left off in the last lesson, and you're gonna learn about a really useful expression called wiggle. [MUSIC] The final thing that I wanna do with these leaves is I wanna give them some wiggle in the rotation property here. So rather than key frame the animation, which we could do and that would give us, well, a ton of control, it's gonna be very tedious to do that on many layers and get a unique look. So instead what I'm gonna do is I'm going to insert another expression and this is not gonna have any keyframes on it. So I'm going to alt click on the rotation stopwatch. I'm gonna come in here and I'm just going to type wiggle, and you can see if you're running After Effects 2020 and I believe 2019 it does this, it's going to prompt you. And so with the wiggle expression, we need the word wiggle and then we need something inside parentheses. So if we start and we put a parentheses in here, it's gonna add the end parentheses and we need two things at the very least. We need a frequency and we need an amplitude and these are two properties separated by a comma. So let's just type in some numbers. So let's say, let's do a frequency of ten and then we're gonna put a comma and then we need an amplitude. And this is going to be the amount that the rotation is going to move. So ten is gonna be the frequency. That's gonna be ten times a second. Which if you're thinking about that, [LAUGH] it's gonna be way too much. But I wanna show you kind of an over exaggeration, and then we need an amount. So let's just type in 30. And then let's press Enter on the numeric keyboard. I'm gonna solo this layer so you can see exactly what that's going to do. Wow, if it was blowing this much in the wind, I'd say we have a major problem and you need to get indoors probably in a hurricane or tornado shelter. [LAUGH] But you can see basically what it's doing and in fact, we can jump into the post expression graph here and look. So over time without doing any keyframes, this property is basically animating itself. And this is what wiggle does and it does a great job of it. However, it's doing it [LAUGH] way too much, right? This is way too fast. So we need something much more subtle. Maybe something like point five and then I don't know maybe five degrees of wiggle. And if we look at that, I think that's gonna be about right. However, just like before, what I wanna do is I wanna think ahead. So once I see this whole thing built, if I wanna go back and adjust the wiggle on all 20 of these layers, that's gonna be very tedious because I'm gonna have to jump back into the rotation property. And jump into the expression and then update these numbers and well that's not so fun. I'm gonna come up to my leaf controller here and I'm going to put in another slider control and I'm gonna call this a wiggle frequency, duplicate that. And then I'll just change this to wiggle amplitude. And then down here in my wiggle expression, I'm going to select point five. And I'm going to pick whip up to frequency. And I'll set this to point five. Now I'm going to select just the five here and I'm going to pick whip up to the amplitude. And I think that looks correct. And we hit Enter here. Okay, it's giving me an error and I'm pretty sure that's because I need another parentheses in there. I don't know why it does something, I had only the five selected but the expression needs to live inside parentheses. And when you pick whip to something over here, this last slider name is in parentheses, and so it needs another parentheses to basically close this out. You can see when I put the cursor right here, it selects this ending parentheses, is it parens? I don't know what the singular of parentheses is. Someone can correct me. And that's fine. But you can see that the corresponding open parentheses here to this closed parentheses is at the beginning of all of this junk here. So it's wiggle open parentheses that we need the frequency, which is linked to the wiggle frequency slider here, and then we need the amplitude which is after the comma. So boom, there's our comma and then we have the code here, this comp.layer and then the layer name and the effect and then .wiggle amplitude and then slider, and we need that ending parentheses. So once we have that, we're all good to go. And we can type five here, and now we're good to go. Check this out. And if we want more wiggle, no problem, we can just change this to like point seven or something, now, it'll wiggle faster. Or we can put this to 15 and now it's gonna go more. Very, very easy to modify. The last thing that we need to do is copy the expression on the rotation, bring up the rotation on these other leaf layers here. Select all of them and then paste them in. All right, so now we should see, A really nice animation. Now, I didn't turn those values up too high. But the nice thing about the wiggle expression, you would think, well, you pasted the same exact code here. Why are they all doing something different? Well the wiggle expression has some quasi random variation to it. And if you apply the same frequency and amplitude to two different things, they're gonna have a different animation because there's some random sort of values that are happening there. We get a nice kind of random blowing in the wind effect here. It's very cool. So that about does it for this lesson. In the next few lessons, we're gonna be looking at duplicating these leaves. We're gonna do a really cool write on effect for this text, and animate all of the other elements here, and it's gonna look great. So check those out coming up next. [MUSIC]

Back to the top