How to Use After Effects: Animate Simple Fireworks

How to Use After Effects: Animate Simple Fireworks

Happy 4th of July! It’s the time of year when fireworks are on everyone’s mind. Several clients at my job requested animated ecards and social media post graphics of—you guessed it—fireworks. I used After Effects to animate simple fireworks, like those shown here. These are “shaped-based.” Indeed, I drew these triangles in After Effects itself. Keeping artwork native makes for easy edits and transforms, plus fast processing. Additionally, the simple shapes and flat colors result in a small export. I can reduce the GIF to just 16 colors without quality loss. Instead, I invested my file size savings in a higher frame rate for smooth, smooth movements. Follow this tutorial to animate simple fireworks in your own After Effects project!

Note: This tutorial is an adaptation of Evan Abram’s excellent tutorial, “After Effects Video Tutorial: Shape Based Fireworks,” on YouTube (PremiumBeat by Shutterstock, 2014). I’ve written out the steps to make it easy to follow along. However, I’ve also adapted some steps and provided further explanation to make my tutorial more beginner-friendly.

How to Use After Effects: Animate Simple Fireworks

Tutorial on How to Animate Simple Fireworks

1. Create a New Composition

The first step to animate simple fireworks is simple. Start a new After Effects Project!

Create a New Composition, sized to 1920×1080 and the standard 29.97 fps, with whatever #skycolor. Don’t worry—you can scale the composition later* and export to whatever frame rate** you need. Then, set the duration to 1.25 seconds (i.e. 0;00;01;15 in the Duration field).

The first step to animating simple fireworks: make a new comp!

*Resize the whole animation with File > Scripts > Scale Composition.

**Is the final file size too big? Reduce the frame rate when you export. Go to File > Export > Add to Render Queue > Render Settings > click “Best Settings” to open the Render Settings modal window > Frame Rate > check Use this frame rate: [fps] and enter the fps of choice. Be sure to use even increments from the original. For example, reduce 29.97 fps to 14.985 fps, an even 50% of the original, high-res frame rate. This reduces random jumps from skipped frames in your final export.

2. Draw the First Triangle Shape

First, create a new Shape Layer to store the shape. (If you don’t, After Effects tries to use the shape to mask another, existing layer instead. We want this to be a visible, stand-alone shape. We don’t want a mask.)

Second, [Alt + click] the Shape Tool button to toggle through the shapes until the Polygon appears. Then, double-click the Polygon Shape Tool to place the shape on the composition. A pentagon then appears by default. After Effects also automatically aligns the shape to the top and horizontal center of the composition by default; the pentagon can stay like this.

Next, adjust color to taste, whatever your #fireworkcolor. Then remove any stroke. (Just [Alt + click] to cycle through the Fill and Strokes modes, too.)

The start of Step 2a shows After Effects make a pentagon by default when placing a new polygon Shape Layer.

Finally, we need to convert the pentagon into a triangle.

In the Timeline menu below, drill down to Shape Layer 1 >  Contents > Polystar 1 > Polystar 1. Change Points from 5 to 3, which converts the pentagon to a triangle. (As you can see, Points dictates the numbers of sides the shape has.)

Also, adjust the size. In the same Polystar 1 settings, set the Outer Radius to 100. This small size leaves room to add more shapes.

Step 2b: To animate simple fireworks in After Effects, start with a simple triangle shape.

3. “Explode” the First Triangle

Let’s proceed to animate this first triangle “exploding” from the center. It’s one of many in a whole ring of triangles. However, we can animate this one, and duplicate it to make the others.

First, in the Timeline, move the blue scrubber to 0:00f. Set these keyframes:

  • Shape Layer 1 > Contents > Polystar 1 > Polystar Path 1 > Position keyframe at 0,0 (click the chain to unlink)
  • Shape Layer 1 > Contents > Polystar 1 > Transform Polystar Path 1 > Scale keyframe at 50,0% (click the chain to unlink)
  • Shape Layer 1 > Transform > Scale keyframe at 0,0%

Scaling Polystar Path 1 only scales the actual shape. In contrast, scaling Shape Layer 1 scales the whole layer.

Second, move the Timeline scrubber to 20f, and add these keyframes:

  • Shape Layer 1 > Contents > Polystar 1 > Polystar Path 1 > Position keyframe at 0,300
  • Shape Layer 1 > Contents > Polystar 1 > Transform Polystar Path 1 > Scale keyframe at 0,100%
  • Shape Layer 1 > Transform > Scale keyframe at 100,100%
