Quickly create complex layer arrays in After Effects with the index expression. Instead of wasting time tweaking the properties of individual duplicate layers, you can completely automate each new layer to change using this expression.

Say you want to duplicate a layer, with each new layer offset by a certain rotation, to create something like a simple flower. Normally, this would require painstakingly clicking each layer and adjusting its rotation one by one.

Below: Manually rotating each new layer.

With the index expression applied correctly, each new duplicate of your layer will automatically rotate for you. As you can see, this method is much more efficient.

Below: Duplicating layers using the index expression.

Now that you understand the usefulness of the index expression in everyday situations, let’s take a look at how to apply it.

How To Use the Index Expression

In most cases, you will start with the expression (Index-1). This will establish a change each time the layer is duplicated. Say you were to apply (Index-1) to the rotation property of a layer. This would cause each new layer to rotate 1 degree further than the previous.

You can increase the amount of rotation by multiplying your index value, or you can decrease it by dividing. For example, (Index-1)*30 would increase each new layer’s rotation by 30 degrees, whereas (Index-1)/30 would increase each new layer’s rotation by 1/30th of a degree.

You’ll soon realize that using some basic mathematical logic, you can apply the index expression in a variety of creative ways to speed up your workflow.

More Tips