ADOBE AFTER EFFECTS: Forum Expressions Tutorials Creative Cloud

# Dividing Z Value by INDEX. Expression advice

FAQ   •   VIEW ALL
 Dividing Z Value by INDEX. Expression advice on May 14, 2014 at 9:28:01 pm

I have 5 circles, with the center being the Main Circle. When I move the Main circle in the Z depth I want the other circles to be
divided by the Index
OR
Subtract by (Value * Index)

Dont know if I should go with the divide or Subtract until I see it in action.

I want to get a speaker playing effect.

I dont know how to just Subtract/divide ONLY the Z Value, I can get to work on all 3 values (x,y,z) but not just Z.

 Re: Dividing Z Value by INDEX. Expression adviceon May 15, 2014 at 1:24:21 pm

This would be division:

[value[0],value[1],zpos]

But I recommend doing it differently because the values aren't going to be consistent, for example, when you switch from positive to negative numbers. Instead, I recommend using a multiplier for the index and add (subtract because positive numbers are further back in z space) that. Something like this:

mult=100;
[value[0],value[1],zpos]

Now in this case, the second layer will always be 100 behind the leader layer. If you apply the expression to the third layer in the timeline, it will always be 300 behind the leader layer. If you want to make it further, just change the number in the multiplier to be higher. Also, make sure to change the name of the 'leaderlayer' to whatever that layer is actually called.

"|_ (°_0) _|"

Sincerely,

George

http://www.vimeo.com/georgegoodman