Depth of Field

Using Depth of Field

The "Depth Of Field HQ Blur" effect increasingly blurs regions of the image based on their deviation from a specified distance from the camera. (Notice that the cube and same-distance floor are in focus while the closer cone and farther sphere are blurred.)

For this effect to work well, you need to adjust the Clipping Start and Clipping End properties of the camera for the Layer to 'frame' the content. (You ideally want the largest possible value for Start and the smallest possible value for End.) After you do this you can use the properties of the effect in the Inspector palette to adjust the effect.

  • The Focus Distance property specifies the distance from the camera where the content is in perfect focus.
  • The Depth of Field property specifies a the distance around the Focus Distance where items are fully in focus. The focus then fades away to fully blurred by the same distance on both the near and far sides.

For example, a Focus Distance of 100 and a Depth of Field of 20 means that everything that is between 90 and 110 units away from the camera will be fully in focus, items at a distance of 70-90 and 110-130 units will experiencing variable blurring, and everything closer than 70 or farther than 130 will be fully blurred.

To make it easier to set up this effect, turn on the Debug Focus Rendering checkbox for the effect:

When enabled the scene will switch to a mode showing the amount of blur to be applied. Anything completely fogged in white will be fully blurred, anything that is fully black will be fully in focus, and shades of grey represent varying amounts of blur in between. You will find it far easier to turn on this mode and just scrub the values in the Inspector palette until the content you want is bracketed, compared to performing distance calculations and entering numbers.

Available under certain Qt licenses.
Find out more.