Interactive Depth of Field in OpenGL
This feature provides an approximation of the stillframe depth of field effect for OpenGL realtime rendering to enhance realism.
It is now possible to use cinematic Depth of Field in real-time OpenGL and CPU raytracing to apply blur to a scene, based on the distance in front or behind a focal point, to draw the viewer's attention to a specific subject in a shot.
Adjust the Interactive Depth of Field Quality from Ultra Low to Ultra High in 5 steps to keep the frame rate affordable, depending on user's graphic hardware.
The Depth of Field Focus Distance is part of the camera settings and can be animated in the Curve Editor, as well.
Enable Autofocus to set the focal point to the center of the image and make navigation in realtime scenes more intuitive.
A transition time, up to 100 frames, can be set to define how quickly the Depth of Field adopts to an object in focus in the center of the image.
How to Use Interactive Depth of Field
The interactive depth of field is enabled by activating the depth of field in the Camera Editor. All controls for the depth of field effect also work for the interactive depth of field.
The UI element for Focus Distance was moved. Previously, it was below the Focal Length. Now it is below the FStop.
There are a few new UI elements for interactive depth of field in OpenGL that we added to the Camera Editor > Camera Settings > Lens Attributes section:
Depth of Field
Formerly Enable Depth of Field.
Activates or deactivates the calcuation of the depth of field function, based on the selected setting:
- Off - Deactivates the depth of field.
- Stillframe - Enables Depth of Field only for stillframe rendering.
- Always - Enables Depth of Field for real-time and stillframe rendering.
Interactive DoF Quality
Enhances realism in OpenGL rendering in realtime. Select from quality settings of Ultra Low, Low, Medium, High, and Ultra High. The computed image will be as good and realistic as technically possible, which is ideal for presenting to decision makers. The higher the setting, the higher the quality of the result, but the slower the performance. Internally, this controls the number of rays and interpolation steps used. The ray step size remains the same.
The internal settings controlled by the quality may change in future releases.
Other things to note:
- Interactive Depth of Field is a post processing effect. Only content visible on the screen is processed. This can lead to artifacts at the edges of the screen.
- At present (as of version 2021.3), this does not work with display clusters.
- The more blur there is, the slower the performance.
- A limit was added to prevent the blur from becoming too large. The ratio between aperture size and fstop cannot be larger than 45.0.
- The effect require excessive performance. It should really only be used with high-end hardware.
Autofocus
Automatically sets the focus distance to the distance from the camera to the object at the center of the screen.
Transition Frames
Only available when Autofocus is enabled.
Sets the number of frames for transitioning from the current focus distance to the one set by Autofocus. Use this when trying to avoid sudden changes in focus distance while navigating or for artistic effect. When stillframe antialiasing is activated, it won’t be triggered until the transition is finished. The range is from 0 to 100.