Blur mask demo

Started by bigben, August 01, 2007, 08:02:58 pm

Previous topic - Next topic

bigben

August 01, 2007, 08:02:58 pm Last Edit: August 02, 2007, 01:15:24 am by bigben
Hi All

I made this quick demo for Martin so I thought I'd post it here.  Attached is a TGD I whipped up to set up a blur mask to use with Photoshop's Lens Blur.  The settings shown in the TGD are for rendering the mask, showing what has been disabled (see lighting and atmosphere), and an additional render node added for the mask to save changing settings all the time.

The sky is black in the render so I used the magic wand to select it (and expanded the selection by 1 pixel) and filled it with white. You can see what happpens if you don't do this in the screengrab (note the sharp peak on the horizon to the right). If you're only blurring the foreground you don't need to do this.

The demo combines two masks to blur the foreground and background. You could use either of them on their own.  I haven't tried this on objects yet... should be interesting...

Tangled-Universe

Hi Ben,

Thanks a lot for your quick response to my IM and the clear explanation ;D
It's a lot easier than I thought. I've been looking for far too complex solutions *lol*
Within a few days I'll finish a render and I intend to use this technique, so I'll show you.
Thanks again, also for the .tgd  :)

Martin

cyphyr

Looks very useful. Is the mask you output basically a Grey scale "Z-depth" mask, ie the further away from the camera (or other user defined point) the more white (or black) the mask gets?
Richard
www.richardfraser.co.uk
https://www.facebook.com/RichardFraserVFX/
/|\

Ryzen 9 3900X @3.79Ghz, 64Gb (TG4 benchmark 6:20)
i7 5930K @3.5Ghz, 32Gb (TG4 benchmark 13.44)

bigben

August 02, 2007, 06:44:09 pm #3 Last Edit: August 02, 2007, 06:49:42 pm by bigben
Correct.  The sharp distance in this case is defined by two shaders. The difference between the near and far distances of the Far node should be at least twice that of the difference of the Near node.

efflux

The technique is cool but the problem is that it only looks good when you have something very near the camera because we would never see this narrow depth of focus in a distant landscape shot. This is why it looks like a small model. We are so used to looking at photos that we judge the realism of any render by how it conforms to what photos look like. Try the technique by having a fake stone or something very near the camera which can be in or out of focus. It will look very good.

Tangled-Universe

I don't fully agree, though I can imagine your thoughts. It depends on how much blur you add while using te mask. And "this narrow depth" is just a setting which can easily be modified to have a greater depth of focus. It's just a little trial and error, subtle blurring and usage of reference material if possible.

Martin

bigben

I don't agree either.  The degree of blurring in the demo was largely for demonstration purposes. If you were simulating a telephoto shot then you would expect a reduced depth of field with possible blurring in front of and behind the area of focus. If you wanted to be realistic you could calculate the depth of field for the equivalent lens/aperture combination you wanted to simulate <http://www.dofmaster.com/

For a better example try http://lucbianco.free.fr/2bgal/img.php?id_img=440 ;)

Tangled-Universe

Thanks for the link Ben, could be quite handy  :)

Martin

efflux

The screen grab may be a demo but I was just suggesting better ways to ultimately use the technique. Luc has used to it to great effect as in the link and on some other shots but it's quite difficult to get it to look right purely from our familiarity with photos. Actually even one of Luc's shots suffers from the problem:

http://lucbianco.free.fr/2bgal/img.php?id_img=433

Looks small.

Whereas this wider shot with no depth of field:

http://lucbianco.free.fr/2bgal/img.php?id_img=432

Looks very realistic.

However I think it's probably very difficult to get just right. I will test the technique myself.

No intention to be critical here just suggesting to look at photos very carefully for this technique. I know I couldn't get that narrow depth of field with my camera unless I was focused close to an object.

bigben

It can be quite difficult. It's hard to comment on someone else's work without knowing the FOV of the shot.  If you pay a lot of money for a fast telephoto lens with a wide aperture (or you shoot large format film like 4x5 or 8x10) you can get this sort of effect.  The viewing distance will also be a factor. If you're too close, you're artifically increasing the fov of the image that your brain has to interpret. If you move back from the screen you may find it looks a lot better. The second image looks more like a standard FOV, especially when you compare it to the previous image in his gallery.

I'm not sure how Luc did this as I couldn't get the shader to work on object (fake stones were OK). I can think of a hack involving multiple renders, but that would be a simulation only

The depth of field link I posted was for reference to assist with creating more realistic masks, although you would also have to figure out a way to calculate the outer limits of the blur mask on either side. I'll have a look at a later stage.