Creative Communities of the World Forums

The peer to peer support community for media production professionals.

Activity Forums Adobe After Effects Expressions Path progress on specific point

  • Path progress on specific point

    Posted by Jakob Wagner on May 29, 2018 at 11:35 am

    Hi all

    With this expression I can set anothers layers position to be exactly half way on a path.

    var pathLayer = thisComp.layer(“Shape Layer 1”);
    var progress = 0.5;
    var pathToTrace = pathLayer(“ADBE Root Vectors Group”)(1)(“ADBE Vectors Group”)(1)(“ADBE Vector Shape”);
    pathLayer.toComp(pathToTrace.pointOnPath(progress));

    My question is; is there a way to get the progress for specific Point (anchor/vertex) on the path. Say the path is made out of five points, can I somehow get the exact progress for the second point? Pretty sure this isn’t posible with the default expressions, but I thought some one in here might had found a clever way to do it.

    Did that make sense? If not please ask.

    Thanks,
    Jakob

    Jakob Wagner replied 7 years, 11 months ago 4 Members · 4 Replies
  • 4 Replies
  • Dan Ebberts

    May 29, 2018 at 1:21 pm

    I don’t know of an easy solution for this. I think you’d have to use some kind of iterative solution. I don’t have the code for one, but I’d love to see it.

    Dan

  • Alex Printz

    May 29, 2018 at 1:43 pm

    Try this:

    var pathLayer = thisComp.layer(“Shape Layer 1”);
    pathLayer.points(time)[1]

    you might need to do a comp/world conversion conversion.

    -Alex

  • Kalleheikki Kannisto

    May 31, 2018 at 5:08 pm

    I wonder if it is possible to copy just one segment of a path to another path, say the path between points two and three, wherein it would be progress 0-1 between those point of the original path. Not sure if it is possible or even applicable for your needs, but it’s a thought.

    If it works, you would have the secondary path take on the first, then second, then third then fourth segment of the original path and progress 0-1 through each. Although traveling speed would change depending on segment length, so that wouldn’t be much good if you need even progress…

    Kalleheikki Kannisto
    Senior Graphic Designer

  • Jakob Wagner

    June 1, 2018 at 3:48 pm

    I like the way you think creative about it. It’s a good Idea, which could work in some cases. Unfortunatly not in mine. But thanks!

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