Creative Communities of the World Forums

The peer to peer support community for media production professionals.

Activity Forums Adobe After Effects Expressions Combination of keyframes and expressions

  • Combination of keyframes and expressions

    Posted by Emmanuel Gobert on February 19, 2008 at 6:26 pm

    hi everyone.
    I’d like to rotate several solids around Y axis.
    I want to do a serie of ratation, with a pause between each series. For this of course, I use keyframes.
    But eveytime the solids stop their rotation, I want them to have a sinusoidal decay around Y axis (like a vibration)… so then I need to use an expression, but only at specific keyframes…
    Is it possible, and how ?

    EDIT : here the result i want : https://fr.youtube.com/watch?v=nxmMfL9gcx8
    (i use only keyframes for this example)

    thanks in advance.

    Emmanuel Gobert replied 18 years, 2 months ago 2 Members · 3 Replies
  • 3 Replies
  • Reynolds Strother

    February 19, 2008 at 10:20 pm

    I think this thread can help you out.

    https://aenhancers.com/viewtopic.php?p=1733#1733

    If you employee this method I think you’ll only need to apply the expression to one layer parented to a null creating the Y rotation. Then parent all your other layers to the layer with the expression, they should follow the vibration.

  • Emmanuel Gobert

    February 20, 2008 at 12:28 pm

    Thank you for answering, I will try this later

  • Emmanuel Gobert

    March 1, 2008 at 1:32 am

    Hi everyone,
    I’ve found this great expression which is solving my problem :

    n = 0;
    if (numKeys > 0){
    n = nearestKey(time).index;
    if (key(n).time > time){
    n–;
    }
    }
    if (n == 0){
    t = 0;
    }else{
    t = time – key(n).time;
    }

    if (n > 0){
    v = velocityAtTime(key(n).time – thisComp.frameDuration/10);
    amp = 0.05;
    freq = 3.0;
    decay = 6;
    value + v*amp*Math.sin(freq*t*2*Math.PI)/Math.exp(decay*t);
    }else{
    value;
    }

    I copy this in the rotation parameter, and on each keyframes that end a movement, it adds a little bounce effect.
    found on gray machine.

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