Hi Walter, I’ve played a bit with your script. It looks promising but needs more tweaking.
The Scale Expression seems to be more accurate with this script –
refTime = framesToTime(effect("Reference Frame")("Slider"));
//distance = length(sub(position.valueAtTime(refTime)[2], thisComp.activeCamera.position.valueAtTime(refTime)[2]));
distance = length(sub(position.valueAtTime(refTime), thisComp.activeCamera.position.valueAtTime(refTime)));
scale * (distance / thisComp.activeCamera.zoom.valueAtTime(refTime))
I’ve essentially removed references to [2] in the position array. I believe this provides a more accurate result.
The refTime variable is a good feature that you added. There’s still more testing to be done as I’m still having issues with the AnchorPoint location
I’ve been testing with these two clips, Blaster Walk HD and Survey Shot HD from here https://www.hollywoodcamerawork.us/trackingplates.html
While testing, it is important that the freeze frame/clean plate is created on the frame where the insert area provides itself at its highest rez. This precludes the first frame on a fair number of shots.
I intend to test on the 1st, last and a few frames in the middle. The z-position of the area/object to be removed is also crucial since the higher rez requires more accuracy.
Also important, it seems, is the type of camera movement – things get tricky with larger camera moves. Hence, it’s best to test on footage with large camera moves.
Cheers
RoRK
Intensive mocha & AE Training in Singapore and Other Dangerous Locations
Imagineer Systems (mocha) Certified Instructor
& Adobe After Effects CS6 ACE/ACI