Creative Communities of the World Forums

The peer to peer support community for media production professionals.

Activity Forums Adobe After Effects Expressions Inertia per character 3d

  • Inertia per character 3d

    Posted by Göran Thorén on April 6, 2012 at 11:18 am

    Hi all!

    I have found an exellent inertia expression but I don’t know how to apply this to the per character 3d in the text properties.
    What I am looking for to achieve is to have my text charactes swing in one by one from +90 on the X with the anchor point in the bottom of each letter and have them swing a bit untill they finally comes to rest.

    As for now I have used my expression on the “amount” in the expreesion selector for the X value but it only works on the whole word and not for the separate characters.

    Any ideas how to achieve this?

    /Husse

    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;
    }

    Göran Thorén replied 14 years ago 2 Members · 2 Replies
  • 2 Replies
  • Dan Ebberts

    April 6, 2012 at 1:23 pm

    Try it this way:


    delay = .1;
    myTime = time - delay*(textIndex-1);
    n = 0;
    if (numKeys > 0){
    n = nearestKey(myTime).index;
    if (key(n).time > myTime) n--;
    }
    if (n > 0){
    t = myTime - key(n).time;
    amp = velocityAtTime(key(n).time - .001);
    freq = 4;
    decay = 2;
    w = freq*Math.PI*2;
    valueAtTime(myTime) + amp* Math.sin(t*w)/Math.exp(decay*t)/w
    }else{
    valueAtTime(myTime)
    }

    Dan

  • Göran Thorén

    April 6, 2012 at 2:41 pm

    I have said it before and I say it again; Dan, you are a genius!
    Thank you so, so much!!!

    Forever greatful.
    /Göran, Sweden

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