Depth of field

DOF is currently the Most wanted graphics upgrade I want in Armory since it can remove much detail from the rendered result while Adding AMAZING graphical upgrades, I just wonder when will this be implemented?

Armory already has Depth of Field implemented:

DOF

then i cant seem to add it? i’ve tried the original dof method (On the tiny camera while having an empty object tracking it blah blah blah…) and there’s no other dof method i know of?

You just have to set the “Focus Distance” value and the “F-Stop” value:

Settings

Here’s an example with “Focus Distance” set to 1m, and the F-Stop set at 128:

DOF_min

The settings works sort of like real world lenses, where your focus point (In Armory it’s hardcoded to be in the exact middle) is used to decide which part to blur. In the shader, it’s based on a depth map calculated from the point you’re targetting. So for instance, if you want a more shallow depth of field, try lowering the F-Stop value:


Aperture-Graphic

There’s also the focal length, although that shader value is hardcoded in Armory to 160mm.

5 Likes

seems like a focus on an object doesn’t work! thanks for taking the time to make this, @naxela!

you also need to have enabled both “Post Process” and “Compositor” checkboxes (no sub-settings needed) in the Armory Render Path tab.

it is a bit flaky though.

Load the “animation_instanced” example scene,
select the camera, go to its camera properties
and set “Depth of Field > Distance” to 3 (leave the Focus field empty)
hit F5 and rotate the camera so that one of the surrounding white cubes is close to the viewer,
you will see that the focus point starts shifting uncontrollably