Creating animations using vector graphics in After Effects is a common practice for many designers. When working with motion graphics, it’s essential to consider that shapes, paths, and objects in Illustrator behave differently compared to After Effects.
One particularly frustrating aspect is the behavior of the Trim Paths animator. The way Trim Paths functions depends on the type of object it’s applied to. If used on a shape layer, the resulting animation is quite different from when it’s applied to a path.
To help you navigate this challenge, here’s a step-by-step guide:
2. Copy and Paste in Front of Your Existing Artwork
To maintain an exact match of the artwork, use the copy-paste command (Cmd+C/Ctrl+C and Cmd+F/Ctrl+F) to duplicate your artwork on a new layer. In this example, I changed the color of the duplicated shape to differentiate it from the original. You should have three layers: the original artwork, the duplicated copy, and the pasted in front copy.
3. Remove the Outer Path of the Duplicated Shape
Using the direct selection tool, select the anchor points of the outermost part of the duplicated shape. Press delete twice to remove the outer path. If necessary, manually delete each anchor point until you achieve the desired result.
You should be left with something similar to Figure 3.2.
4. Create a Stroke from the Duplicated Shape
With the modified shape selected, switch to the Fill & Stroke options in Illustrator. Look for the option on the left side of the window to switch between Unfilled Stroke and Fill. Increase the stroke width until it matches the width of the original artwork. For example, if the original width was 120, divide this number by 2.
Fun fact: You can perform simple math calculations in the Stroke Parameters Window.
5. Expand the Resulting Stroke
From the Object menu, select Expand to expand the Fill and Stroke properties of the divided stroke. Delete the innermost part of the circle, creating a path that passes through the middle of the initial shape (the purple circle).
6. Create a Stroke from Your Path
Using the Swap Fill and Stroke button, convert your resulting path into a stroke. Take the number you obtained by dividing the stroke width by two (e.g., if the initial stroke width was 120, the result would be 60).
7. Animate Away!
Congratulations! You have successfully created a stroke with the same width as the original shape. Now, make sure to match its color with the original shape, and your artwork should look identical to how it was before. The advantage here is that you can now utilize the Trim Paths animator without any issues!