3.1 How to Animate Grass
In this lesson, you'll learn how to animate grass so that it looks as if it's gently swaying in the wind. You will learn how to use keyframes and the wiggle expression to achieve this effect.
1.Introduction1 lesson, 00:45
2.How to Prepare Your Digital Painting1 lesson, 04:02
3.How to Animate a Painting in Adobe After Effects5 lessons, 29:19
3.1 How to Animate Grass
Hi everyone, and welcome back to the animated landscape painting course. In this lesson, you'll learn how to animate grass so that looks like it's gently swaying in the wind. So let's start by first importing our Photoshop file into After Effects by going to File, Import and File. Navigate to the location of your psd file, select it, and then we want to Import As Composition and Retain Layer Sizes. Check Create Composition, and uncheck Photoshop Sequence and then click Import. Select Editable Layer Styles from the options here and then click OK. This will create a new comp in After Effects with all your Photoshop layers. So let's go ahead and double click on the Compare, excellent. And now you'll find all the layers ordered as they were in the Photoshop file at the bottom here. Let's go ahead and double click on the foreground compare. And this will also open up the foreground folder where you'll see that we've got all of our foreground layers here, like so. Now before we begin, we just wanna make sure that our composition has the right time duration. So our animation is gonna be five minutes. So right click on the tab here, go to Composition Settings, and we're gonna change this to 5 minutes. Like so. Click OK once you've done that, and now from here we're going to select one of these grass layers. So let's hide all of our grass layers all the other layers, like so. We're just going to concentrate on this grass layer here. So let's select that, and then once you've done that, we want to add a CC Slant effect to this by going to Effect and then going to Distort, and then finding CC Slant, like so. This will add the effects to the layer, which you can see on the Effects and Controls panel here. Now if we go ahead and change the Slant value here, you'll see how it affects the grass, like so. Let's make a few adjustments here before we animate it. Now he wants to take a note of the floor location here, as this is where our grass is going to be routed. So click on the target icon here, and then click on where you want the floor to be. So we want the floor or our grass to be just underneath like so, and you'll see how that affects our animation, like that. Now if we for example, placed the floor in the middle you'll notice how the animation doesn't look quite right as it's moving both the top and the bottom of the grass. So let's keep the floor at the bottom here, like so. And now we're ready to start animating the grass. Let's go ahead and open up the grass layer until we can see our CC Slants options. And now we want to hold down the Alt key on the keyboard and also click on the Slant option here, like so. This will allow us to type in the expression dialog box here. So we're going to type in a little expression here, which is wiggle, open brackets, and then a time value, which we're going to go with 0.8, for example. Add a comma here and then a wiggle value which we're going to go with 10 as an example, and then close the brackets. Excellent, now this means that the wiggle animation will move between a value of 1 to 10 every 0.8 seconds. Now that we have this, let's go ahead and preview our animation, like so, excellent. And now you'll see we've got this cool subtle grass swaying in the wind animation. Now this is a great way to have some grass animation quickly and easily. However, we don't get a lot of control with this technique. Which can become a little bit of a problem if we wanted to add key frames or loop the animation by having the first and the last frame of this animation exactly the same. So an example of this, is if we play the animation from the very end here like so. You'll notice how that as the animation reaches the very end, it's sort of twitches. Now, we don't want that, so let's go ahead and fix this by attaching some sliders. So again, make sure that the cross list selected and then we want to go to Effect and then Expression Controls, and then Slider Control. Let's go ahead and rename this Slider into the Time Slider. And then let's go ahead and create another one. So Effect, Expression Controls, Slider Control. And we want to rename this, the Wiggle Slider. Awesome, now we need to attach the values to our sliders. So let's go back to our expression. And we want to highlight the 0.8 value here, like so. And then we want to go over to the pick whip, which is down here, not the pick whip for the layer. We want to use the expression pick whip and then just click and drag it over to our Time Slider, like so. Excellent, and now we want to do the same with our value here. So wiggle value, so let's go ahead and highlight the 10. Use the pick whip, and then slide it over to the Wiggle Slider, like that. Excellent, and now we can use these sliders to control our wiggle animation using key frames. So let's drag our timeline to the very beginning of the timeline here. And we want to add a key frame for both the Time Slider and the Wiggle Slider, by clicking on the stopwatch buttons like so. Now, we can also go ahead and see how this is affected in our timeline. So let's go ahead and open these up, like that. Now we can see the two key frames at the bottom here. Now we want to make sure that the value is set to 0. So at the very beginning, the value of our wiggle is both at 0. And now we want to go forwards one frame, so let's zoom in here so you can see what we're doing. So we don't want to move forward too much. So let's move forward one frame and now let's enter a value for our sliders. So for the Time Slider let's enter value of 0.7. And for the Wiggle Slider, let's enter a value of 10. And this will start the animation. So now you'll see we've got our next two key frames one frame apart, like so. Now let's move forward to about three minutes, like that. And then let's add another key frame for both sliders. So let's click on the key frame button here, like that. And we want to keep the values the same, so 0.7 and 10. And then let's go all the way to the very last frame and then let's click on the key frame buttons again here. But this time we want to reset the key, we want to set the values back down to 0, like so. So this means that the last frame of our animation is a value of 0 for both the time and the wiggle. And also a value of 0 on the first frame, meaning that our first and last frames match and that our animation will be looping. Let's go ahead and preview that. Excellent, so now we've got a nice smooth animation for our grass. Now just repeat the same steps for the other grass layers just to create a field of swaying grass. In the next class, we'll learn how to animate the sunlight. See you all there.