00:00
7
More
See all Show me
30. little things
1 year ago
29. Kinetic Text Expressions for AE
1 year ago
28. Butterfly Hatari
1 year ago
27. Pinata Party
1 year ago
26. Leon
1 year ago
25. Pirate Bay
1 year ago
24. Hey Kid
1 year ago
23. montague
1 year ago
22. 06 Primp 720p
1 year ago
21. 07 Wow 720p
1 year ago
20. Scratch mockup
1 year ago
19. dt big
1 year ago
18. Goodbye old friend
1 year ago
17. Brick Phone
1 year ago
16. Colter Video
1 year ago
15. Vox Populi
1 year ago
14. Sumo
1 year ago
13. Oscar Pitch Outtake
1 year ago
11. Too Smooth?
1 year ago
10. Sweet Home Alabama
1 year ago
9. Thrill is gone
1 year ago
5. The Duet
1 year ago
Forgive the content of the text.
The expressions below simply check the velocity of your animations in AE. If you move an objects motion ends abruptly (ie: you didn’t easeIn @ 100%) the physics will kick in automatically. It’s all just that stranger than fiction crap. The paragraph uses text animations (although it’s easy and i could have made it a plugin, it sucks because it’s harder to get words to just appear as opposed to fading in and out with the swings). Anyways, not for paragraphs and the proof is in the video. The code for the rest is below. (Dr Gonzo in the comments below tweaked the code and it seems to work for everybody)

This is code for bouncy position movement.
Just paste it in the position expression field, in this case it will affect x, y and z movements:
// Inertial Easing (elastically reacts to the speed at which it was animated)
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 = .02;
freq = 3.0;
decay = 5.0;
value + v*amp*Math.sin(freq*t*2*Math.PI)/Math.exp(decay*t);
}else{
value;
}

And this is tweaked a bit for rotations… paste it in the x, y or z rotation. It will only affect the ones you place it in:
// Inertial Easing (elastically reacts to the speed at which it was animated)
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 = 8;
freq = 2.0;
decay = 3.0;
value + (v/100)*amp*Math.sin(freq*t*2*Math.PI)/Math.exp(decay*t);
}else{
value;
}

Credits

Likes

See all likes
  • Motion Voyager 1 year ago
    awesome! thank U
  •  
  • doctor gonzo 1 year ago
    sorry but the expressions gave me 2 errors at line 6 and 12
  •  
  • doctor gonzo 1 year ago
    ok I figured out
    the - was the problem
  • Shaz Ahmed 1 year ago
    Gonzo did you just delete the "-" or did you add a space or something?? What was your fix?
  •  
  • doctor gonzo 1 year ago
    great expressions
    thanx!
  •  
  • Maciek Urb 1 year ago
    lovely ones, but i get some strange jerky jump while using the rotation expression. Any clue?
  •  
  • Lux Lucidus 1 year ago
    I get an error for line 6 on both of them as well and can't make it work. le sigh!
  •  
  • Danny D 1 year ago
    Not sure why. It works in my CS5.
    An earlier post says the - may have caused trouble.
    I assume it's the "n-".
    Maybe you delete the "-" or try "n--"... dunno.
  •  
  • doctor gonzo 1 year ago
    I changed the "n-" with "n--" and it works in cs4.
    If you open the xpressions with the script editor>debug you can see the lines that give you error with cs4 and earlier version.
  •  
  • damien Manuel 1 year ago
    i also cant get this right.
    has anyone got a definitive answer for this?
  •  
  • doctor gonzo 11 months ago
    for me the working expressions are this:
    Position
    // Inertial Bounce (moves settle into place after bouncing around a little)
    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 = 8;
    freq = 2.0;
    decay = 3.0;
    value + (v/100)*amp*Math.sin(freq*t*2*Math.PI)/Math.exp(decay*t);
    }else{
    value;
    }
  •  
  • doctor gonzo 11 months ago
    Rotation
    // Inertial Bounce (moves settle into place after bouncing around a little)
    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 = 8;
    freq = 2.0;
    decay = 3.0;
    value + (v/100)*amp*Math.sin(freq*t*2*Math.PI)/Math.exp(decay*t);
    }else{
    value;
    }
  •  
  • Ernest de Castro plus 10 months ago
    Danny, Thanks so much for posting this! Also, thanks to doctor gonzo for his version. I was initially getting errors, but doctor gonzo's tweak/version worked for me in CS 5.
  •  
  • Travis Heberling 3 months ago
    Forgive me if this is a silly question, but I am not very knowledgeable with expressions in After Effects.

    Once I have the code placed in the right area and have no errors...how do I actually animated it?

    Thanks!
  •  
  • Danny D 3 months ago
    You add a keyframe to where the object is, then go forward 1 second or however long you want the animation to take and…
    move the object to it's end position and add a keyframe.
    When you scrub or play it back you will see the code kick in.
    It just adds physics to your normal key framing.
  •  
  • Nathan Gross plus 3 months ago
    Does anyone know if these types of expressions work when using text animators? I can't seem to get them to work

    Text layer > Animate: Position
  •  
  • yui 3 months ago
    thanks so much for sharing!
  •  
  • Rare Design plus 4 weeks ago
    Where do I post the code?

    Thanks
  •  
This conversation is missing your voice. Take five seconds to join Vimeo or log in.

Advertisement

About this video

MP4
00:00:07
  • 1280x720, 1.56MB
  • Uploaded Wed January 19, 2011
  • Please join or log in to download

Statistics

Date Plays Comments
Totals 7,169 86 18
Feb 24th 0 0 0
Feb 23rd 35 2 0
Feb 22nd 35 1 0
Feb 21st 27 0 0
Feb 20th 27 0 0
Feb 19th 23 0 0
Feb 18th 22 0 0