Screenshot of Step 3’s keyframe placement.

Finally, hit spacebar to preview the animation now. Watch the triangle shape grow slightly wider and much taller while it travels outward from the center, then appears to vanish. This is the start of the grand fireworks explosion!

Preview animation of Step 3, in which the triangle shape bursts outward from the center.

4. Customize Explosion Speed with Keyframe Easing

This is where Evan Abram’s video tutorial on how to animate simple fireworks gets advanced. Tweak the timing, so the movement is less uniform and more natural. 

First, select all the keyframes in the Timeline. Toggle U to show active keyframes only to make it easier to find and select all of them. Then, right-click one of them. Next, go to Keyframe Assistant > Easy Ease. Watch all the diamond keyframes change to hourglass symbols as a result.

Next, click the Graph Editor button at the top-right of the Timeline panel to begin customizing the timing. By default, Easy Ease looks like a rainbow for each keyframe:

Screenshot overview of Step 4a, before any edits to the Graph Editor.

Select all the opening keyframes to the left which causes white squares and yellow handlebars to appear. Then, grab the left handlebars and shove them all the way to the left until rainbow is chopped in half. As a result, the triangle’s movements now start very fast, then slow down at the end.

To animate simple fireworks, customize the left-side easing on the exploding shape in Step 4b.

Afterwards, select the ending keyframes and grab their yellow handlebars on the right side. Also shove these all the way left. As a result, the half-rainbows looked pinched into a point facing the side. Ultimately, this new easing slows down the ending movements even further. 

To animate simple fireworks, customize the right-side easing on the exploding shape in Step 4c.

In the Timeline panel, hit the Graphic Editor button to toggle off the easing chart. Preview it again with spacebar. The easing effect is now quite dramatic! The explosion starts fast and fizzles out, just like an actual firework explosion.

Preview animation of Step 4d, in which the triangle shape bursts outward slowly, then increasing speed just before it fades away.

5. Duplicate the Triangle into a Ring

Now, our triangle is great! On to the next step to animate simple fireworks…Obviously we need many more triangles to create the radial burst of fire we see in firework explosions.

However, don’t redo these steps—simply duplicate this Shape Layer. And you don’t even need to Cmd + D! After Effects automates this process through a Repeater.

Scroll to the top of the Timeline menu. Then, go to Shape Layer 1 > Contents > Add > click the “play” button > Repeater. By default, the Repeater shape property adds 3x new copies and places them horizontal to the original.

Screenshot of Step 5a, showing how the Repeater appears by default in this simple fireworks animation.
The Repeater makes 3x copies, side-by-side, with the original when first applied.

Then, open the Repeater transformation options, at Shape Layer 1 > Contents > Polystar 1 > Repeater 1 > expand Transform: Repeater 1. Change these settings:

  • Increase Copies from 3 to 12.
  • Change Position from 100, 0 to just 0, 0 (No keyframes necessary)
  • Set Rotation to 0x+30°.*

Basically, these Repeater edits increase the number of copies, then stacks them all on top of the original, and finally fans out all the copies into a circle.

Right now, 12 copies won’t look like enough. Indeed, the firework looks a little bare. However, we’ll duplicate this ring twice more to create a more complex firework shape.

Finally, preview the simple fireworks animation again. Now it’s starting to look like a firework!

The finished Repeater in Step 5b.

*If you didn’t want 12 copies, use this formula to calculate rotation: 360° ÷ (Number of Copies) = Rotation setting°. You can also use After Effects to calculate this for you. Just swap [÷] for a [/] and press Enter.

6. Duplicate the Ring Once

Let’s add visual interest with a more complex explosion. Earlier in Step 5 in this tutorial to animate simple fireworks, I wrote that although 12 triangles look bare, we’ll be adding more later by copying this ring. It’s time to copy.

Duplicate Shape Layer 1: first select it in the Timeline, then hit Cmd + U.

First, offset the keyframe timing:

  1. Go to Shape Layer 2, and hit U to show all active keyframes.
  2. Then, select all ending keyframes, and move them right to 22f.
  3. Lastly, select all keyframes, and move the whole layer to 01f.

