🌏 中文

Creating a Circular Progress Bar in AE

[Update: Simpler methods exist (see the end of the post). However, the techniques here are still valuable practice.]

I’ve been using After Effects for about a year. It’s fun, useful, and easy to learn, especially with prior Flash experience. Complex UI animations are combinations of basic movements, rotations, scaling, opacity, and color changes. Online resources abound; I learned from this video series.

This circular progress bar requires a bit more thought.

The final animated circular progress bar created in After Effects

The Idea

Circular progress bars are unique. They rotate while selectively revealing parts of the circle, which isn’t immediately straightforward.

I drew inspiration from a CSS3 circular progress bar I created earlier. The core concept involves splitting the circle in half. The dark green (progress) is the background and remains static. Two light green semicircles cover it, rotating sequentially to reveal the progress.

To create a ring, add a smaller circle on top. AE layer masks achieve a similar effect (explained later).

AE can create a truly transparent circular progress bar, but the core principle remains: rotating two semicircles independently. See the diagram below:

Demonstration gif of the rotation principle using red, blue, and purple semicircles

Divide the circle into left (red) and right (blue) semicircles, restricting their visibility to their respective halves. Add a static right semicircle (purple) underneath. Let’s break it down step by step.

Left, Right, and Background Semicircles

First, prepare the three semicircles.

Three static semicircle layers prepared in the After Effects timeline

Create a 720p composition.

Composition Settings panel in AE set to 1280x720 resolution

Draw a 400x400 circle.

Setting the ellipse path size to 400x400 in AE shape layer

Set the circle’s position (not the shape layer’s) to 0, 0 for perfect centering.

Centering the ellipse path by setting its position to 0,0 in AE

In the same shape layer, draw a 200x400 rectangle (half the circle’s size).

Creating a 200x400 rectangle path in the same shape layer

Set the rectangle’s position to -100, 0 to cover the circle’s left half. This rectangle will cut out the semicircle.

Positioning the rectangle at -100,0 to cover the left half of the circle

Click “Add” and choose “Merge Paths”.

Selecting Merge Paths option from the Add menu in AE shape layer

Set the mode to “Intersect” (like path operations in PS/AI).

Setting the Merge Paths mode to Intersect in After Effects

Group (Command/Ctrl + G) the circle, rectangle, and Merge Paths. This is our semicircle.

Grouping the ellipse, rectangle, and Merge Paths inside Group 1

Expand the group, copy the inner rectangle, and paste it outside the group.

This new rectangle acts as a vector mask. AE’s built-in masks rotate with the layer, which we don’t want. We need a stationary mask and a rotating semicircle. So, we use “Merge Paths” again.

Adding a second rectangle and Merge Paths outside Group 1 for masking

Add -> Merge Paths, setting the mode to “Intersect”. This creates the intersection of the new rectangle and the group.

Rotating Group 1 in AE, with parts outside the mask hidden

Rotating the group now shows that the area outside the rectangle is hidden.

Adding a keyframe to the rotation property of Group 1

Reset the rotation and add a keyframe to the group’s rotation (for later use). Press “u” to quickly access keyframed properties.

Renaming the shape layer to Left Semicircle in the timeline

Name this layer “Left Semicircle”.

Setting the outer mask rectangle position of Right Semicircle layer to 100,0

Duplicate the layer (Command/Ctrl + D) for the right semicircle. Set the outer rectangle’s position to 100, 0 (covering the right half). Nothing appears because the semicircle is still on the left.

To clarify: the inner circle and rectangle form the rotating semicircle. The outer rectangle is the mask. The left semicircle’s mask covers the left; the right semicircle’s mask covers the right. Together, they form a full circle.

Left, Right, and Background Semicircle layers ordered in the AE timeline

Duplicate the right semicircle, rename it “Background Semicircle,” and move it to the bottom. Set the inner rectangle’s position to 100, 0. The circle becomes whole again.

The static assets are now ready.

Creating the Rotation Animation

Let’s animate the semicircles.

AE timeline showing only rotation properties with keyframes

Press “u” to show only the rotation property with the keyframe. This is the group’s rotation, not the layer’s.

