Combining Classic and Modern: A New Approach to Camera Simulation
canvatechblog.com
canvatechblog.com
Personally, I think we are quite a long time away from being able to computationally blur photo backgrounds acceptably well.
Even if there's in interpretation function on top of this to distribute the depth more meaningfully (e.g. storing 1/depth to prioritise detail on closer objects) you still, in the end, have banding.
When we developed this approach we validated it against existing techniques and I'd still like to think we have the smoothest, least prone-to-banding technique for simulated defocus out there; the maths was tweaked to specifically address this.
Of course, there are limits - aliasing can only be mitigated so much. But that's why we're still working on it and this kind of feedback is enormously useful (thank-you!) in helping us move closer to a virtual camera that feels more like a real one!
Judging by the extreme colors of the example objects this may not be super clean in real cases.
How it goes in practice - even for high-end VFX shops - is that the result looks and feels right. As an example - the depth maps used in high-end VFX (especially for stereo conversion) is sometimes hilariously and incredibly inaccurate (e.g. having depth on a foreground spaceship but also depth on a planet thousands of kilometers away).
Accuracy improvements in absolute modeling in the real world may not translate in a visible, meaningful way when put through a simulation that acts upon it; instead we focused (ha!) on improving the light modeling process from a generic 'textbook' example of kernel-based simulation to one that more closely matches how light moves through an actual physical camera.
And yeah, the colours are bit punchy but that's my fault - my photography aesthetic unfortunately is tuned towards ludicrous colour, and I probably need an intervention for someone to take my cursor away from the vibrance slider :P
We optimised the approach to more closely resemble what happens in and with an actual camera. As to whether it looks good or not - that's entirely subjective. Try it out; it might be that as an individual you prefer to dial down the defocus etc (I'll admit - the examples are a bit exaggerated).
My example https://imgur.com/a/pitVg0K .. weird slimmer of tiltshift-focus on the ground, "one pixel" non blurred border on one side of the legs, harsh edge on the other side and blur bleeding into the hat part .. nothing I would use.
Disclosure i do work with pixlr.com.
As far as the tilt-shift look goes - being precise I think you're thinking of tilt-shift miniaturisation. In cases where you're shooting with really shallow depth of field - like wide open on a portrait lens, or with a large format camera or yes, a tilt-shift lens in the anti-Scheimpflug mode - you absolutely can have foreground elements blurred out. I wrote a bit about that here: https://bhautik.org/tilt-shift-a-diy-guide/
I'd love to look at the source image for your example; some of this is explainable, some not so much and I'd like to understand why. The sharp aliasing around the edges is weird, and that looks like a legit bug, as well as the blur leakage (we're trying to prevent that!). Also, it looks like the depth was incorrectly estimated for the feet so it's lumped them into the foreground and blurred those too.
An easy fix is to suggest trying it with less blur, but there's other stuff going on. We'll look into it :)