Creative Communities of the World Forums

The peer to peer support community for media production professionals.

Activity Forums Adobe After Effects Linking a trim path’s animation to a motion path?

  • Linking a trim path’s animation to a motion path?

    Posted by Eric Guiliani on April 12, 2015 at 7:15 pm

    Hey Guys,

    I’m wondering if there is a way to mirror a shape layer’s trim path animation to a separate layers motion path. The motion path is the same stroke/path as the shape layer. I’m animating a curved line with an arrow head at the end of it. The line has the animated trim path on it, and the arrow is supposed to follow using the line’s motion path. However once you animate with easing and time the trim path, the arrow doesn’t match up. I’ve attached a JPG which hopefully should make things clearer. Any help greatly appreciated!

    Walter Soyka replied 11 years, 3 months ago 2 Members · 4 Replies
  • 4 Replies
  • Walter Soyka

    April 13, 2015 at 2:26 pm

    Position the first position keyframe at time 0, and position the last position keyframe at time 10 seconds.

    Precomp the arrow layer, moving its position attribute inside the precomp.

    Add time-remapping to the arrow precomp layer, alt+click the time remapping stopwatch, and paste the following expression:

    if (numKeys > 1) {
    linear(thisComp.layer("Shape Layer 1").content("Trim Paths 1").end,0,100,0,10);
    } else value

    This uses the trim paths end property to drive progress over the path.

    Walter Soyka
    Designer & Mad Scientist at Keen Live [link]
    Motion Graphics, Widescreen Events, Presentation Design, and Consulting
    @keenlive   |   RenderBreak [blog]   |   Profile [LinkedIn]

  • Eric Guiliani

    April 13, 2015 at 2:30 pm

    Thanks Walter, I’ll give it a try tonight!

  • Eric Guiliani

    April 14, 2015 at 2:15 am

    This worked! Thanks so much. Out of curiosity, why does the keyframes have to go from 0-10seconds?

  • Walter Soyka

    April 14, 2015 at 2:18 am

    [Eric Guiliani] “This worked! Thanks so much.”

    Awesome. You’re welcome.

    [Eric Guiliani] “Out of curiosity, why does the keyframes have to go from 0-10seconds?”

    It doesn’t have to go from 0-10 per se, but our expression requires it for simplicity, to match to the beginning and end of the trim paths animation.

    linear(thisComp.layer("Shape Layer 1").content("Trim Paths 1").end,0,100,0,10);

    says, “For our time remapping, as the value of the Trim Paths End goes from 0% to 100%, let’s make time-remapping go from 0 to 10.”

    Make sense?

    Walter Soyka
    Designer & Mad Scientist at Keen Live [link]
    Motion Graphics, Widescreen Events, Presentation Design, and Consulting
    @keenlive   |   RenderBreak [blog]   |   Profile [LinkedIn]

We use anonymous cookies to give you the best experience we can.
Our Privacy policy | GDPR Policy