Is there a way of blurring progressively?

DT 5.2.1

Is there a way of blurring progressively some background?

I’m currently using diffuse/sharpen but the it’s only 1 blur. I’m trying to simulate depth of field (mostly my screw-up)

Thanks

Use a mask and feather it or use the gradient drawn mask.

And keep in mind that for most modules you can use several instances

1 Like

If you’re looking to go further in the DoF simulation, you can use the “depth anything” model to generate depth aware masks to apply your blur.
This is easier to apply with gimp though.

You can use multiple instances of modules. The blurs module is specifically designed to simulate lens blur.

or hear me out … dont fake bokeh?

I hear that having things in focus and visible is ok.

3 Likes

used it on this one for example, as an FX

1 Like

I’m trying to fake some dof because I screwed up as mentioned in my original question.

When Cartier Bresson was 80 years old after a good lunch with Helmut Newton, they went to a large garden in Paris, les Tuileries. They took photos and as Helmut Newton recalled that some of HCB photos must have been fuzzy because of HCB hands were shaking a lot. Henry Cartier Bresson said:

1 Like

Sometimes a gradient mask can be very effective at creating progressive blurring. In the example below I used bloom in diffuse or sharpen module to soften the background in a progressive manner. This technique I usually do in GIMP for easier control with layers and layer masks. But it can be done in DT. I have used a snapshot to show effect on left compared to original on right.

The trouble is that with real lens blur, the radius grows the further we are from the focal plane. Adding a blur with a large radius and mixing in gradually with the original picture is not the same. And even if the background is at the same distance from the foreground, masking is applied after the blur, so the blurred foreground bleeds into the background (even though, in the final image, the blur is removed from the foreground by the mask) – see the recent thread Blur + masking -- Any way to avoid bleed through?.

3 Likes

This may be true, but I suspect the iPhone and Samsung phones are not getting hungup on this when they fake their soft backgrounds for portraits. The example I gave with the elephant was very rough to show the principle. :slightly_smiling_face:

They often have depth maps from a secondary camera, or created computationally / via ML / AI, so they employ different blur radii for different parts of the image (e.g. they never blur the foreground subject).

they actually do it very well for some images. It is impressive. I guess this is one of those AI would be good moments. Maybe when you finish with agx development you can move on to a blur module that does progressive blur :nerd_face:

In fact if it was possible to map the opacity of a mask to a parameter of a module, it’d be possible in DT I guess ?
Maybe it already is possible in VKDT ?

It’s not so simple, each area needs a different blur radius, depending on the depth. Surely it’s possible (other software support this), but I don’t know how difficult it would be, and which developer would be interested in picking it up.

THIS. I’ve niggled at this before and often been surprised how hard it seems to be to do in practice.

1 Like

In theory. But then you have to create the mask, which may not be trivial. And you still need a way to avoid “blurring in” parts of the (sharp) subject (where it is in front of the background, the edge should stay sharp…). You could perhaps do that by inverting the blend order in the proper instance(s)

One may take a look at the blender compositor: Here, defocusing based on depth buffers is often a use case in post-processing of renderings.
https://docs.blender.org/manual/en/latest/compositing/types/filter/blur/defocus.html

In principle, one may use generated depth maps like from depthanything. However, the resolution of depth maps and handling of blurry / fine detail at edges of objects (e.g. hair) is still challenging.

1 Like

The topic is about blurring; bokeh is not blur, nor is it the degree thereof.

The blender compositor can have a lot more information about the image than you can get from a simple photograph (Z-maps are mentioned).