Here’s a quick tutorial to animate strokes of a shape layer in After Effects. The goal is to animate the stroke, duplicate it out, and alter the copy for a cool effect.

First, we’ll click the arrow through “Add Text,” and we’ll add a group to keep our project neat. Then, we add a shape. In this case, let’s use an ellipse. And then, we’ll add the Stroke. We can alter the stroke as necessary.

Now let’s add Trim Paths to our group. If we want to add some life to our stroke animation, we can alter the speed at which it appears, moves and disappears. Set a keyframe for the 0% End value of Trim Paths. Then go, later in your timeline and set a keyframe for 100%. You can ease these keyframes. Do the same with your Start Trim Paths value.

Now in graph editor, we can alter the speed for a cool effect. Pull one graph left and one right, so you have two different curves in your graph.  When we play this back, we see what the speed alteration has done. This is a fairly common animation style that you’ve probably seen before, and it gets even better when we add more strokes to it.

We can duplicate our Group, which is now Group 2. Now we can parent certain values within Group 2 to our original Group 1, and then alter them accordingly. So, if we want a larger circle stroke, we would parent the Size property to our original, and then append the change. So, we can add our x and y position adjustments within array brackets. And now we have a larger circle based on our inputs.

Likewise, if we want a different width on this stroke, we can parent the stroke width and append the necessary math to make it smaller or larger.

If you want this stroke to be slightly ahead or behind of the original stroke, then go to the Offset property under Trim Paths and pickwhip that to the original group property. Adjust accordingly by adding or subtracting a value. You can also adjust the Start and End Trim Paths value to make the stroke appear earlier or later than the original.

Watch the short tutorial video here: