This content has been marked as final. Show 3 replies
Use this script by Paul Tuersley:
Import your layered PSD as a composition, then run the Script. It'll add expressions to each layer that adjust layer scale to automatically compensate for any changes in Z depth.
If you want to hold a constant relative scale of your layer no matter what the camera position then you can add a simple expression that takes the distance length (point1, point2) between the camera and the layer divided by the zoom value of the camera, then multiplies that product by the current scale value. It's just a simple ratio using vector math.
The expression looks like this:
cp = thisComp.layer("Camera 1").position;If you're just trying to the "Kid stays in the picture" effect you can add this expression to each layer, then distribute them in 3D space. You'll get some odd visual behavior if you keep this expression turned on for all layers. I usually leave the expression active in the background layer only and convert the expression to keyframes for the middle and foreground elements.
cz = thisComp.layer("Camera 1").zoom;
sf = length(cp, position)/cz;
value * sf
I hope this helps.
BTW, this expression lets you add keyframes to scale which can give you more options.
Thanks guys, really cool tips!