As a result of these moves, the second explosion starts later and takes longer to finish exploding than Shape Layer 1’s.

Step 6a in “how to animate simple fireworks” begins by offsetting the timing of the duplicate Shape Layer.
Focus on the After Effects Timeline panel overview, where keyframes have been moved.

Hit U again to toggle off the active keyframe view and reveal all the transform options again.

Second, offset the shape positioning:

  1. Go to Shape Layer 2 > Contents > Polystar 1 > Repeater 1 > expand Transform: Repeater 1 to see its settings
  2. Increase Copies from 12 to 24
  3. Decrease Rotation from 30° to 15°

This is better, but the two sets of triangles still overlap.

By Step 6b, the Repeat is working but overlaps shapes on the previous Shape Layer.

Finally, let’s rotate the whole layer, too:

  1. Go to Shape Layer 2 > Transform > Rotation
  2. Input [360/24/2] + [Enter] for a sum of 7.5° (No keyframes, it just stays this way.)
Preview animation of Step 6c shows the offset Shape Layer finally removes the overlap.

7. Duplicate the Ring, Now Twice

Let’s add even more triangles.

First, duplicate Shape Layer 1: hit Cmd + D on it in the Timeline menu.

Next, rotate the whole layer of the latest duplicate, Shape Layer 3:

  1. Go to Shape Layer 3 > Transform > Rotation
  2. Input [360° ÷ 24 copies] + Enter for a sum of 15° (No keyframes again.)

As a result, the positioning of Shape Layer 3 is now offset from the other two shape layers.

Similarly, offset the timing of Shape Layer 3, as well:

  1. Go to Shape Layer 3, and hit U to show all active keyframes.
  2. Then, select the opening keyframes and move to 02f.
  3. Lastly, select the closing keyframes and move to 024f.

Finally, the firework explosion is done! That’s how to animate simple fireworks. However, we can add more detail for visual interest—like the rocket launch.

Completing Step 7 shows the first, finished explosion to animate simple fireworks.

8. Trim Fireworks Explosion Purple Bars

This step is optional. However, trimming the Timeline’s purple bars creates a cleaner appearance and makes it easier to track the animation.

The Timeline layers don’t need to extend any further than when each layer’s animation ends. For example, the last firework explosion tween finishes by 24f.

Click each purple bar from the Timeline, and drag its right edge to its last keyframe. Make sure you’re selecting just the purple bar; the keyframes themselves shouldn’t move.

Screenshot of Step 8 in “how to animate simple fireworks” showing the completed trimming of the Timeline’s purple bars.

9. Add a Rectangle for the Rocket Launch

Now, let’s add the initial rocket launch. Evan Abrams suggests in his video tutorial above to animate the rocket launch shooting left-to-right rather than bottom-to-top. Consequently, you have rotation flexibility with this longer fireworks tail later. The longer fireworks tail helps especially with more dynamic, side-to-side launch sequences.

First, go to Layer > New > Shape Layer, toggle through the Shape Tool until the Rectangle, then double-click the Rectangle Tool button to place it. By default, the new rectangle fills the screen.

Next, resize the rectangle. Drill down the Timeline panel layers into Shape Layer 4 > Contents > Rectangle 1 > Rectangle Path 1 > Size (click to unlink). Adjust Size to something shorter and much thiner, like [1920/2], 3. (You can let After Effects calculate the quotient for 1920 ÷ 2; just hit Enter.)

As a result, a long, horizontal line shows on screen. If you’re committed to a vertical launch, complete the next step and rotate everything at the end. This way, you keep the longer tail, too.

Step 9a screenshot illustrating just the rectangle shape on screen.

10. Animate the Rocket Launch

First, align the rocket trail, so it ends in the center of the fireworks explosion. Go to Shape Layer 4 > Contents > Rectangle 1 > Rectangle Path 1 > Position. Set Position to -480, 0.

Next, set a few middle keyframes at the “height” of the action:

  1. Drag the Timeline scrubber to 10f
  2. Add a Size keyframe and leave its value as-is
  3. Also add a Position keyframe and leave its value as-is, too
Screenshot overview (Step 10a) of the middle rocket launch keyframes in “how to animate simple fireworks.”

Then, go back and set the opening keyframes:

  1. Return the Timeline scrubber to the beginning, 0:00f
  2. Add a Size keyframe and change from 960, 3 to 0, 3
  3. Likewise, add an opening Position keyframe and change from -480, 0 to -960, 0
