Creative Communities of the World Forums

The peer to peer support community for media production professionals.

Activity Forums Adobe After Effects Expressions Expression Help Need to distributing text layers in 3D z space

  • Steve Roberts

    November 23, 2005 at 9:42 pm

    Try using this layer index-based expression for each layer’s position:

    start = 0;
    diff = 0;
    [position[0], position[1], start + index*diff]

    1. create a null with two slider effects. Name one slider “start”, the other”diff”. Place it at the bottom of the stack in the timeline.
    2. apply the above expression to one layer
    3. Pickwhip each 0 above to one of the sliders
    4. test the expression by moving the sliders
    5. copy the expression by selecting “position”, then using edit>copy expression only
    6. select the rest of the layers and select edit>paste

    Start is the position of the first layer in the stack, diff is the gap between. Move the start slider to move the entire group, move the diff slider to change the gap. Change the layer stacking order in the timeline to change stacking order in the group.

    You should have something like this for each layer:

    start =thisComp.layer(“Null 1”).effect(“start”)(“Slider”);
    diff = thisComp.layer(“Null 1”).effect(“diff”)(“Slider”);
    [position[0], position[1], start + index*diff]

    Does that make sense?
    Steve

  • Steve Roberts

    November 24, 2005 at 4:18 am

    Actually, it should be (index-1)*diff :

    start =thisComp.layer(“Null 1”).effect(“start”)(“Slider”);
    diff = thisComp.layer(“Null 1”).effect(“diff”)(“Slider”);
    [position[0], position[1], start +(index-1)*diff]

    To remove the effect of the diff value from the position of the group. It’s a little cleaner.

    Steve

We use anonymous cookies to give you the best experience we can.
Our Privacy policy | GDPR Policy