3 Replies Latest reply on Mar 8, 2017 8:32 PM by Kyle Hamrick

    Trim paths using a gradient

    RunForestRun

      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

        • 1. Re: Trim paths using a gradient
          Dave LaRonde Level 6

          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.

          • 2. Re: Trim paths using a gradient
            Gutter-Fish Level 4

            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.

            1 person found this helpful
            • 3. Re: Trim paths using a gradient
              Kyle Hamrick Adobe Community Professional

              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.

              2 people found this helpful