You are on page 1of 14

7/14/2021 The Best 10 After Effects Expressions

About After Effects Templates After Effects Tutorials Social

Contact 

  

The Best 10 After Effects


Expressions

Really quick for those who are new to After Effects so what is Popular After
an after effects expression ?
Effects Tutorial
An After Effect expression is a programming Javascript
language code that you insert in any “Time-Vary stop After Effects Text
watch” by pressing Alt-Click. See below
Animation Presets
Pr...

The Best 10 After


Effects Expressions

https://blog.motionisland.com/the-best-10-after-effects-expressions/#.YO6LTOgzbDc 1/14
7/14/2021 The Best 10 After Effects Expressions

Over the years I have learn that after effects expressions can 10 Free After Effects
be very handy and powerful to make great motion graphics. It text animation pr...
is amazing that with a few programming codes it can help
25 Free After Effects
make your animation moving organically. For those who have
Transitions
programmer brain which I don’t have 🙂 After effect
Expression  can significantly improve your workflow when you After Effects Counter
create an animation and with complex codes you can
and Countdown ...
actually achieve amazing motion graphics.
Top 15 After Effects
Plugins every Moti...
So let’s get to the real stuff, I found most of those useful after
effects expressions list below on the web, to me they are the After Effects
most used expressions unfortunately I don’t remember the ae Transitions Presets
expression owners name but I am happy to add a name next Previ...
to those fabulous expressions if you know the programmer
How to make an After
please shoot me an email or add a comment.
Effects Transparen...

Also please like & Share


Make a After Effects
typewriter effect...
Share
Wiggle Expressions
Tutorial for After E...
The Bounce Expression
4 Ways to Create an
After Effects Audio...
This after effects bounce expression is very useful to make
your animations and titles look dynamic with a nice elastic TOP 10 Free
movement, Subscribe Button
Green Scre...
Just create 2 keyframes position and past the code
below. After Effects Distort
Effects Preview G...

After Effects
amp = .1;

Snapshot vs
freq = 2.0;

Screenshot
decay = 2.0;

n = 0;
4 Ways to Reverse a
if (numKeys > 0){
video clip in After...
n = nearestKey(time).index;

if (key(n).time > time){

n--;

https://blog.motionisland.com/the-best-10-after-effects-expressions/#.YO6LTOgzbDc 2/14
7/14/2021 The Best 10 After Effects Expressions

}}