The rocket launch’s opening keyframes in Step 10c make the rocket launch trail appear to travel left to right across the animation.

Finally, set the closing keyframes:

  1. Move the Timeline scrubber to 20f
  2. Add a Size keyframe and set to 0,0
  3. Also add a Position keyframe and set to 0,0 too

As a result, the rocket launches from the left, hits the center area of the fireworks explosion, then flattens the launch line to make it disappear.

The rocket launch’s closing keyframes in Step 10c make the rocket launch trail disappear.

Optional: Still don’t like the sideways launch? Now you can rotate. Go to Shape Layer 4 > Transform > Rotate and set to -90°,0. As a result, the whole animated layer rotates upward.

Optional: rotate the rocket launch so it’s vertical.

11. Customize Rocket Launch Easing

Recall from Step 4 above that we customized the easy ease of the firework exploding. Similarly, let’s customize the timing on the rocket launch. As a result, its timing will be less uniform and more dynamic.

First, toggle U to show active keyframes only. Then, select all the keyframes, and right-click one of them. Next, go to Keyframe Assistant > Easy Ease. Watch all the diamonds change to hourglasses as a result.

Next, select only the two middle keyframes, and hit Cmd + double-click to apply an Easy Ease with auto-bezier.* This results in a smooth, even rate of easing. Either way, the Timeline hourglasses now change to circles as a result. (One click brings you back to diamonds. Be sure to click twice for circles.)

Open the Graph Editor by clicking its button at the top-right of the Timeline panel. Right now, it looks like this:

Screenshot of Step 11a, before the Easy Ease graph edits.

Next, let’s illustrate resistance as the rocket takes off with custom easing.

First, select all the right points, grab their yellow handlebars, and shove them left all the way towards the center. Similarly, grab the left points and their handlebars, and shove them right all the way towards the center.

Screenshot of Step 11b, after the Easy Ease graph has been customized.

Finally, exit the Graph Editor by hitting its button again. Then hit Spacebar to preview. Currently, both the launch and the explosion occur simultaneously, instead of launch before explosion. Let’s change that in Step 12.

Screenshot of Step 11c, showing how the fireworks animation plays after the Easy Ease edits.

*Note that Step 11 differs from Step 4 in that only the middle keyframes get easing, and instead of hourglasses, look for circles. The hourglasses indicate a continuous bezier on the easing. In contrast to auto bezier, continuous bezier achieves the same smooth rate of motion but with manual overrides on the yellow handlebars. Find more info on how After Effects easing works in the Adobe article, “Keyframe interpolation.”

12. Stagger the Explosion after the Launch

First, move Shape Layer 4 to the bottom of the Timeline layers, so the explosion happens up front.

Then, select all the explosion keyframes (Shape Layers 1–3) and drag them to start later in the Timeline, after the launch to say, the earliest starting at 16f. Adjust timing to taste.

Completed GIF from the After Effects tutorial on how to animate simple fireworks.

And that’s it! This completes how to animate simple fireworks.

How to Use After Effects: Animate Simple Fireworks

Next Steps:
Animate a Simple Fireworks Show

A fireworks show has multiple fireworks explosions, but so far, we’ve just finished one. However, the hard part’s over—the others are simple duplicates of one, maybe two “parent fireworks.”

There’s two ways to go about this.

First is making pre-compositions. Instead of an external Project file—an imported but separate After Effects document—a pre-comp embeds the additional composition internally. Basically, pre-comps are great, because they nest animations within a singular Project file. Create a Pre-comp by selecting all the shape layers from the Timeline panel > right-click > Pre-compose… Select all four Shape Layers in the Timeline panel, right-click, and hit Pre-compose.

However, because I recycle my animations between several clients and jobs, I like to use a second method: simply make a new composition for each firework parent. Then, the main firework show composition places the individual firework comps. This method adds external links, but I have stand-alone files I can grab without grabbing the whole Project.

In fact, you can even start by linking external Projects, and then pre-comp them. Simply go to File > Dependencies > Collect Files… and After Effects packages up your Project just like an InDesign job.

Ultimately, the visual output looks exactly the same! Try to animate simple fireworks for your next Fourth of July holiday social media post or a celebratory ecard.

Happy Fourth of July! From Lara Lee