Problems with Depth of Field in EEVEE

Good day! The camera cannot focus on objects with alpha channel. :confused:


i hope they add some kind of ground truth jittered depth of field, the current one also gives me artifacts with hair

Yes this is because we use the depth buffer for Depth Of Field and theses are not writting to depth.

A ground truth algorithm would indeed be possible (and quite easy) but really high samples (thousands) would be needed to for it to appear without visible banding.

Source Filmmaker uses ground truth jitter and the banding isn’t that bad.
64 samples:

8 samples


They get away with it (in this case) because of Low Dynamic Range and small circle of confusion. If you have a really bright spot (like a sun reflection) you will need more than that.

Yeah, maybe it’s an acceptable tradeoff, or both post processed and ground truth could be combined

What does that show? 8 bright spots with 64 samples? Something else?

Yes, that’s it. Depth of field in Source filmmaker. Showcasing what Clement says

How does it look with 1024? That seems to be the limit I found by looking for tutorials. EEVEE samples control goes to 64 times that.

Also, does it allow saving each sample as separate file? Unable to find that, so maybe impossible. I would like to test something with such set of images.

OTOH, about dynamic range, it seems you can save to .PFM, giving you 32 bit per channel (which I hope means true HDR and not just wasted bits).

You can increase the SFM samples up to 1024, and yes, it looks like a perfect circle (oval in this case) but the problem increases the wider the depth of field is. And 1024 samples for eevee is a bit too much for my time budget.

Are there any updates regarding this?

I came across this problem yesterday. I was really confused because the depth of field was clearly changing as I moved the target object around, but it itself was still blurry. And was further confused when it seems to be working just fine with other geometries. I was going to report a bug then found it’s a known issue.

This seems like such a basic thing to expect, so that this problem exists surprised me.