Adobe After Effects Forum
Getting position values along a shape/mask path
Getting position values along a shape/mask path
by Will Poillion on Aug 9, 2019 at 12:42:40 am

Hi guys, I was hoping to get some help with something. I feel like it's easier than I'm making it.

I'm trying to create a rig of sorts. I have a simple shape, divided into multiple paths (or masks in this case). What I want is to create a simple 0-100 slider that controls a position value. This position value starts at one end of the path and ends at the other. Simple enough right?

I can offset trim path and move a segment (or a point) along the path, but that doesn't give me the actual position values. And even if I could I really just want a single point along the path, not a segment.

What I'm trying to do is add a particle emitter (stardust) to a point along the path and animate that point along it. I can set the entire path as the emitter as seen on the right, and I can use the trim path functionality to get it down to nearly a point as seen on the left and animate the offset. But it just loops the path over and over which doesn't give me the control I want. More importantly without the position value for where it is on the path I can't attach other things to it. And since stardust only samples the path at a set frame I can't animate the path and have the emitter follow it.

I need some sort of expression rig with two controls, one keyframeable 0-100 slider and one position slider that I can link to from my emitter (or anything else).

Thanks guys! Seems like it should be easier than I'm making it but I'm just not seeing it.

Re: Getting position values along a shape/mask path
by Walter Soyka on Aug 9, 2019 at 2:01:25 am

You can use the new pointOnPath() property to get the position values you're looking for.

Here's an example:

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