Technique / Discuss

Current Discussion

Fake-LOMO Adobe Photoshop Script
Latest: 9 days ago
Getting the moon much larger than usual in wide angle shots in one exposure
Latest: 3 weeks ago
Choosing best aperture for portraits
Latest: 6 weeks ago
Four color treatments I'd like to unlock.
Latest: 2 months ago
How do you levitate in photos?
Latest: 3 months ago
merging pictures
Latest: 3 months ago
Long-Exposure Night Photos
Latest: 4 months ago
Extension tubes for greater Depth of Field
Latest: 6 months ago
Nightclub/party/concert photography in the style of Nikola Tamindzic?
Latest: 6 months ago
Hello!
Latest: 7 months ago
Composition technique - External Framing with a pallet wood frame
Latest: 8 months ago
AurynCam app for iPhone(FREE)
Latest: 9 months ago
More...

Search this group's discussions

Depth of field - faking it

view profile

Kaddy says:

OK this is related to a number of previous threads, and expands upon getting the most from your point and shoot but I thought it warranted a spot on its own, hope you don't disagree.

I use a cheap point and shoot, the trouble with using DOF (depth of field - for a great description see this) as a viable photographic technique is that the aperture is so small that my DOF is enormous. What to do?

I'm going to outline a digital trick using Photopaint, but the technique translates directly to photoshop.


1) Outline the object you are interested in keeping in focus

2) Invert the mask so now the rest of the photo is highlighted

3) Apply the Gaussian blur function (effects>blur?gaussian), adjusting the degree of blur based on what you are looking for.

Hey presto you have Depth of field:

Focussed Trumpet player

Want more? Up the degree of blur:

Exaggerated Trumpet focus

Remember though, the more you blur the background the better you cutout should be.

(ed.: See also Partial Black and White Photos and Messing With Masks)
Posted at 9:53AM, 22 April 2005 PDT (permalink)

view photostream

Mr Lunatic Fringe says:

The problem with that is that it doesn't simulate the bokeh effect that is present in a genuine OOF area. The other problem is that is doesn't simulate cariations on depth based on distance from the film plane in 3d space. There are photoshop plug ins that CAN do this, but they are very very expensive. Photoshop CS has the lens blur option, which looks slightly better than guassian blur, but is not completely convincing.
Posted 98 months ago. (permalink)

view photostream

Mute* says:

Personally I don't think the gaussian blur produces as nice effect as the lens blur filter does.

Another advantage of using the lens blur filter is that you can use a layer mask as a 'guide' for the blur. That means using gradient fills in the mask you can create some realistic and subtle effects.

When my only camera was a point and shoot I used this technique quite a lot on images like this:
mute.rigent.com/index.php?ladat=2005-02-05
and the top one here:
mute.rigent.com/index.php?ladat=2004-12-20

And to more obvious effect here:
mute.rigent.com/index.php?ladat=2004-11-11
and here:
mute.rigent.com/index.php?ladat=2005-03-08
(the second link includes a description of the technique in the comments.)

Using the layer mask you can create a map of the visual planes in the image and connect them using gradients of various tonal ranges.

Also, I'm not sure what technique people use for 'cutting out' the various planes in an image for this but I favour using the lasso. You can make a rough outline and then using the tool in combination with the alt and shift keys 'sculpt' the selection to your subject.
Posted 98 months ago. (permalink)

view photostream

Kaddy says:

Ah thanks for that mute-photoblog, I have been wondering how to apply a gradient effect, thus far I have cut layers out of the image and added more blur to each layer then added them together, to give a relativistic focus effect:

Halverson's graded

The effect is subtle here, I didn't push it too far so that the joins would be invisible.

My cut out technique is to use the mask brush first and then tidy up using a much finer brush. I also use the magic wand.

@Lunatic Fringe, Agreed bokeh aren't possible with this technique, perhaps combining this with the whole image arithmetic technique GustavoG published may work?
Posted 98 months ago. (permalink)

view photostream

puja says:

i'm a big fan of doing this, but adding a bit of noise to make it look less 'digital'
Posted 98 months ago. (permalink)

view photostream

ptufts says:

Picasa does this effect, too. You pick the area of the photo you want to remain in focus, and it progressively blurs the rest.

--Pat
Posted 98 months ago. (permalink)

urbandiscount [deleted] says:

it just occurred to me that replicating DOF effects in photoshop is the pushing and pulling from the era of film. ;)
Posted 98 months ago. (permalink)

view photostream

Mute* says:

The effect in picasa isn't really depth of field though, it's more like the effect you get with a lensbaby where the focus is applied regardless of visual planes.

The lens blur filter in PS CS has a nice noise generator to make your blur fit in.
Posted 98 months ago. (permalink)

view photostream

chadmiller says:

*grumble, grumble*

Unless the amount of blur is a function of the distance from the "film", then it's just selective blurring. A uniform blur will be somewhere between merely distracting to painfully obvious. I think that's really puja's problem. mute-photoblog has it right.

Unless you can reconstruct the depth dimension in some way, you've lost valuable information, and faking a short focus-field depth will be really hard.
Posted 98 months ago. (permalink)

view photostream

th3ph17 says:

