Skip to main content
stephenm1647549
Participant
October 30, 2024
Question

Frustrating issue with trim paths

  • October 30, 2024
  • 2 replies
  • 1448 views

I'm trying to apply the trim paths effect to quite a complex illustrator comp made up of multiple layers/objects.

When I first gave it a go I experienced the issue many other people have faced of it trimming/revealing the fill of a layer. So, I went back to the illustrator comp and changed EVERY layer so it had no fill and just a stroke (this was a long process), only to discover that this did not resolve the issue once I took it back into AE and tried again.

 

Can anyone help as I'm invested in this now and don't want to give up!

This topic has been closed for replies.

2 replies

Community Expert
November 2, 2024

I looked at your original file. As I expected, there were Groups on every layer I checked. I suspect that there were Groups on every layer. I also checked the graphics using the View/Outlines menu and saw that every shape was a closed and filled path. All of the Groups fouled up the XD - After Effects workflow, and converting the vector paths to shape layers will not fix the problem either.

 

The simplest workflow is to select all layers, lock them all, turn them all off, and then turn on layer 1. Add a new Track Matte layer above Layer 1 and give it a name. Then, decide how you want to reveal that layer and use the pen tool to draw a path with a wide enough stroke to hide the original path. When I started, I was ungrouping the layers, but then I realized that nothing was being gained. 

 

Here's an animated gif of the workflow required to create track mattes for the first dozen layers. Unless you want to group several layers and reveal them all with one track matte, you only have about a hundred to go. I compressed about 30 or 40 minutes of work into about 40 seconds.

When you have made all of the track mattes, open the AI file as a composition, retaining layer sizes, and then convert only the Track Matte layers to shape layers. 

 

It would probably take about the same time to create the shape layer track mattes in After Effects, but I think I'm a little faster at creating complex paths in Illustrator than in After Effects. Unfortunately, unless the artwork is remade with animating using After Effects in mind, the project will take a lot of time to set up.

 

Community Expert
October 30, 2024

First, Trim Paths only works with Shape Layers. Second, anything but a simple stroke in Illustrator will convert to a filled closed path, so you cannot use brushes or taper the paths in Illustrator.

 

It looks like you have converted all the vector layers to shape layers, but I cannot tell how cleanly the conversion worked. Select the layers, press "uu" to reveal all modified properties, and start digging into the shape of the layer structure.

 

Another option for working with complex Illustrator files would be to install Adobe XD. You can use XD to create a new file, then go to the File/Import menu and import your Illustrator file. Then, without doing anything else, create an After Effects project file using the File/Export/After Effects menu. Open the file, and the comp will be filled with much simpler and cleaner shape layers instead of embedded Illustrator layers. I use this workflow all the time.

 

 

stephenm1647549
Participant
October 31, 2024

Hi @Rick Gerard , thank you for your response. 

 

When you say "anything but a simple stroke", does that mean any closed paths i.e shapes will not work even if it has just a stroke and no fill? I actually did a test with a simple rectangle shape (stroke, no fill) imported from illustrator and the same issue occurred - see below: 

 

 

I was surprised that this didn't work as this is a very simple shape/stroke, so is there something fundamentally wrong that I'm doing with the process behind trim paths or importing?

 

Also, the Adobe XD route sounds like a useful one that I'd like to give a try, however when I hover over export there is no After Effects option - is this what you meant?

 

stephenm1647549
Participant
November 1, 2024

Your comp screenshot has a blue fill. Check the AI file. 

After you import your Illustrator file to XD, don't do anything but go directly to the File/Export menu, and After Effects should be available. Here's the workflow.

Unless there is something funky in the Illustrator file, you should have access to every object as a separate shape layer. The After Effects Project file may contain nested comps, and it will have more layers than the original Illustrator file. 

 

If you can share the Illustrator file, I'll take a look. You could even DM me if you want.

 


Hi @Rick Gerard, yes for that test comp with the rectangle After Effects is saying it has a blue fill but I can assure you that in the original illustrator file it has no fill and only a blue stroke.

 

But for some reason, as far as After Effects is concerned, the shape has a fill and no stroke because when I try and change the stroke colour/px nothing happens - see below

 

 But After Effects clearly does recognise there being a stroke to a certain degree as when I select both Path 1 and Path 2 it highlights the stroke as per the illustrator file - see below

 

The only thing I can change is the fill which applies to both the stroke, as well as the "fill" which After Effects has essentially created itself

 

So there's clearly something lost in translation between Ai and Ae. Obviously this comp is just for testing purposes, it's the other one I actually want to make progress with - I just thought it would be interesting to see what happens with a simple shape layer.

 

As far as the Adobe XD workflow goes, I managed to export to AE (I just needed to double click on the artboard/document!), however it's done some weird things with the appearance of objects themselves, as well as the separation of paths/layers in the timeline, which I know you mentioned. See below.

 

 

So if possible I'd like to do any necessary tweaks to the original illustrator comp/any further steps in After Effects that I may have missed. Try and fix that way, so if I can take you up on your offer to look at the illustrator file that would be really helpful!