ADOBE AFTER EFFECTS: Forum Expressions Tutorials Creative Cloud

Following a path without changing position?

COW Forums : Adobe After Effects

<< PREVIOUS   •   FAQ   •   VIEW ALL   •   PRINT   •   NEXT >>
Valentin Val
Following a path without changing position?
on Nov 22, 2019 at 2:22:14 pm

Hi dudes,

A lot of thanks for the AE experts who will answering to me.

It's a problem that I never read a solution on anywhere.

So let me explain, I have a lot of objects going out an optical fiber.
All this object have a mandatory starting and ending position.
Instead of animate all theses objects one by one, I wish set them to follow a predefined curved path without changing starting and ending postion, they just need to follow the curve.

How i can do this?

Thanks again.
Val


Return to posts index

Cassius Marques
Re: Following a path without changing position?
on Nov 22, 2019 at 5:47:40 pm

There is no "align to spline" or similar effect in After Effects. One which you could have the layer have its own position while following a spline field. (like those available forces and effectors in 3d apps)

So you'll have to either animate the layer's position, or link it to a layer that follows the spline, but since you're always attributing that motion to the position property, you'll have to chose one or the other.

Cassius Marques
http://www.zapfilmes.com


Return to posts index

Dan Ebberts
Re: Following a path without changing position?
on Nov 22, 2019 at 6:32:09 pm

If you have a shape layer with a path, and you want another layer to follow that path, controlled by a slider on the follower layer, you could do something like this:

s = effect("Slider Control")("Slider").value;
L = thisComp.layer("Shape Layer 1");
path = L.content("Shape 1").content("Path 1").path;
L.toComp(path.pointOnPath(s/100))


Dan



Return to posts index


Cassius Marques
Re: Following a path without changing position?
on Nov 22, 2019 at 8:09:59 pm

That would absolutely change the start and end position of that layer, would it not?

He expressed the need to keep initial and final position.

Cassius Marques
http://www.zapfilmes.com


Return to posts index

Dan Ebberts
Re: Following a path without changing position?
on Nov 22, 2019 at 9:05:09 pm

Ah yes, I missed that. That makes it trickier. If it's really just the start position that needs to be maintained, that's an easy fix, like this:

s = effect("Slider Control")("Slider").value;
L = thisComp.layer("Shape Layer 1");
path = L.content("Shape 1").content("Path 1").path;
value + path.pointOnPath(s/100) - path.pointOnPath(0)

But if it's really both the start and end positions, it depends on how those are defined (first and second keyframes?) and if the timing needs to be maintained. Still do-able, I think, but with more math involved.

Dan



Return to posts index

Valentin Val
Re: Following a path without changing position?
on Nov 23, 2019 at 8:56:14 pm

A lot of thanks to all of you !
I knew I will have help here :D


Return to posts index

<< PREVIOUS   •   VIEW ALL   •   PRINT   •   NEXT >>
© 2019 CreativeCOW.net All Rights Reserved
[TOP]