Creative Communities of the World Forums

The peer to peer support community for media production professionals.

Activity Forums Adobe After Effects Expressions Controling time remaping with position data of the null

  • Controling time remaping with position data of the null

    Posted by Max Starovoyt on March 2, 2019 at 12:43 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.

    Some contents or functionalities here are not available due to your cookie preferences!

    This happens because the functionality/content marked as “Vimeo framework” uses cookies that you choosed to keep disabled. In order to view this content or use this functionality, please enable cookies: click here to open your cookie preferences.

    Alex Printz replied 7 years, 2 months ago 3 Members · 8 Replies
  • 8 Replies
  • Anders Hattne

    March 2, 2019 at 8:20 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

  • Anders Hattne

    March 2, 2019 at 9:08 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

  • Max Starovoyt

    March 2, 2019 at 9:32 pm

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

    But something is wrong. What have I done wrong?

  • Anders Hattne

    March 2, 2019 at 10:33 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

  • Alex Printz

    March 4, 2019 at 3:16 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

  • Max Starovoyt

    March 4, 2019 at 4:36 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?

  • Alex Printz

    March 4, 2019 at 6:41 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

  • Alex Printz

    March 4, 2019 at 6:44 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

We use anonymous cookies to give you the best experience we can.
Our Privacy policy | GDPR Policy