-
Splitting and Distributing Layers in 3D space Via Slider Randomly
I have a really cool expression that creates the illusion that an image looks normal based on the camera position.. but once the Camera rotates and moves, you can see all the layers are distributed randomly in 3D Space. The Expression adjusts the Scale of each layer to make it appear normal size based on the Camera’s Position. I create an Expression slider for each layer and set the parameter to 100. Smaller than 100 moves towards the Camera, less than 100 moves away from the Camera.. (Expressions Below)
My Question:
Instead of adjusting a random position for each one (which could be hundreds).. is there are way to attach each layers expression slider to one main Expression Slider that feeds a Random Distribution for each layer. My goal is to quickly readjust the Z distribution if its not quite right.1. Created an Expression Slider on each Layer and called it zControl and set the initial value to 1002. Pasted this on Position Value on each layer: (Z space based on Camera's Position when created)
cameraPos = [thisComp.width/2,thisComp.height/2,-1866.6667];
zControl = effect("zControl")("Slider")
v = (value - cameraPos)*zControl/100 + cameraPos;3. Pasted on Scale:
zControl = effect("zControl")("Slider")
value*zControl/100