ADOBE AFTER EFFECTS: Forum Expressions Tutorials Creative Cloud

Controling time remaping with position data of the null

COW Forums : Adobe After Effects Expressions

<< PREVIOUS   •   FAQ   •   VIEW ALL   •   PRINT   •   NEXT >>
Max Starovoyt
Controling time remaping with position data of the null
on Mar 2, 2019 at 12:43:50 pm
Last Edited By Max Starovoyt on Mar 2, 2019 at 6:24:56 pm

Hello! my question - how to do same effect like in this video: https://vimeo.com/278682579
look after 20 sec. When null moves up and down, full animation is change. Or maybe this made by some script? Thank you very much for any answer.


Return to posts index

Anders Hattne
Re: Controling time remaping with position data of the null
on Mar 2, 2019 at 8:20:18 pm

That's beautiful!

I had a look at the comments and Glenn Stewart asked:
"I'm imagining each UI element animation is set to time remap that's then triggered by positional data from the null via expression link?"

I'd try something along those lines... and wow, I'm really tempted to do something like that!!

http://www.ardillamedia.com


Return to posts index

Anders Hattne
Re: Controling time remaping with position data of the null
on Mar 2, 2019 at 9:08:34 pm

That's beautiful!

I had a look at the comments and Glenn Stewart asked:
" I'm imagining each UI element animation is set to time remap that's then triggered by positional data from the null via expression link?"

I'd try something like that.... and wow, I'm really tempted to do something like that!!

...just realized you had seen that..
So Id do the in and out animation in the precomp and apply this to the timeremaping..

dist =thisComp.layer("Null").transform.position[2]- transform.position[2];

t = (dist);

ease(t, 00,550, 0, 200*thisComp.frameDuration)


http://www.ardillamedia.com


Return to posts index


Max Starovoyt
Re: Controling time remaping with position data of the null
on Mar 2, 2019 at 9:32:28 pm

I try to apply your expression to remaped layer. look at the screen

But something is wrong. What have I done wrong?


Return to posts index

Anders Hattne
Re: Controling time remaping with position data of the null
on Mar 2, 2019 at 10:33:18 pm

I wrote that whole thing very quickly.. But I spaced various instances of the same comp in Z.. and then moved the null back and forth in Z..

Your layers are 2d layers so transform.position[2] would not work since you only have two dimensions..

If the final frame on your precomp is frame 200 and you want to control it over X this would work

dist =thisComp.layer("Null").transform.position[0]- transform.position[0];
ease(t, 0, 500, 0, 200*thisComp.frameDuration);

http://www.ardillamedia.com


Return to posts index

Alex Printz
Re: Controling time remaping with position data of the null
on Mar 4, 2019 at 3:16:49 pm

I suggest making for each gui element your before_closed, open, and after_closed values as three keys for each property you want to animate, and sticking a piece of code onto them like this:



controller = thisComp.layer("NULL").position[1];
targetValue = e.g., 200;
range = e.g.,100;


if( controller < targetValue)
ease (controller, targetValue, targetValue-range, key(2).value, key(1).value);
else
ease (controller, targetValue, targetValue+range, key(2).value, key(3).value);


this tells your different expressions to reference your controller ("NULL"), look at it's Y-position and when it's at a targetValue to be 'open' (@ property key 2), and if it's within a range away from that target value, to animate into a closed state (key 1 and 3).

You'll have to figure out what you all want to do from there.

Alex Printz
Mograph Designer


Return to posts index


Max Starovoyt
Re: Controling time remaping with position data of the null
on Mar 4, 2019 at 4:36:43 pm

Guys, thank you for your attention and help. but I can't make an effect. look at the screen. What am I doing wrong?


Return to posts index

Alex Printz
Re: Controling time remaping with position data of the null
on Mar 4, 2019 at 6:41:10 pm

try to rename the code to your null's name (it is "NULL" right now; make it "Null" like the alyer name).

Then, make 3 keys; you can change it later. If you don't keys set, the code doesn't know what to grab and will throw an error.

Alex Printz
Mograph Designer


Return to posts index

Alex Printz
Re: Controling time remaping with position data of the null
on Mar 4, 2019 at 6:44:18 pm

...also you're going to need to change the variable input properties, my comments (e.g.,) need to be removed; I was using that for discussion purposes, rather than direct copy-paste.

That code I wrote is a rather quick idea on how to demonstrate animating in/out of different values. It's going to require a lot of tweaking to get stuff to act how you want.

Alex Printz
Mograph Designer


Return to posts index

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