Remove keyframes from the right and background semicircles’ rotation. Keep the right semicircle’s rotation property visible.

Enabling the Solo switch for Left Semicircle layer in AE

Click the dot on the left semicircle layer to solo it (like Alt + clicking the layer eye in PS).

Creating a 360-degree rotation animation keyframe for Left Semicircle

Create a simple animation: one full rotation.

Activating expression input on Right Semicircle’s rotation by Alt-clicking

Important: Alt + click the right semicircle’s rotation property. An expression appears in the timeline.

Linking Right Semicircle’s rotation to Left Semicircle using Pick Whip

Drag the right semicircle’s rotation property’s pick whip (spiral icon) to the left semicircle’s rotation property. The expression updates.

Alt + clicking activated the expression. Dragging the pick whip links the right semicircle’s rotation to the left’s. Now, the right semicircle always follows the left.

Disabling Solo switch on Left Semicircle layer to restore view

Turn off solo display for the left semicircle.

Red, blue, and purple colored semicircles visible in the AE canvas

For clarity, fill the semicircles with different colors (for demonstration only).

Use red for the left, blue for the right, and purple for the background semicircle, matching the “Idea” section’s diagram.

Finding the Critical Frame

Play the animation. It’s incorrect: the left semicircle is visible initially. It should appear only after the right semicircle rotates halfway. The same applies to the background semicircle.

We need a specific frame where the left and background semicircles are hidden.

Locating the playback head at the critical 180-degree rotation frame

This critical frame is when the right semicircle reaches 180 degrees (or slightly more).

Trimming the in-points of Left and Background Semicircles to the critical frame

Select the left and background semicircles and trim their timelines’ left ends to this frame. They won’t appear too early now.

Clicking the Graph Editor button to adjust motion curves in AE

Playback is now correct!

The constant-speed rotation is unnatural. Open the Graph Editor (graph icon). Select the left semicircle’s rotation to see a straight line.

Converting linear keyframes to Bezier curves in Graph Editor

Select the line and click the two-handled icon. The line curves, and handles appear.

The Graph Editor is simple: the horizontal axis is time; the vertical is value change. A flat curve means slow change; a steep curve means fast change.

Adjusting the Bezier handle to create an ease-out speed curve

For a fast-start, slow-end animation, adjust the curve like this:

Re-aligning layer in-points based on the newly adjusted ease curve

Find the critical frame again (right semicircle at 180 degrees or slightly beyond).

Adding a Mask

The circular progress bar is done; let’s make it a ring.

Right-clicking the selected layers to choose Pre-compose in AE

Select all layers and Pre-compose (right-click).

Confirming settings in the Pre-compose options dialog in AE

The three layers merge (like a Smart Object in PS or Movie Clip in Flash).

Create a mask (Command/Ctrl + Shift + N) - AE’s built-in layer mask.

Adding a full-size rectangular mask to the new pre-composition layer

The mask is a rectangle. Expand the mask menu and click “Mask Path”.

Opening the Mask Shape settings dialog to redefine the mask bounds

Set the four values (top, left, bottom, right) as shown, and check the box to make it a circle.

Setting the mask coordinates and checking Reset to Ellipse option

These numbers ensure the circular mask matches the progress bar’s size and position.

Checking the Inverted option on the mask to hide the inner circle

Check “Inverted”. The circle disappears because the mask now shows the area outside it.

Scaling down the inverted circular mask from center to form the ring

Select the mask and press Command/Ctrl + T.

Hold Command/Ctrl + Shift to scale from the center, making it slightly smaller. The ring appears.

The final animated circular progress bar created in After Effects

Done! That’s the progress bar I wanted.

Conclusion

This tutorial is lengthy, focusing on the concepts. The actual process is simple and takes about 5 minutes with practice.

For the lazy, here’s the source file: Here’s the source file

I’m a beginner, so this might not be the best method, just a method. Path animations might offer a simpler solution.

Share if you have a better method!

[Update: I received immediate feedback. “Radial Wipe” and “Trim Paths” are easier. “Radial Wipe” is a one-step solution. See the “Growing Circle” section in this article.]