Skip to main content

How to Animate Shape Borders in Adobe After Effects CC

After Effects

Animated shape borders are one of the most common motion graphics techniques you will see. A circle draws itself on, a rectangle outlines itself, or a custom path traces its way across the screen. It is used in logo reveals, infographics, UI animations, and lower thirds constantly. The technique is surprisingly simple in After Effects thanks to the Trim Paths modifier.

Today we are going over how to animate shape borders in Adobe After Effects CC.

How to Animate Shape Borders

Creating the Shape

  1. Go to Composition > New Composition to create a new composition to work in. Set your resolution and frame rate as needed.
  2. Use the Pen Tool or one of the Shape Tools (Rectangle, Ellipse, Polygon) to draw a shape on the canvas. Make sure you are creating a Shape Layer, not a mask on another layer. If you draw with nothing selected, it creates a shape layer by default.
  3. In the shape’s properties, remove the Fill (set it to None) and keep only the Stroke. Adjust the stroke width and color to your liking. This gives you just the border outline of the shape.

Adding Trim Paths

  1. In the timeline, expand the shape layer by clicking the arrow next to it. Expand Contents to see your shape listed inside.
  2. To the right of Contents, find the Add button (it says “Add:” with a small arrow). Click on it and select Trim Paths.
  3. Expand the shape’s properties until you find Trim Paths 1. Drop it down to reveal the controls.

Animating the Draw-On

  1. You will see three properties: Start, End, and Offset.
    • Start controls where the visible portion of the path begins (0% = the start of the path).
    • End controls where the visible portion ends (100% = the end of the path).
    • Offset rotates the starting point around the shape.
  2. For a simple draw-on animation, set End to 0% at the first frame. Click the stopwatch to create a keyframe.
  3. Move forward about 30-60 frames (1-2 seconds). Set End to 100%. The shape now animates from nothing to fully drawn.
  4. For a “draw on then draw off” animation, continue from step 9. Move forward another 30-60 frames. Set Start to 100%. Now the shape draws on, pauses briefly, and then draws off.

Smoothing the Animation

  1. Select all your keyframes. Press F9 on the keyboard to apply Easy Ease. This makes the animation accelerate and decelerate smoothly instead of moving at a constant speed.
  2. For more control, click the Graph Editor button at the top of the timeline (the small graph icon). Here you can drag the speed curves to fine-tune the timing. Pull the handles to make the animation start slowly, speed up in the middle, and slow down at the end.

Tips

  • Use Offset to change the starting point. By default, the animation starts where the path begins (usually the first point you drew). Adjusting the Offset value rotates where the draw-on begins, so you can start from the top, bottom, left, or right of the shape.
  • Works with any path. Trim Paths is not limited to basic shapes. Draw a complex path with the Pen Tool (like handwriting or a map route) and Trim Paths will animate along it.
  • Layer multiple shapes. Create several shape layers with different colors and stagger their Trim Paths animations for a cascading multi-line effect.
  • Add motion blur to the shape layer for faster animations. It adds a nice streak to the line as it draws on.
  • Export as a template. Once you have a border animation you like, save the project as a template. You can swap in different shapes and colors without rebuilding the animation from scratch.

That is how you animate shape borders in After Effects. Trim Paths is the key to all line-drawing animations, and once you understand Start, End, and Offset, you can create endless variations.