How To Create Animated Backgrounds in After Effects CC

After Effects 03/06/2019 6 min read

In this tutorial, you’ll learn how to make an animated background or pattern inside of After Effects. We’ll use two different animated trees patterns in this example for you to try out. Add movement and character to your background by following these steps. Let’s dive in! 

How to Make an Animated Background

Step 1: Create the Tree Truck

Begin by making a new composition sized: 1920×1080, 29.97, then name it Animated BG, and hit OK. Once you have your new composition, you need to create a new shape layer by going to Layer > New > Shape Layer, and make sure to add a Path, and name this layer Tree Trunk

Drawing straight lines in After Effects isn’t the easiest, so you if have access to Adobe Illustrator, we recommend popping into that program. In Illustrator, use the Line tool to draw a small vertical line and copy it. 

Back in After Effects, twirl down the path and paste the line. This will make sure it’s perfectly centered and straight as well. Add a Stroke to this path, change the Stroke Width to 10 and change the Color to whatever you want for the truck. Change the Line Cap to Round Cap.

Step 2: Create the Leaves and Branches

Now add another new Shape Layer and add an Ellipse and a Fill to it. Change the Fill to be something suitable for the leaves, such as a light green. Rename this layer Leaves. From here, drag this layer below the Tree Trunk layer. Zoom into your composition and reposition it and adjust the size. It should start to look a bit like a tree. 

Create a Group so you can add a Shadow. Put the Ellipse Path and Fill into the Group. Then duplicate the group, and go to the Ellipse Path, right-click, and select Convert to Bezier Path. That way, you can edit the path, so that it doesn’t have to be a circle. Grab the Delete Vertex Tool, and delete the point from the left of the circle. Then go to the Convert Vertex Tool and grab the handles and drag them straight down towards the vertical tree trunk line. If you hold Shift, they will snap to 90 degrees. From here, go to the fill of this path and make it a darker version to create the shadow. At this point, you may also want to adjust the length of the tree trunk so it goes halfway up. 

With no layers selected, use the Pen tool and draw a branch or two for the tree. Make it’s Stroke the same color and width as the trunk, plus you’ll want to use round cap again. Now, let’s animate it!

Step 2: Add Animation to the Tree

Add a Trim Paths to the tree trunk layer and animate the path growing from bottom to top from about frame 0 to 20. You’ll want to have an Easy Ease to these keyframes. Then animate the Scale of the leaves layer so that at frame 0 it’s at 0%, and at frame 20 it’s scale is 100%. 

Also while you’re working on the leaves layer, animate the position so that it follows the growth of the trunk from frame 0 to 20. Apply the same easing to these keyframes. 

On the branches, move the anchor point to the point where they come into contact with the trunk. Then animate the Scale from 0 to 100% from frame 0 to 20 and apply the same Easy Ease.

Offset the branch layers so that they animate in after the trunk has grown past where they are placed. Select all the layers that make up the tree and go to Layer > Precompose. Call the pre-comp Tree 1 and hit OK.

Step 3: Create New Tree Animations Variations

In the project panel, duplicate the Tree 1 Comp twice so that you end up with three tree comps. Open up Tree 2 and Tree 3 and make necessary adjustments so that they are their own unique trees.

You can reuse all the trunk and branch keyframes, but you’ll probably want to make new shapes for the leaves. In our video example, we made one with two triangles stacked and one with two circles stacked for a little variety. Adding variation will give your background pattern more complexity and visual interest. 

Step 4: Loop All of the Tree Animations

In the Tree 1 composition, select all the layers and go to Layer > Precompose. Call the new pre-comp Tree 1 Animated. Still in the Tree 1 comp, right-click on the Tree 1 Animated pre-comp (this should be the only layer now) and go to Time > Enable Time Remapping. Time remapping will allow you to keyframe time. For this example, let’s have the normal animation play out, then reverse it to create the loop. 

