Okay, so you need an After Effects 2D flag waving! Maybe you need it to highlight a patriotic moment, or to signify the start of a race, whatever the reason, you’ve come to the right place. In this tutorial, you’ll learn how to create a waving flag in After Effects by using a shape layer with merge paths. Let’s get started!
How to Create a 2D Flag Animation
Step 1: Create a New Composition
First up, set up your composition layers.
- Create a new composition.
- Add two layers. Layer 1 will contain your flag pole, plus background elements. Layer 2 will contain your flag, which must be a Shape Layer.
All the best things have layers. Like cake!
Step 2: Adding a Rectangle
Now, create a rectangle shape within your flag layer and position your rectangle at the start point of your wave in the viewer.
- Select the Flag layer.
- Open the Add menu.
- Choose Rectangle.
- Twirl open the Rectangle, adjust the size to be ¾ width of the flag, and double the height, position just to the left of the flag.
Let’s get waving!
Step 3: Animating the Wave
Time to create the initial animation for your wave.
- Set a keyframe on frame 0.
- Move the playhead to frame 60 in the Timeline.
- Position the Rectangle to the right of the flag.
- Option + click on the Stopwatch, then click on the menu option Property > LoopOut.
And you’re looping!
Step 4: Merge Paths
Add a merge paths to your flag layer so that the rectangle will subtract the flag from the viewer as it loops.
- With the Flag layer selected.
- Click on the Add menu.
- Choose Merge Paths.
- Twirl open Merge Paths, change the Mode from Add to Subtract.
Now that’s what you call magic!
Step 5: Offsetting the Wave
In this step, you’ll duplicate the flag layer, change the mode so that the flag within the rectangle shows on screen, and bump up the height in the viewer to create an offset. An offset makes that part of the flag appear closer to the viewer, making the 2D flag look three dimensional!
- Select the Flag layer.
- Type Command + D to duplicate the layer.
- Twirl open the duplicated layer, change the Merge Paths Mode from Subtract to Intersect.
- In the viewer, move the position of the Flag up slightly from the original flag to create the offset part of the flag.
All that’s all there is to it!
You now know how to create a 2D waving flag in After Effects, and it’s as simple as animating rectangle merging paths with your flag layer. Now that you know how to create an animated flag, get ready to incorporate this into your next video! Have fun!