DOF Depth of Field Halo Artefact

Hey, we are running into an issue with a Depth of Field “halo” artefact. Circled in red is where it’s most visible in our repro kit.

[Image Removed]

The only way we found we can fix this is by switching to pathtracing and in the Post Process Volume checking on the parameter Reference Depth of Field.

Pathtracing with Reference Depth of Field OFF (default):

[Image Removed]

Pathtracer with Reference Depth of Field ON (desired result):

[Image Removed]

Is there a way to get the Lit result to look like the Pathtraced result with Reference Depth of Field turned ON?

Thanks

Steps to Reproduce

  1. Using 5.4 Release, unzip and load dof_halo project
  2. Load the Level Content/dof_halo/L_dof_halo
  3. Switch to viewing through CineCameraActor
  4. Switch to pathtrace and back to see the halo in Lit mode

Hi,

thanks for the repro project. If you are able to upgrade to Unreal Engine 5.6, there is a new feature called Petzval Bokeh which can greatly reduce the severity of this halo artefact and brings it closer to the path traced reference DOF (see screenshot below).

[Image Removed]

Would this work for your project? If an upgrade to 5.6 is not possible, you can try to cherry pick the relevant commits that implement the Petzval effect into 5.4.

Let me know if this helps,

Sam

Hi Sam, the CLs worked partially, but they result in a lot less DOF in our scene then without it, is there anything that’s missing potentially comparing to 5.6?

Hi,

It’s possible other commits are required to get the same result as in 5.6. I’ve searched the Petzval Bokeh author’s commit history and these seem relevant:

Fix issue where DoF focal plane is inconsistent between different screenpercentages at low post-process quality settings.

[[DOF] Fix bokeh squeeze regression in scatter pass pixel shader](https://github.com/EpicGames/UnrealEngine/commit/7979bc64aac4825243a92624ad669fdde0b02dd9)

[[DOF] Fix typo in DOF scatter vignetting due to merge error.](https://github.com/EpicGames/UnrealEngine/commit/c0711863f26edd48d1b5a2cdcff45626ad40956c)

Please let me know if these work for you.

Sam