if (n == 0){ t = 0;

}else{

t = time - key(n).time;

if (n > 0 && t < 1){

v = velocityAtTime(key(n).time - thisComp.frameDuration/10);

value + v*amp*Math.sin(freq*t*2*Math.PI)/Math.exp(decay*t);

After Effects
}else{value}
Templates

 Download the AE bounce expression example here. Old Film Grain


After Effects

Automatic Fade WhatsApp AE


Template

The automatic fade expression is useful when you don’t want Money Tree
to bother a create keyframes for a fade animation. Animations

Slot Machine

transition = 20;
Animation

if (marker.numKeys<2){
3 Calendar
tSecs = transition / ( 1 / thisComp.frameDuration);
Animation
linear(time, inPoint, inPoint + tSecs, 0, 100)

Water Fall
- linear(time, outPoint - tSecs, outPoint, 0, 100)

Mountain Landscape
}else{

linear(time, inPoint, marker.key(1).time, 0, 100)


Nature Landscape
- linear(time, marker.key(2).time, outPoint, 0, 100)
Animation
}
100 AE

Animations Combo Pack

Company Moving
Download the autofade expression example here
Animation

iPhone IOS UI

Squash and Stretch Scale Animation

Expression Twitter Bubbles

Animation

https://blog.motionisland.com/the-best-10-after-effects-expressions/#.YO6LTOgzbDc 3/14
7/14/2021 The Best 10 After Effects Expressions

This bouncing squash and stretch expression should make 20 Amazing Lower
your animation a bit more alive by adding a proportional scale Third
to your shapes or images.
Instagram AE
Template

maxDev = 13; // max deviation in pixels


Facebook Like
spd = 30; //speed of oscillation
Button
decay = 1.0; //how fast it slows down

Social Media
Animation
t = time - inPoint;

x = scale[0] + maxDev*Math.sin(spd*t)/Math.exp(decay*t);
Facebook Text
y = scale[0]*scale[1]/x;
Message
[x,y]
Wedding AE
Template

Download The Squash and stretch expression example here


Stork Animation
Ae Expression Source: http://motionscript.com/expressions-
Twitter Bird
lab-ae65/squash-and-stretch.html
Animation

EKG Video Line


Loop Animation

The Loop expression is probably to most used after effects


expression, it allows you to repeat your animation

forever, with code tweak you can also control the loop time
and repetitions.

loopOut("cycle");

MotionIsland
Newsletter

Email address:
https://blog.motionisland.com/the-best-10-after-effects-expressions/#.YO6LTOgzbDc 4/14
7/14/2021 The Best 10 After Effects Expressions

Download The Loop expression example here Your email address

Sign up
Looping Wiggle (by Dan Ebberts)
The looping wiggle expression become handy when you
want an object to move randomly in your composition.  
Looping wiggle should be seamless and you shouldn’t see a
cut, this expression is also used for background animation.

freq = 1;

amp = 110;

loopTime = 3;

t = time % loopTime;

wiggle1 = wiggle(freq, amp, 1, 0.5, t);

wiggle2 = wiggle(freq, amp, 1, 0.5, t - loopTime);

linear(t, 0, loopTime, wiggle1, wiggle2)

Download the Loop Wiggle expression example here.

Keep in touch!
Time
Time expression is good for constant animation, the higher
the number next to “time” below the faster your animation will
be.

time*150

https://blog.motionisland.com/the-best-10-after-effects-expressions/#.YO6LTOgzbDc 5/14
7/14/2021 The Best 10 After Effects Expressions

Rotate Multiplication
Rotate Multiplication is my favorite expression, basically it
allows you to rotate multiple shapes around a center point
and define how many shape you want this  case below is 20
shapes layers until it make a circle. The rotate mutiplication is
awesome to create circle burst animation. It is a bit
complicated to explain how exactly how it work, so feel free to
download my file after the animation below.

index*360/20

https://blog.motionisland.com/the-best-10-after-effects-expressions/#.YO6LTOgzbDc 6/14
7/14/2021 The Best 10 After Effects Expressions

Download The rotate multiplication expression example here.

Move Object X Pixel per Second


If your tired of making key frames, you’ll like this expression it
allows you to move an object on the x axis per second.

veloc = 150; //Move object 150 pixel on x axis per second

x = position[0] + (time - inPoint) *veloc;

y = position[1];

[x,y]

Download Move Object X Pixel per Second example here

Constant Rotation Per Second


Here is another After Effects rotation expression, no key
frames needed to make a simple 360 rotation on a layer.

veloc = 360; //360 Degree Rotation per Second

r = rotation + (time - inPoint) *veloc;

[r]

Download The Constant Rotation expression example here.

Motion Trail Expression
As you can see below with this motion trail expression you
can get some pretty interesting animation of layers trailing  .

//Apply to position

https://blog.motionisland.com/the-best-10-after-effects-expressions/#.YO6LTOgzbDc 7/14
7/14/2021 The Best 10 After Effects Expressions

delay = 5; //number of frames to delay

d = delay*thisComp.frameDuration*(index - 1);

thisComp.layer(1).position.valueAtTime(time - d)

//Apply to Opacity

opacityFactor = .75;

Math.pow(opacityFactor,index - 1)*100

Download the motion trail expression example here

Script source: Motionscript

Blink Expression
The blinking expression become super handy when you don’t
want to repeat a bunch of opacity keyframes over and over or
want to animate a cursor quickly.

Simply add this expression below to your opacity properties.

blinkSpeed=15;

n= Math.sin(time*blinkSpeed);

if(n<0) 0 else 100;

Download the blink expression AE project here

If you want to learn more I have created a list of After Effects


expressions with examples and project source.

Related Posts
https://blog.motionisland.com/the-best-10-after-effects-expressions/#.YO6LTOgzbDc 8/14
7/14/2021 The Best 10 After Effects Expressions

29 Comments

johnnie 11/16/2016 at 8:55 am - Reply

thx so much…..av looked for them for along time

https://blog.motionisland.com/the-best-10-after-effects-expressions/#.YO6LTOgzbDc 9/14
7/14/2021 The Best 10 After Effects Expressions
johnnie 11/29/2016 at 6:52 am - Reply

bouncing expression?????????????? help me with


one

Musadiq 01/11/2017 at 11:15 pm - Reply

Just use Position or Scale element, and while


clicking on the keyframe you need to hold alt
in order to paste that Expression.

Joshua Benda 05/13/2020 at 5:56 am - Reply

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 && t < 1){

v = velocityAtTime(key(n).time –
thisComp.frameDuration/10);

amp = .06;

freq = 3;

decay = 5.0;

value +
v*amp*Math.sin(freq*t*2*Math.PI)/Math.exp(decay*t);
}else{

value;

https://blog.motionisland.com/the-best-10-after-effects-expressions/#.YO6LTOgzbDc 10/14
7/14/2021 The Best 10 After Effects Expressions
Sagar 07/07/2020 at 2:58 pm - Reply

Thanks bro

Diego 03/08/2017 at 1:30 pm - Reply

Cool. Thank you!

norbert 04/24/2017 at 6:29 am - Reply

thanks

Rokas 03/17/2018 at 2:29 pm - Reply

Hey, thanks a lot for this great info. Could you help
me with squash effect? Keep getting an error.

Jagan 09/29/2018 at 12:25 pm - Reply

please make post on more rotate multiplication.

Umametsi Moyo 03/10/2019 at 12:34 am - Reply

I’m loving this, can’t wait to try them

Hassan 05/20/2019 at 12:59 pm - Reply

this is very nice i am very thanks full to you my Dear


its relay very good .

thank you

Udayalingam 09/23/2019 at 4:03 am - Reply

Hi, thanks for this scripts it is useful for my


animation works also am using this for UI
Animations.

https://blog.motionisland.com/the-best-10-after-effects-expressions/#.YO6LTOgzbDc 11/14
7/14/2021 The Best 10 After Effects Expressions
abed 09/27/2019 at 7:01 am - Reply

thank you they are very useful

faleh 11/08/2019 at 6:10 am - Reply

thank you

they were very useful to me

Raffles 11/25/2019 at 6:21 am - Reply

I found this very helpful, thanks

Mack 12/11/2019 at 12:54 pm - Reply

hello.

i have little bit diferent method to multiple rottation.


You don’t need typing the number of objects, you
just duplicate it (CTRL+D)

Paste my own code into rottation of object and


duplicate multiple time:

layerCount = thisComp.numLayers;

offset = 360/(layerCount)*index

If You want start counting from specific layer, just


add “-thisComp.layer(“your layer;”).index” at the end
of the line one.

Enjoy!

Akash Das 04/27/2020 at 8:01 am - Reply

Thank u So Much .

Akari 04/29/2020 at 1:22 am - Reply

https://blog.motionisland.com/the-best-10-after-effects-expressions/#.YO6LTOgzbDc 12/14
7/14/2021 The Best 10 After Effects Expressions

How do you make the position move on the x axis


instead of the Y, when using the bounce expression?

leroy 07/22/2020 at 7:08 am - Reply

Were can i find more expressions? I love it!

Shajjad Official 10/06/2020 at 9:00 pm - Reply

love your work brother

Marieke 01/14/2021 at 12:14 pm - Reply

With the blinking expression I get a syntax error:


Unexpected token ‘else’

When I open your file it works.

Marieke 01/14/2021 at 12:21 pm - Reply

This script gives an error:

blinkSpeed=10;

n= Math.sin(time*blinkSpeed);

if(n<0) 0 else 100;

This script works:

blinkRate=10;

n=Math.sin(time*blinkRate);

if(n<0) 0;

else 100;

marieke 01/14/2021 at 12:23 pm - Reply

Oh your example is missing a

Krystal 01/17/2021 at 3:22 pm - Reply

https://blog.motionisland.com/the-best-10-after-effects-expressions/#.YO6LTOgzbDc 13/14
7/14/2021 The Best 10 After Effects Expressions

Hi, could you please re-save and re-upload in AE


legacy version? I have AE Cs6 and unable to open
any of the files.

Thanks!

MotionIsland 01/18/2021 at 12:05 am - Reply

Hi Krystal, sorry unfortunately my after effects


can’t save to CS6.

murry 02/15/2021 at 4:55 am - Reply

thank you

Daria 05/03/2021 at 10:07 am - Reply

This is the best explanation ever.Thank you very


much.

Gabriel Ponce de León 05/25/2021 at 9:37 pm - Reply

Awesome thanks!

N 06/10/2021 at 12:06 am - Reply

Thank, so much

Leave A Comment

https://blog.motionisland.com/the-best-10-after-effects-expressions/#.YO6LTOgzbDc 14/14

You might also like