Procedural Auto Focus

This Geometry Nodes modifier automates camera depth of field adjustments by dynamically calculating the distance to targeted objects. Users assign a camera and target collection, and the system uses point projection methods to ascertain the average focus point. It includes controls for smooth focus transitions with adjustable acceleration and deceleration to mimic real-world camera adjustments.

Built-in debugging allows users to visualize the projection points in the viewport. The projection layout can be configured using a circular array with adjustable radius and resolution, or a standard grid with customizable dimensions and point counts. It includes four distinct projection methods to adapt to different scene requirements and a fallback distance for situations where rays fail to hit a target.