Possible to change "Focus on Object" in the middle of an animation?

Under Camera → Depth of Field, I can either select the target object using “Focus on Object” or I can manually set the distance from the camera to the object in number in the Focus Distance field.

The latter option allows me to change the value during an animation, but then I would have to calculate all the distances myself (things and camera are moving), which seems difficult. Can I just change the “Focus on Object” in the middle of an animation from one object to another? Or do I have to use “Focus Distance” if I want to change it?

It doesn’t seem that property was meant to be animated. Maybe someone will show up with a trick…

You might be able to use a Driver value for the Focus Distance. You might be able to python-script in a change in object based on the frame number.

Or you could just switch cameras. Use markers to change the active camera.

You could create an Empty to act as your focus point, and then move it during the animation. This can be done manually by setting keyframes for its location, or you could use constraints to copy the locations of the objects and animate the influence values.
There are also some ways to get a sort of autofocus functionality, search the forums for more.

1 Like