ADOBE AFTER EFFECTS: Forum Expressions Tutorials Creative Cloud

Y position controled by marks

COW Forums : Adobe After Effects Expressions

<< PREVIOUS   •   FAQ   •   VIEW ALL   •   PRINT   •   NEXT >>
Marcelo Cabral
Y position controled by marks
on Sep 24, 2017 at 6:05:34 pm
Last Edited By Marcelo Cabral on Sep 24, 2017 at 6:07:03 pm

Hi. I need to make final credits animation project, but they have to be showed step by step. What basically I need is an expression which read several marks ( a variable quantity of marks) in a layer named "control" and moves a 3D null in the "y" position (100 pixels up) every time the indicator pass over a mark of this layer. The movement has to be an easy movement. In other words, the expression has to move the null 100 pixels up ("y" position) with the first layer mark and when it passes over the second mark has to move the null another 100 pixels more in the same direction and the same with the rest of the marks, always with an easy movement. Thank you for your help in advance.


Return to posts index

Dan Ebberts
Re: Y position controled by marks
on Sep 24, 2017 at 6:39:55 pm

Something like this maybe:


m = thisComp.layer("control").marker;
moveDur = .25;
y = 0;
if (m.numKeys > 0){
n = m.nearestKey(time).index;
if (time < m.key(n).time) n--;
if (n > 0){
t = time - m.key(n).time;
y = ease(t,0,moveDur,(n-1)*100,n*100);
}
}
value - [0,y];



Dan



Return to posts index

Marcelo Cabral
Re: Y position controled by marks
on Sep 24, 2017 at 7:42:33 pm

Hi, Dan. Amazing response as always.
It works awesome!! is there some way to make the movements even smoother? I really appreciate your help. Big thanks!


Return to posts index


Marcelo Cabral
Re: Y position controled by marks
on Sep 24, 2017 at 7:46:12 pm

If it is possible, a little easy in and easy out or bounce effect between movements will be great. Thank you again.


Return to posts index

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