ADOBE AFTER EFFECTS: Forum Expressions Tutorials Creative Cloud

Controling x,y,z position with marks

COW Forums : Adobe After Effects Expressions

<< PREVIOUS   •   FAQ   •   VIEW ALL   •   PRINT   •   NEXT >>
Marcelo Cabral
Controling x,y,z position with marks
on May 7, 2018 at 1:39:03 am

Hi. I need an expression to make the following movement.
I have in the scene a 3D null object named "control". Also, I have an adjustment layer with 4 marks named, "x1", "x2", "x3" and "x4". What I need is an expression to control the null movement this way:
When the indicator pass over the mark "x1" the null will move from xyz position 1 to xyz position 2. The time duration of this movement will be the distance between mark "x1" and "x2" in the timeline.
Then the null will keep the position 2 until the indicator pass over the mark "x3" which will make it move from the position 2 to the position 1 again. The duration of this movement has to be controlled by the distance between "x3" and "x4" marks. All the movements have to be smooth like easy in and easy out.

Thank you in advance for your help!!

Marcelo


Return to posts index

Dan Ebberts
Re: Controling x,y,z position with marks
on May 7, 2018 at 4:58:04 am

Like this maybe:


p1 = [0,0,0];
p2 = [200,200,200];
m = thisComp.layer("Adjustment Layer").marker;
if (time < m.key(2).time)
ease(time,m.key(1).time,m.key(2).time,p1,p2)
else
ease(time,m.key(3).time,m.key(4).time,p2,p1);



Dan



Return to posts index

Marcelo Cabral
Re: Controling x,y,z position with marks
on May 7, 2018 at 11:05:50 am

Hi Dan, Thank you for your help. It works perfectly. Is there some way to make the easy movement even smoother? thank you.


Return to posts index

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