I don’t think there’s any way short of looping through all the frames. I think I’d apply an expression like this to a slider: (didn’t test this – there may be typos)
C = thisComp.layer(“Camera 1”);
L = thisComp.layer(“Light 1”);
maxDist = 0;
for (t =0; t <= outPoint; t += thisComp.frameDuration){
maxDist = Math.max(maxDist, length (C.position.valueAtTime(t), L.position.valueAtTime(t)));
}
maxDist
Then convert the expression to keyframes so it doesn't have to calculate every frame.
Dan
OK – I think i get it now. Couldn’t you just convert the camera’s position into the plane’s layer space, put the other camera at the same positon except for z, which would be the opposite value, and then do the same thing for the point of interest?