Creative Communities of the World Forums

The peer to peer support community for media production professionals.

Activity Forums Adobe After Effects Expressions Extracting X values from a path.

  • Extracting X values from a path.

    Posted by Josh Kurz on June 28, 2010 at 7:26 pm

    Hi,

    I know you can copy the path from a shape layer into the position value of another layer and you’ll get keyframes with a two field array values (x and y position). Is there a way to extract this information from the path itself without copy/pasting? Meaning, can I write an expression that will feed the x value of a path, for example, directly into another layer’s x position field?

    Basically, I am creating a graph that shows changing value (a simple line graph similar to a sine wave) and I’m moving this graph from left to right. I’d like another layer to keep a constant x value but have the y value follow the contours of the graph as it moves. I’m trying to avoid copy/pasting the values because I’d like to be able to change the path and still have the second layer follow the new contour.

    Is this possible?
    Thanks in advance for the help!

    -Josh

    Josh Kurz replied 16 years, 2 months ago 3 Members · 3 Replies
  • 3 Replies
  • Dan Ebberts

    June 28, 2010 at 9:01 pm

    I can’t think of a way to do that.

    Dan

  • Kevin Camp

    June 29, 2010 at 2:07 pm

    you could do the opposite…

    have the moving layer draw the path. then you’d be updating the y position keyframes of the layer and the path would then update.

    there are a couple ways to get the path to draw on. if you have particular, you could link the emitter to the keyframed layer and use wind to generate the x movement of the particles.

    or you could use the write-on effect using expressions to link the y position of the ‘brush’ to the keyframed layer and the x position to the x position of the write-on layer (you’ll want it to move left as the line writes on). the x-pos expression will need to account for layer and comp width, so it will take a little tweaking… also the layer will be moving left but the line will write on to the right, so it will need to account for that too.

    Kevin Camp
    Senior Designer
    KCPQ, KMYQ & KRCW

  • Josh Kurz

    June 29, 2010 at 4:22 pm

    Thanks for your help!
    I’ll try the write-on idea.

    -Josh

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