How to Offset Layers in After Effects

After Effects 27/10/2020 4 min read
After Effects Offset Layers

Hey everyone, this is Owen with Motion Array and in this tutorial, we’ll be showing you how to create an offset animation. In this case, we are going to offset both time and position to create a lower third animation. Alright, let’s get started!

  1. Begin by making a new composition size 1920 x 1080, at 29.97fps, and call it Lower Third.
  2. Then use the Type tool and type out the text for the lower third. In our case, I did two lines.
  3. Go to Layer > New > Shape Layer. Call the new shape layer Text Box 1.
  4. Use the Add button to add a Rectangle and a fill to Text Box 1.
  5. Adjust the size of the rectangle path to fit your text and change your fill to whatever color you want.
  6. Drag the text box below the text layers in the layer stack.
  7. Parent the text layers to Text Box 1 and then move Text Box 1 into place as a lower third.

Let’s go ahead and animate this text box so when we add the offset layers we’ll see it happening.

  1. At frame 20 set a keyframe for the Position of Text Box 1.
  2. Then at frame 0 change the Y position of the box so that it is off screen.
  3. At frame 40 place another keyframe for the Position where it is on screen.
  4. At frame 70 change the X position so that the text box is off screen and give it a little bit of extra so any offset copies will make it off screen too. You can ease these keyframes to get a nicer look.
  5. Create a new null object, Layer > New > Null Object, and name it Controller.
  6. With the null still selected go to Effect > Expression Controls > Slider Control.
  7. Rename the slider control Delay. If the null isn’t at the top of the layer stack then go ahead and move it there.
  8. Duplicate Text Box 1 and drag the duplicate below it (should be named “Text Box 2”).
  9. Change its fill color so that you’ll be able to see which one is which.
  10. Pull up the Position of Text Box 2 and Option (or Alt) + click the Stopwatch and add the following expression:
m=index-4;
d=thisComp.layer("Controller").effect("Delay")("Slider");
p=thisComp.layer("Text Box 1").transform.position.valueAtTime(time-d*m);

[p[0],p[1]]

So let’s break this down quickly. We’re defining three variables (m, d, and p):

  • m is equal to the layer’s index (layer number) minus 4. Why 4? Because the first layer we are applying this to is Text Box 2 and it should be layer number 5. 5 – 4 = 1 and so m=1 (we’ll come back to this).
  • d is simply pointing to the delay slider control we made on the null object.
  • p looks at the position of Text Box 1 but there’s a little more too it with the valueAtTime added. We’re subtracting the current time by d*m. So we’re multiplying the delay slider and the layer index minus 4 together and whatever that is equal to is how much we’re offsetting the layer in time. So if we add another text box and drag it to the bottom so that it’s layer 6 then it’s “m” value will be 2 instead of 1 (6 – 4 = 2).

This is how we achieve evenly offset layers. Now let’s add some delay to this.

  1. Go the Delay slider on the Controller null and change the value to 0.1 (a little goes a long way!). Now when you look at the animation you’ll see you’re offset box.
  2. Duplicate Text Box 2 and drag the duplicate (should be Text Box 3) to the bottom of the layer stack.
  3. Change it’s fill color so that it’s different from the other two text boxes.

You’ll see that it’s already offset the proper amount. You can continue this process creating as many duplicates as you like. Just remember that it’s looking at layer index so if you put another layer above the text boxes you’ll have to compensate in the expression.

At this point you can call it done but we’re going to take it a step further by adding some offset in position as well.

  1. On the Controller null duplicate the Delay slider twice and rename the two new sliders X Offset and Y Offset.
  2. Set the value to both to 20.
  3. Now replace the expression on the position of Text Box 2 and 3 with this:
m=index-4;
d=thisComp.layer("Controller").effect("Delay")("Slider");
p=thisComp.layer("Text Box 1").transform.position.valueAtTime(time-d*m);
ox=thisComp.layer("Controller").effect("X Offset")("Slider");
oy=thisComp.layer("Controller").effect("Y Offset")("Slider");

[p[0]+ox*m,p[1]+oy*m]

Time for another breakdown! This one is similar in a lot of ways but we’ve added two new variables.

  • ox and oy are pointing to the new sliders we added to the Controller null.
  • Then we are multiplying those values with m which we talked about in the last expression. We take the result of those two being multiplied together and then add it to the position to get our offset.

Your text boxes should be evenly offset in position and time now. Again, you can duplicate the text boxes as many times as you need to and it all should work just fine. You can even keyframe the offset sliders to get some cool and unique animations!


Well, that concludes this tutorial. I hope you found it helpful, if you did, please give us a thumbs up and if you’d like to see more tutorials please go ahead and subscribe because we’re making new ones all the time. We’ve got lots of other Premiere Pro tutorialsAfter Effects tutorials and filmmaking tutorials!