the lens blur filter in PS CS can apply a more realistic lens blur using an alpha channel/selection as a mask, so you can basically paint in your different planes in different tones of white or black [you can do either] and then use that DOF "map" as the lens blur map. Works really well...and you can pick different lenses for different shapes in your blurred highlights.

i've been using CS since it came out...[and PS for almost a decade] and I didn't notice lens blur until about 3 weeks ago. old habits.
Posted 98 months ago. (permalink)

view photostream

shimonkey says:

One way of reconstructing some amount of depth dimension is to use a gradient mask that slowly blends the slightly OOF plane to the completely out of focus plane. Takes a lot of work, but you can get some nice results.

It's true that these techniques are not exactly like true DOF but in response to Chad's comment, I'd like to note that for me, having Every Single Thing In The Background In Clear Focus is far more painfully distracting, which makes it worth it to attempt to approximate DOF.
Posted 98 months ago. (permalink)

view photostream

fd says:

I played with this a little but while trying to achieve a different effect. Using multiple gradient masks you can blur different parts of the image in different amounts. Like shimonkey said, you can approximate DOF effects with this if you're careful. It is easier with scenes that are easily divided into multiple planes.

Toy horses Focus
Posted 98 months ago. (permalink)

view photostream

Mute* says:

Definitely, if you're careful with the 'map' you create for the lens blur then you can get a good approximation.

This is one of the photos I used the lens blur filter on and the layer mask image that I used as a guide for the lens blur filter. (black for in focus, white for out of.)






Posted 98 months ago. (permalink)

view photostream

ngabrish says:

Thanks for the illustraition of your technique Mute. I have been using layer masks for a while now but for either 'hard' element selections or large gradients but I had never thought to use a combination as shown here. Now I just need to find a good use for it before I forget.
Posted 98 months ago. (permalink)

view photostream

Mute* says:

I find it useful to create the 'solid' elements first you can create a selection from them, reverse it and then apply the gradient to the selection without the gradient interferring with the solids.

If you alt click a layer mask you can see it's literal representation, as above. Most people probably know that but I was clueless until I did it by accident!
Posted 98 months ago. (permalink)

view photostream

alephnaught says:

shimonkey and Mute*, I've been recently using that trick of combining hard masks and gradients to get DOF style shots from my digital point-and-shoot.

Music Under Construction (18 April 2005)

The there's a "hard" mask around the subject, and a gradiated horizontal mask going from his position to the trees at the background. The "sharp" version of the pic goes through these masks, on top of a blurred (and slightly darkened) version of the same image. The main thing I found was to be reasonably subtle with the background blur- if it's too much, it wouldn't match up to well with the foreground.

BTW Mute, I know what you mean about the Lens blur versus the Gaussian blur. (I've only just found about that recently, th3ph17 as well!)
Posted 98 months ago. (permalink)

view photostream

f8125 says:

Selective blurring seems to make the picture look like its a macro shot too like Mute's tram picture, which is very cool !!
Posted 98 months ago. (permalink)

view photostream

Kaddy says:

I have to agree with alephnaught that a very subtle graded effect is required (which is what I employed here ) or it does get to look very odd. Unless that is the effect you are looking for....
Posted 98 months ago. (permalink)

view photostream

alephnaught says:

f8125, never thought about the "macro" look, but now you mention it, I see what you mean. It must be that because people normally associate depth of field with objects that are close up in comparision with the background, they apply that perception to DOF shots where the objects in focus are much further away.
Posted 98 months ago. (permalink)

view photostream

alephnaught says:

OK, I've experimented with fake DOF again, on this series of shots, this time using lens blur. :)

Man With Accordion: 04 (23 April 2005)
Posted 98 months ago. (permalink)

jwk [deleted] says:

I really like the look of the faked DOF shots. I don't think anyone would mistake the DOF as "real", though -- something just seems a little "off" about it. Having said that, there is my quick-and-dirty attempt:

All Beef
Posted 94 months ago. (permalink)

view photostream

blipfish says:

Mute, if you don't mind my asking?...

Is the layer mask image you used a generated one from the original, or is it a hand-tailored map (drawn by hand)?

I use this often in one of my 3D programs - but it creates such greyscale images. I don't know how to achieve this in PSCS2.
Posted 86 months ago. (permalink)

view photostream

ryran says:

If I'm understanding your question correctly: methinks the grayscale image of the mask he posted was obtained by simply getting a screenshot after alt-clicking the layer mask (as he mentioned in his next comment).
Posted 86 months ago. (permalink)

view photostream

blipfish says:

Oh, I'm sorry... I see - thank you!
:)
Posted 86 months ago. (permalink)

view photostream

phil dev says:

Here's my most recent attempt at DOF using a hard mask and gradient controlled gaussian blur. The mask was a bit messy, but if not examined too close, it works for me.

Keeping Up 2
Posted 86 months ago. (permalink)

view photostream

Mikelo says:

This one I did a bit too quickly..
But I liked the result.
ruta del cares
I separated a second layer with the main subject and then blurred the whole background.
Originally posted 86 months ago. (permalink)
Mikelo edited this topic 86 months ago.

Would you like to comment?

Sign up for a free account, or sign in (if you're already a member).

RSS 2.0 feedSubscribe to a feed of stuff on this page...</!!> Feed – Subscribe to Technique discussion threads