I can’t take credit for this, but this works.
I’ve not been successful in getting this to work with a position expression yet, but I’ve not tried hard enough.
I usually do exponential scaling with a slider:
add a expression slider-control to your layer and rename the slider to “Z”
Give the layer’s scale this expression:
exp = effect(“Z”)(“Slider”);
Math.pow(1.01,exp) * value;
Positive values for the slider => bigger, negative => smaller.
The nice thing about this is that you can ease the keyframes on that slider. Or even add an expression to it etc. (I usually add a smooth).
you can also still use the scale of the value if you need to flip or disproportiantely scale the layer because it get’s mulitplied in.
If you want the 2D-position to also fake perspective (smaller= nearer to the vanishing point), add this expression to position:
exp = effect(“Z”)(“Slider”);
compCenter=[thisComp.width,thisComp.height]/2;
compCenter + Math.pow(1.01,exp) * (value-compCenter);
Note: if your layers are parented, stuff get’s more complicated, so this will probably not look okay then.