Skip to main content
New Participant
June 11, 2024
Question

How to create increasing space between objects in After Effects

  • June 11, 2024
  • 2 replies
  • 902 views

Hi! I'm looking for a way to distribute objects with an increasing (exponential?) spacing between them. Do you have any tips for a script/plugin/expression, which could help me achieve this in After Effects?

2 replies

Community Expert
June 12, 2024

Name the first layer "First Layer" and then add an Expression Control Slider named Exponent to the first layer.

 

Add this expression to every layer below the "First Layer."

ofst = thisComp.layer("First Layer").effect("Exponent")("Slider")/10;
ref = thisComp.layer(index - 1).position;
e = index * Math.exp(ofst);
[ref[0] + e, ref[1]];

The slider lets you adjust the distance between the layers. This is what you get:

 

 

ShiveringCactus
Community Expert
June 12, 2024

That's really elegant @Rick Gerard 

Community Expert
June 12, 2024

Thanks...

Mylenium
Brainiac
June 11, 2024

Could be as simple as tying a Math.pow() or Math.exp() expression to the X position. It's just  ot really clear what the values are supposed to be.

 

Mylenium