Forum Replies Created

Page 6 of 6
  • Peter Zeet

    October 4, 2011 at 9:30 pm in reply to: “Inertial Bounce” expression in text layer

    Hi Dan, just as a quick explanation, Im using on the project the expression below:
    :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 = .05;
    freq = 4.0;
    decay = 2.0;
    value + v*amp*Math.sin(freq*t*2*Math.PI)/Math.exp(decay*t);
    }else{
    value;
    }

    mainly on the scale and rotation properties of the controller (this, plus a delay, makes all layers grow and swing a bit on a nice way).
    The null has 3 sliders, so I can animate the freq., amp. and decay.
    I have to add several words on the comp, which each letter animated with same feel (i.e, its growing seqientially a rectangle, another rectangle, a circle on top, the word flower so first “f”, then “l”, ecc, then a rectangle, ecc)
    So, I played a bit with Filip´s expression:
    swings=3;
    timeOffset=0.25;

    v=valueAtTime(time-timeOffset*textIndex/textTotal)[0];

    anim=2*Math.PI*v/100;
    amp=easeOut(v,0,100,100,0);

    Math.cos(anim*swings)*amp;

    ..but I was wondering how could I adapt the first expression so it can work in the expression selector…

  • Peter Zeet

    October 4, 2011 at 4:35 pm in reply to: “Inertial Bounce” expression in text layer

    yes, Filip`s works great, is just I needed more control, and use a expression which can integrate easily with the project..
    Sorry, maybe I should have explained it before so its easier to understand..
    I have a lot (a lot) of shape layers, controlled by a “controller” null (kinda “follow the leader”), with amp, freq, decay and delay sliders to animate those parameters, so they rotate and grow with some delay and nice bouncy effect. At some point I have to add a bunch of text layers.. so they must fit the overall animation and feel, inside the “growing and bouncing” set. I would do it as separate shape layers (converting types to shape layers), or using that useful decompose text script.. but as it`s probably to make changes in the words in the future.. can be a really bad idea..
    So i played a bit with Filip´s expression, but didn`t get the results I need to fit the whole thing…so I thought, “hey, lets change Filip`s expression with the “inertial bounce” I`m using in the project, and probably it even work with the sliders in the main controller”…. but didn`t work at all (as its getting all the word rotated as a whole no matter it is set to “characters”, the idea of a need of adding that time offset came…)

    buf, long read, thanks for read until here!

  • Peter Zeet

    October 4, 2011 at 3:36 pm in reply to: “Inertial Bounce” expression in text layer

    yes, everything there set to chars…mmm
    …maybe is there something in the code I should add to deal with the time offset? like in the Filip Vandueren script:
    timeOffset=0.25;
    v=valueAtTime(time-timeOffset*textIndex/textTotal)[0];

  • Peter Zeet

    October 4, 2011 at 2:58 pm in reply to: “Inertial Bounce” expression in text layer

    hey! thanks Kevin for your guidelines!
    but I think I’m doing something wrong at some step here…
    so basically:
    1. I add the expression animator, and add the inertial bounce code there, and set the x rotation animator to 90..
    2. animate the Amount from 100 to 0 (or viceversa, just animate it)
    3.wait excited
    4.it rotates and bounces… but as a whole element (like based on Lines instead of characters)

    The idea of using that specific script is because I`m using it for a bunch of layers in te project, and I was using the script I attach below, written by Filip Vandueren, and worked like a charm.. but I found it a more bit difficult to tweak all params to get smoother animations than the “inertial bounce” script…

    anyway, thanks for being there 🙂

    swings=3;
    timeOffset=0.25;

    v=valueAtTime(time-timeOffset*textIndex/textTotal)[0];

    anim=2*Math.PI*v/100;
    amp=easeOut(v,0,100,100,0);

    Math.cos(anim*swings)*amp;

  • Peter Zeet

    October 4, 2011 at 1:34 pm in reply to: “Inertial Bounce” expression in text layer

    hey, thanks for the refs!
    I played around with the pendulum thing added to a expression selector in the text layer… but if I try to add this expression below to the expression selector (with, x rotation from 90º to 0º just to test.. nothing happens there…

    maybe it`s something to do with adding the textIndex somewhere in the script…? (you know, the idea is playing with rotation, and scale, and have all text characters animating and bouncing a bit in order… like having a bunch of layers animated with delay..)

    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 = .05;
    freq = 4.0;
    decay = 2.0;
    value + v*amp*Math.sin(freq*t*2*Math.PI)/Math.exp(decay*t);
    }else{
    value;
    }

Page 6 of 6

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