How To Offset Animation in After Effects

In this post, I will show you how to offset animation in After Effects.

Alright so we are in After Effects and here is what we are going to create today.

How to offset animation in After Effects

So I have all these Ukramedia logos in my composition and they are scaling up like this:

Images scaling up in After Effects 1 Images scaling up in After Effects Images scaling up in After Effects Images scaling up in After Effects Images scaling up in After Effects

Now I do have control of the offset. There is a slider inside of my null layer called Offset.

Slider inside of null layer in After Effects

Thanks to this slider, I can quickly slow things down or speed them up.

For example, to slow down the animation, all I have to do is change the slider input from 0.10 to 0.50.

Slow down the animation in After Effects

The higher the number, the slower our animation. So to speed up my animation, I will have to type a smaller number like 0.05.

Smaller number speeds up animation in After Effects

With that said, now let me show you how to set this up in After Effects.

For this setup, I have an offset null that has a slider.

Offset slider null in After Effects

If you do not know how to create a slider inside of a null, simply select the null, right-click inside the Effect Controls, go to Expression Controls and choose Slider Control.

Slider Control in After Effects

Next, I have all these Ukramedia logos and only one of them is animating.

One logo animating in After Effects

What I need to do is take this animation, apply it to all of my other Ukramedia logos and then offset them.

So the first thing I am going to do is select my next logo and then press S to reveal the scale property.

Reveal scale property in After Effects

Then ALT+LEFT-CLICK on a PC or CMD+LEFT-CLICK  on the stopwatch icon to create an expression.

Activate expression in After Effects

Inside the white text field, we are going to pick-whip to our animated scale property.

Pickwhip to scale property in After Effects 1 Pickwhip to scale property in After Effects 1

So right now the second selected layer will be animating the exact same way as the first one.

Scale animation in After Effects Scale animation in After Effects Scale animation in After Effects Scale animation in After Effects

The expression is currently referring to a specific layer called UM Logo 2017.ai 2.

thisComp.layer(“UM Logo 2017.ai 2“).transform.scale

Referring to a specific layer in After Effects

It says thisComp.layer and then it gives me a specific layer, which happens to be UM Logo 2017.ai 2.

Referring to a specific layer inside of After Effects

I do not want to do that. Instead, I want to refer to the layer above.

My current index is 3, the layer above is 2, which means that it is decreasing.

Index number in After Effects

So instead of typing layer name inside of my expression like so:

thisComp.layer(“UM Logo 2017.ai 2“).transform.scale

I can instead refer to its index number.

thisComp.layer(“2“).transform.scale

And it would do the same thing. I want my current index 3 minus 1 to get the 2.

So I am going to replace 2 with index like so:

thisComp.layer(“index“).transform.scale

If I let go, it is going to refer to my current index, which happens to be index 3.

Now I want to go to index 2, which happens to be right above my current layer. To do that I need to subtract from my current index 3. So I am going to say index minus 1 and what that would do is take my current index and subtract 1 from it, which would then be 2. That is how we would get the layer above us, which is index 2.

thisComp.layer(“index – 1“).transform.scale

So if I let go, it will do the exact same thing as before. Both indexes 2 and 3 will be animating at the same time, which is good.

So if we wanted to get the layer below index 3, we would need to say plus 1 instead, because our index is increasing. I hope that made sense.

thisComp.layer(“index + 1“).transform.scale

Alright, next I am going to offset our animation. To do that, I am going to type valueAtTime() and in the parentheses, I am going to say (time – .1).

thisComp.layer(“index + 1”).transform.scale.valueAtTime(time – .1)

So if I let go and preview what we have so far, you can clearly see that it is offsetting the animation of my indexes 2 and 3.

Offsetting layers in After Effects

If I wanted a bigger offset, I would have to type a bigger number inside the parentheses (time – .1), but I do not want to be typing a number inside of my valueAtTime() parentheses every single time. Instead, I am going to connect it to my offset slider. That way I can quickly adjust the offset on the fly.

To do that, I need to create an offset variable. I am going to say offset you are going to be and then I will pick-whip to the slider.

Offset variable in After Effects Offset variable in After Effects pickwhip

offset = thisComp.layer(“Offset”).effect(“Offset”)(“Slider”);

thisComp.layer(“index + 1”).transform.scale.valueAtTime(time – .1)

Instead of (time – .1), I am going to replace .1 with an offset.

offset = thisComp.layer(“Offset”).effect(“Offset”)(“Slider”);

thisComp.layer(“index + 1”).transform.scale.valueAtTime(time – offset)

I hope this makes sense. So we replaced a number with offset, which is referring to our Offset slider.

Right now our slider input is set to 0, which means no offset is applied to our animation. So both logos will animate at the same time.

To offset the animation, I will need to change the Offset slider input to something like .1.

Offset animation with a slider in After Effects

As you can see, now both of my layer’s animation is offset.

The next thing I am going to do is copy my expression and then apply that to all my other layers.

To do that, I am going t0 right-click on the scale property and then click on Copy Expression Only.

Rick click on scale property in After Effects to copy expression

Then I am going to press S to see all the other scale properties.

Press S to see scale properties in After Effects

Next hit ~ on your keyboard to go fullscreen.

Press tilt key to go full screen in After Effects
I do not want to do anything with the top two layers (Offset & UM Log 2017.ai 2). So we need to collapse them like so:

Collapse layers in After Effects

Select all visible properties with the keyboard shortcut CTRL+ALT+A on a PC/CMD+OPT+A on a Mac.

Select all layers in After Effects with a keyboard shortcut

Apply our copied expressions to all visible properties with the paste keyboard shortcut CTRL+V on a PC/CMD+V on a Mac.

Paste expressions in After Effects

Press ~ to get out of fullscreen mode.

Tilt key in After Effects

And now you can see that it is animating all of them, which is exactly what I want.

Animating layers with applied offset in After Effects Animating layers with applied offset in After Effects Animating layers with applied offset in After Effects Animating layers with applied offset in After Effects Animating layers with applied offset in After Effects

The beautiful thing is that I can still control the offset with the slider. Right now the slider is set to .1, but I can change it to 0.3 and it will be much slower.

Slower animation offset with slider in After Effects

I hope you found this post useful. If you would like to learn more about Expression and how it can speed up your workflow in After Effects, check out my Learn After Effects Expressions Course.

About the author:

Sergei Prokhnevskiy

Sergei Prokhnevskiy is a Charlotte, NC based motion graphics designer, an online tutor, an entrepreneur, and Adobe MAX Master Speaker. Sergei is known for his quick and practical After Effects tips and tricks on YouTube, where he generated well over 6 million views on his tutorials. He has authored an online video course on After Effects Expressions and developed scripts for After Effects. He is also a former senior motion graphics designer at Fox Sports where he worked on graphics for NFL, Super Bowl, MLB, World Series, College Football, NASCAR, Women’s World Cup, and NASCAR Race Hub. He is very passionate about learning and teaching others.

5 FREE TIME-SAVING TOOLS

Over 100,000 downloads & counting!

These 5 After Effects tools will seriously speed up your workflow and save you hours of wasted time. More than that, they could be the difference between being able to complete a project on time or not!