By default, there are two keyframes, one at the beginning and end of a layer. Go to frame 30 and add a keyframe with the value of 30 (or 1 second). Select the keyframes at 0 and 30 and copy them. Move the playhead to frame 150 and paste the keyframes. Right-click on the two new keyframes and go to Keyframe Assistant > Time Reverse Keyframes. This will animate the trees back out by reversing the time. 

Go to the end of the layer and delete the last keyframe that was set by default. Move the playhead to frame 200 and set a keyframe with a value of 0. Hold Option and click on the Stopwatch for Time Remap, and using the arrow button go to Property > LoopOutDuration.

Now the animation in and out will keep looping through. Highlight the Time Remap property to select all the keyframes and Copy them. Now go to the other two tree comps and precompose them just like you did for Tree 1. Making sure the playhead is at frame 0, paste the Time Remap keyframes and expression onto them. Now you’re ready to make the pattern!

Step 5: Create the Background Pattern 

Row 1

In the Animated BG Composition, bring in Tree 2 and Tree 3 (Tree 1 should already be there). Leave one tree centered at 960 for its X position. Move the other two trees 400 pixels to the left and right of the center one (their X values would be 560 and 1360).

Duplicate the trees and continue to space them 400 pixels apart to fill up the width of the screen. It will likely require five trees. Make sure that you alternate through the trees so that there aren’t two of the same trees right next to each other. 

Select the two trees directly to the left and right of the center and offset them in the timeline so that they begin at frame 5. Then grab the two trees on the outside and offset them, so they start at frame 10. This will create the look of it all emanating from the center. Select the five tree layers and go to Layer > Precompose and call the pre-comp Row 1. Move the Row 1 pre-comp down so its Y position value is 740. 

Row 2

Now you’ll work on making a second row. Still in the Animated BG Composition, bring in all of the tree layers again. This time, instead of having one tree in the center, you’ll have two trees on either side of the center. Pick the two trees you want and make one X value 760 and the other X value 1160. This way they are still the same distance apart but the whole row will be offset 200 pixels. 

Fill in the rest of the row with duplicates spacing them 400 pixels apart. Use the Row 1 pre-comp as a reference so that you aren’t putting two like trees next to each other. It should take six trees to fill up the screen. 

The outside ones will barely be on the screen but add them in anyway for even spacing. The two trees closest to the center will remain, starting at frame 0. The next two further from the center will be offset so that they start at frame 5.

The last two (the furthest away) will be offset so that they start at frame 10. Select these tree layers and go to Layer > Precompose and name the new pre-comp Row 2

Step 6: Create the Background Pattern

Adjust the position of Row 1 so that the Y value is 540, it will be centered to the screen. Then, change the Y Position value of Row 2 to 340 so that it is 200 pixels above Row 1.

Duplicate the rows and fill up the screen, spacing them 200 pixels apart in the Y dimension. In our video example, we ended up with three rows above the center and five below the center. Then we added two extra on the bottom side so that I could animate a scroll down, leaving us with a total of nine rows. 

Select the rows on both sides of the center and offset them, so they begin at frame 4. Continue offsetting the rows four more frames until all of them are offset (similar to how you offset the trees making up the rows). This will complete the emanating from center look. 

Step 7: Loop the Animated Tree Pattern

Go to Layer > New > Null Object and name the new null Mover. Parent all the rows to the Mover null.

At frame 0 set a position keyframe on the Mover null. Move the playhead to frame 150 and change the Y Position value to 140. Then Option + click on the Stopwatch for position, and click the arrow button and go to Property > loopOutDuration. This will create a nice seamless loop, so you don’t have to make any more rows for the null to scroll through. 

Step 8: Add a Solid Background

Now all that’s left to do is add a background. You can do this by going to Layer > New > Solid. Name it BG and choose a nice light green, make sure it’s comp-sized. 


We hope you enjoyed this tutorial on how to create animated backgrounds in Adobe After Effects. While this example used trees to create the background pattern, you can apply these principles to create whatever you need for your own projects!