Skip to main content
Known Participant
March 8, 2017
Answered

Trim paths using a gradient

  • March 8, 2017
  • 5 replies
  • 7475 views

Is it possible to animate with Trim Paths using a line with a gradient? This doesn't seem as simple as picking a gradient from the colour of the stroke.

Many thanks

This topic has been closed for replies.
Correct answer Dave_LaRonde

Well, that's because it isn't as simple as you think. 

If Trim Paths doesn't what you want, you're stuck creating a layer with only what you want to trim -- my guess is it'll be a stroke.  Then you animate a track matte to get that gradual fade up of the stroke.

5 replies

krystofjezek
Participant
October 4, 2023
Participant
May 21, 2018

If you are looking for a quick fade out solution that doesn't need to be too fussy you could try using the 'Echo' effect whilst animating the trim paths end point. Give the echo some Decay and add some echoes and see if that helps.

I know its an old post, but found this was my quick solution.

Phil

Kyle Hamrick
Community Expert
Community Expert
March 9, 2017

If your question is actually, "Can I reveal a stroked line using Trim Path and have the trim be a gradual fade instead of a hard edge?" - then the answer is, no, not really. Not directly with a Shape Layer, at least. The solutions above will work, but will be a pain and tough to edit.

BUT!

Make a text layer with a bunch of periods.
On that text layer, draw the path you want your line to follow and set the text to follow it. (Text > Path > dropdown menu)
Compress the tracking until it looks like a solid line. Add more periods as needed.
Add a text animator for opacity, set it to 0.
Set the Shape (Animator 1 > Range Selector 1 > Advanced > Shape > dropdown menu) to Ramp Up or Ramp Down.
Mess with Start/End/Offset to get your desired look, and you can make your line move along the path by using the First Margin/Last Margin controls under Path.

P.M.B
Legend
March 8, 2017

I cant try it right now but what i might try is using a track matte like Dave said.   I'd create a square with a black to white gradient.  Copy the path information to the position property of the square, alt drag the keyframes to match the timespan of the trim path & turn on auto orient.  Move the square above the trimp'ed path in the layer stack and set the path layers trkMat mode to luma.  Then you may have animate the squares path to keep the stroke in view.

~Gutterfish
Dave_LaRonde
Dave_LaRondeCorrect answer
Inspiring
March 8, 2017

Well, that's because it isn't as simple as you think. 

If Trim Paths doesn't what you want, you're stuck creating a layer with only what you want to trim -- my guess is it'll be a stroke.  Then you animate a track matte to get that gradual fade up of the stroke.