Creative Communities of the World Forums

The peer to peer support community for media production professionals.

Activity Forums Adobe After Effects Expressions Easy question im sure

  • Easy question im sure

    Posted by Eric Sanderson on March 10, 2009 at 6:11 pm
    amp=130;
    freq=40;
    decay=3;
    
    w=Math.sin(time*freq)*amp/Math.exp(time*decay);
    
    s=transform.position.speed*-1/50;
    
    if(s==0)w 

    I have a question that im sure has an easy answer but i dont have much time for trial and error so i figured in the meantime id see if i could get a quick answer on here.;.

    Ive just made a real quick text animation, with the text flying into center frame from the left using pos keyframes, and i wrote this script to give the text some elasticity, recoil, “squash and stretch” type animation as it comes in..stops, and leaves again.

    So the problem im running into is though i have “w” start when the text lands (speed reaching 0)…since my Math.exp is based on “time” , the further down the timeline i have the text land..the more “finished” the exp. curve is so i have to crank up the Math.sin’s amplitude to compensate for it…though that does technically work id rather not have to do that and would like to know a way to make the “time” of the exp. curve decay start when the variables executed, or when the text lands (which is the same time but dont know the best way to link it.) I was thinking maybe this is a good time to get into using layer markers in scripts as i havent really dove into that yet and thought there may be a solution with using them…or a way to say “time minus valueAtTime that position.speed reaches 0”

    So if anyone knows the best way to go about this im all ears (as well as any suggestion on how to improve or streamline my script that is already written, if theres a better way of writting it, im still trying to learn)…as always thanks alot!

    Eric Sanderson replied 17 years, 1 month ago 2 Members · 3 Replies
  • 3 Replies
  • Paul Hennell

    March 10, 2009 at 7:08 pm

    Not sure this will work ‘out the box’ as it were – but the script Ease and Wizz might be able to do what you want – if not the expressions it produces are probably helpful to look at.


    Only in after effects do children get to pick and whip their parents.
    https://hennell-online.co.uk

  • Eric Sanderson

    March 10, 2009 at 7:24 pm

    ya that didnt really apply to my situation but seems to be something that will definitely come in handy in the future.

  • Eric Sanderson

    March 11, 2009 at 2:06 pm

    So does really nobody have a solution to my problem? i really thought it was gonna be one of those “duh” answers.

    Oh i just read over my post and figured it might help if i mentioned what the script was applied to…its applied to the “slant” amount in CC Slant.

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