-
digital dolly zoom following tracking points…
Ok, so my question is:
I have a 4k footage and my output is going to be 1080, this allows me to do a dolly zoom effect in post by cropping.
Animating scale with simple keyframes is very easy and effective, but my aim is to keep the size of the object I’m dollying towards perfectly constant.
My idea is tracking two points of the object, they will get further or closer depending on the camera movement.
Is there a way to use the distance between those two points to determine the exact amount of zoom I need?What I came up with is the attached expression
pA and pB are two nulls tracked to the two furthest point on the object, the rest is easy to understand.
The tricky part is that 543.8 … This is the maximum distance between the two points and of course explicitly putting that value in the expression is very dumb as I’d have to edit the expression every time I use it on something different.
So the question is… is there a way to get the maximum or minimum value of “dist” in the whole timeline and use it as a parameter? I guess the answer is no, but it’s worth tryingpA = thisComp.layer("A").transform.position;
pB = thisComp.layer("B").transform.position;dist = length(pA, pB);
scale = 543.8/dist*100;
[scale, scale];