Mobile app version of vmapp.org
Login or Join
Debbie163

: Copying one stroke from Illustrator gives two masks in After Effects I am new to After Affects CC but very experienced with Illustrator. I am trying to animate this logo to behave as if it

@Debbie163

Posted in: #AdobeAfterEffects #AdobeIllustrator #Animation

I am new to After Affects CC but very experienced with Illustrator. I am trying to animate this logo to behave as if it is being continuously drawn. So it basically draws itself over and over. A looping GIF.

I originally had a fill in illustrator but when I copy and pasted it into a new solid layer in After Effects it splits the fill into 5 masks and animates each new mask individually. So now the logo is 5 different shapes and not 1 continuous stroke. I am using Effect > Generate > Stroke. So then I drew the logo with one single stroke using the variable width tool to adjust the stroke width. Copied it into After Effects the same way and After Effects splits the single stroke into 2 paths? I have the same problem. Is there anyway to join the masks into 1? I don't understand why After Effects is splitting a single stroke into 2 separate masks? I have experimented with using Add, Subtract etc. on the masks in After Effects but that still makes no difference to it still being split into 2 separate masks. See pictures. Thanks for any help.

10.02% popularity Vote Up Vote Down


Login to follow query

More posts by @Debbie163

2 Comments

Sorted by latest first Latest Oldest Best

 

@Berryessa866

After Effects doesn't have variable width strokes so trying to import them from Illustrator will just expand the stroke. If you're trying to animate a variable width stroke then you'll need to animate a regular stroke and use the outlined variable width stroke as a mask.

Unfortunately with a single intersecting path then you'll end up with something like this:



There's not much of a way around that while keeping it as a single stroke (you could cleverly mask the overlaps, but that's not very practical). The easiest solution is to separate the paths so each overlap is its own distinct path (with its own mask too)...

I'll walk you through how I did this. The explanation looks long and complicated, but it actually only took me ~15 minutes once I knew what I was doing.

In Illustrator, you first need a path for the stroke animation, and an outlined stroke for the mask. The path for the stroke needs to have a basic appearance to import in to After Effects correctly; no brushes or width profiles. It can have a basic stroke but nothing else (and you can change the stroke once we're in After Effects anyway). The outlined stroke to use as the mask just needs to be an outlined version of your variable width path.

You should have something like this (viewed in outline mode):



Still in Illustrator, separate the paths so that no path intersects itself (in this case you need three paths). You need to do this with both the stroked path and the mask paths.

This looks a bit complex but it isn't really, you just cut both the path and mask in three and place everything in its own layer (After Effects needs everything in its own layer to import properly). The overlaps are just to prevent rendering artefacts where the paths meet.



Import the AI file in to After Effects.

Convert the first stroke path layer to a shape layer (Right click layer → Create Shapes from Vector Layer), that should give you a new shape layer with a single path — you can then delete the original AI layer.

Set the stroke width wide enough to completely fill the mask and add a Trim Paths from the "add" button on the "Contents" property of the layer.



Then all you need to do is animate the "start" and "end" of the trim paths.

Something like this:



Repeat for the other path segments and you should have something like this:



That doesn't loop properly, but you can just duplicate the needed keyframes and loop at the appropriate place:



All that's left to do then is mask each stroke. You could use a regular mask but it's easier to just use the layers you already have as track mattes (track mattes are basically opacity masks, rather than vector masks).

Just make sure each mask layer is directly above the relevant stroke segment in the timeline and choose "Alpha Matte" from the track matte dropdown on each stroke layer:



The result:

10% popularity Vote Up Vote Down


 

@Kevin459

In Illustrator when you create a variable stroke, it is no longer just a simple stroke to a path. Clearly when you are importing it into AfterEffects, it is expanding that variable width stroke into two paths. That might explain your problem. As to a solution, sorry I know next to nothing about AfterEffects, but couldn't you perhaps just use a simple stroked (non variable width) version of the logo for the mask you are creating in AfterEffects?

10% popularity Vote Up Vote Down


Back to top | Use Dark Theme