Approve the Cookies
This website uses cookies to improve your user experience. By using this site, you agree to our use of cookies and our Privacy Policy.
OK
Index  •   • New posts  •   • RTAT  •   • 'Best of'  •   • Gallery  •   • Gear  •   • Reviews
Guest
New posts  •   • RTAT  •   • 'Best of'  •   • Gallery  •   • Gear  •   • Reviews
Register to forums    Log in

 
FORUMS Post Processing, Marketing & Presenting Photos RAW, Post Processing & Printing 
Thread started 27 Sep 2005 (Tuesday) 19:55
Search threadPrev/next
sponsored links
(this ad will go away when you log in as a registered member)

Depth Maps for Lens Blur Filter in PhotoShop CS

 
rpolitsr
Moderator
Avatar
5,977 posts
Gallery: 5 photos
Likes: 25
Joined Jun 2005
Location: Quito - Ecuador
     
Sep 27, 2005 19:55 |  #1

Depth Maps for Lens Blur Filter in PhotoShop CS

FOREWORD

It began in the POTN G-Series Speed Challenge #32: Point – Counterpointhosted by Bryan Bedell.

To better fulfil the challenge requirements, I used PhotoShop CS to create the depth of field in my photo, shot with the Pro1.

In the contest thread I briefly described the method used to create it using the Lens Blur Filter and a Depth Map reference built on an Alpha Channel. Below are the links to the original image (resized), the alpha channel and the final image after applying The Lens Blur Filter:

Counterpoint_rpolitsr_​OrigPictur_480.jpg (external link)
Counterpoint_rpolitsr_​AlphaChann_480.jpg (external link)
Counterpoint_rpolitsr_​gradualDOF_480.jpg (external link)

After the kind comments written by Bryan Bedell, BottomBracket, MegaTrixel and abat, I decided to post here a step by step description of the method that I used there, but using a photo that allows a clear description.

Earlier, in the hobby contest, abat posted upon my request an extra image of his beautiful scale model of the HM Bark Endeavour, this post is in retribution to his deference.

DISCLAIMER

I am not pretending that the method described below is all mine, neither that it is the best nor the easiest, just that I enjoyed creating the effect this way and it yielded an interesting result.
I recreated for the Depth Map the procedures used by some 3D modeling and rendering programs to calculate what they call Z-Depth Channel. The main difference is that the 3D programs automatically calculate the Z-Depth Channel upon request and here the user must use subjective criteria to manually build the Depth Map. The results are rewarding, though.

ABSTRACT

This tutorial will allow you to apply the Lens Blur Filter of PhotoShop CS over a sample image using a Depth Map image provided.

I will focus mainly on how to create the Depth Maps and put them in Alpha Channels for their use with the Lens Blur Filter.

Following this step by step example you will learn the basic principle to apply it to your own pictures.

There are a lot of things about PhotoShop CS that I ignore. If you know a better procedure to perform a given task, feel free of use it instead of mine.

If you already know how to work with PhotoShop CS, go fast over the steps, if you are really new to it consult the program help for details not described here.

THE SAMPLE IMAGES

IMAGE: http://sites.google.com/site/rpolitsr/r_polit/varios/onthenet/tut1/sample1_thumb.jpg
IMAGE LINK: http://sites.google.co​m …onthenet/tut1/s​ample1.jpg  (external link)
IMAGE: http://sites.google.com/site/rpolitsr/r_polit/varios/onthenet/tut1/lineargradient_s1_thumb.jpg
IMAGE LINK: http://sites.google.co​m …ut1/lineargradi​ent_s1.jpg  (external link)
IMAGE: http://sites.google.com/site/rpolitsr/r_polit/varios/onthenet/tut1/depthmapsharp_s1_thumb.jpg
IMAGE LINK: http://sites.google.co​m …tut1/depthmapsh​arp_s1.jpg  (external link)
IMAGE: http://sites.google.com/site/rpolitsr/r_polit/varios/onthenet/tut1/depthmapsoft_s1_thumb.jpg
IMAGE LINK: http://sites.google.co​m …/tut1/depthmaps​oft_s1.jpg  (external link)
IMAGE: http://sites.google.com/site/rpolitsr/r_polit/varios/onthenet/tut1/LensBlur_s1_thumb.jpg
IMAGE LINK: http://sites.google.co​m …enet/tut1/LensB​lur_s1.jpg  (external link)


Save the images to your hard disk using save target as…
An alternate method: click the thumbnails and save the full size 510x800 images from your browser. The five files will use less than 230KB of your hard disk.

To preview the depth of field created with Lens Blur in the sample image, click the LensBlur_s1.jpg thumbnail.

THE DEPTH MAP

The Depth Map is a gray scale representation of the distances from the camera to the objects that are part of the image.

The closest object represented will be black, the farthest, white and all the other objects in between will be assigned different shades of gray.

First, analyze the image to isolate the objects.


For this example I defined five objects:

1. The cleaning machine and its driver.
2. The crowd in front of the top right building.
3. The top right building, the people crossing the street and the bus, because all of them are at the same distance from the camera.
4. The far buildings at the top left.
5. The tiled floor and the street.

The objects 1 to 4 may be accurately represented by flat silhouettes painted with a solid shade of gray.

The fifth object, the floor, changes its distance continuously. It will be represented more accurately by a linear gradient that is black at the bottom and white at the top of the photography. You may search in the PhotoShop CS help for ‘Applying a gradient fill’ and read how to create a linear gradient.

I usually begin with the linear gradient in a new layer and then paint the objects’ silhouettes over it from far to near. Using that order, you do not need to draw an accurate mask for the hidden parts of the overlapping objects.

The best method to determine the shade of gray for each silhouette is to use the Eyedropper Tool to pick the color from the linear gradient at the base of the silhouette.

TIP: To create your own Depth Maps, work on a copy of the original image in a different layer.
When the mask to isolate an object is ready, select the layer with the linear gradient and use the menu edit>cut before painting with the Paint Bucket Tool.

NOTE: To further improve the Depth of Field simulation, I included in the lower left of the Depth Map the six foremost green posts.
The problem without the posts mapped is that the base of each post is sharper than its top creating a weird effect. In the remaining post the effect is almost unnoticeable.

BUILD THE SAMPLE ENVIRONMENT

Load the images provided as layers of the same image in PhotoShop CS:

1. Open sample1.jpg in PhotoShop CS
2. Open lineargradient_s1.jpg
3. Use the menu Select>All
4. Use the menu Edit>copy
5. Close lineargradient_s1.jpg
6. Use the menu Edit>Paste
7. Repeat steps 2 to 6 with depthmapsharp_s1.jpg
8. Repeat steps 2 to 6 with depthmapsoft_s1.jpg

At this point you have an image with background and three layers.
The layers 1 and 2 are for your reference or to reproduce the individual masks and create quickly your own Depth Map from scratch. The layer 3 has the finished Depth Map, including the application of a Gaussian Blur (radius 0.3) to lightly soften the borders of the silhouettes.

Now, you will copy the finished Depth Map to a new Alpha Channel:

1. Use the menu Windows>Layers to open the layers palette
2. Select layer 1 in the layers palette
3. Use the menu Select>All
4. Use the menu Edit>Copy
5. Click the channels tab
6. Click the third icon (next to the trash can) in the bottom of the channels palette to create a new Alpha channel.
7. Use the menu Edit>paste.
8. click the layers tab
9. Repeat steps 2 to 8 with layer 2
10. Repeat steps 2 to 8 with layer 3

You can delete layers 1 2 and 3 after creating the Alpha Channels.

USE THE LENS BLUR FILTER

Now you are ready to use the Lens Blur Filter.

Duplicate the background with the sample image and select it in the layers palette.
Be sure that the selected layer is visible and unlocked.
Hide all the layers above the selected layer in the layers palette.
Use the menu Filters>Blur>Lens Blur…
The lens Blur dialog pops up.

Preset the Lens Blur controls as follows:

Preview check box, checked
Faster Radio Button, selected
Depth Map Source dropdown list, select the desired alpha channel (Alpha 3 has the finished Depth Map)
Blur Focal Distance Slider, will be set later
Iris Shape, Hexagon (6)
Iris Radius, 12
Iris Blade curve, 20
Iris Rotation, 60
Specular Highlights Brightness, 0
Specular Highlights Threshold, 0
Noise Amount, 5
Distribution, Gaussian
Monochrome check box, checked

Now you can play with the Blur Focal Distance Slider, with the Iris Radius and with the different Depth Maps available (Alpha1 Alpha2 and Alpha3).

Compare the results in the preview window with different settings.

When you are done, change preview to More Accurate, confirm the effect and click the OK button.

TIP: Instead of changing the distance slider, you can click inside the preview image to get the clicked spot in sharp focus.
I worked out the Depth Map to make the cleaning machine and its driver the main subject. Click over them to achieve the intended effect.

CONCLUSION

I hope this will help you to enhance the use of Depth Maps.
If you find something that is wrong or not clear, please let me now.

ABOUT THE SAMPLE IMAGE

I left the sample image out of a series of Street Candids because it is not the best example of the Pro1 capabilities, but it has just five big elements on it and the correct perspective for the tutorial.

Rafael Polit


rafael
Canon EOS Rebel XT, EF-S 18-55mm f3.5-5.6 II, EF 50mm f1.8 II, EF-S 55-250mm f/4-5.6 IS STM, speedlite 430EX, basic filters set.
My photo galleries (external link)
Marketplace: PAYPAL GIFT NO LONGER ALLOWED IN POTN

  
  LOG IN TO REPLY
sponsored links
(this ad will go away when you log in as a registered member)
Don ­ Ellis
Goldmember
1,538 posts
Likes: 3
Joined Sep 2001
Location: Hong Kong
     
Sep 27, 2005 20:38 |  #2

Hi Rafael,

I haven't had the time to read your tutorial or try it, but I do know a lot of time, care and attention when I see it. Thanks a lot for this tremendous effort.

Don




  
  LOG IN TO REPLY
rpolitsr
THREAD ­ STARTER
Moderator
Avatar
5,977 posts
Gallery: 5 photos
Likes: 25
Joined Jun 2005
Location: Quito - Ecuador
     
Sep 28, 2005 12:25 |  #3

Thank you Don.
I hope you can find the time to test it. Any comments from you will be appreciated.
Rafael


rafael
Canon EOS Rebel XT, EF-S 18-55mm f3.5-5.6 II, EF 50mm f1.8 II, EF-S 55-250mm f/4-5.6 IS STM, speedlite 430EX, basic filters set.
My photo galleries (external link)
Marketplace: PAYPAL GIFT NO LONGER ALLOWED IN POTN

  
  LOG IN TO REPLY
Pekka
El General Moderator
Avatar
17,792 posts
Gallery: 35 photos
Best ofs: 7
Likes: 1552
Joined Mar 2001
Location: Hellsinki, Finland
     
Sep 30, 2005 20:00 |  #4

Thanks for the tutorial, Rafael. I'm sure it will be useful when you do not have 85/1.2 at hand :)


The Forum Boss, El General Moderator
AMASS 2.1 Changelog (installed here now)

  
  LOG IN TO REPLY
rpolitsr
THREAD ­ STARTER
Moderator
Avatar
5,977 posts
Gallery: 5 photos
Likes: 25
Joined Jun 2005
Location: Quito - Ecuador
     
Oct 01, 2005 19:37 |  #5

Thank you Pekka for the forum and your dedication to it. Yes to mimic the narrow Depth of Field of an 85mm f1.2 lens is always a hard task with a PowerShot.


rafael
Canon EOS Rebel XT, EF-S 18-55mm f3.5-5.6 II, EF 50mm f1.8 II, EF-S 55-250mm f/4-5.6 IS STM, speedlite 430EX, basic filters set.
My photo galleries (external link)
Marketplace: PAYPAL GIFT NO LONGER ALLOWED IN POTN

  
  LOG IN TO REPLY
danpass
Goldmember
Avatar
2,134 posts
Likes: 1
Joined Oct 2006
Location: Miami, FL
     
Feb 18, 2008 08:52 |  #6

bump from the DEPTHS


mmmmmuuuuuuuuuuaaaaaaa​hhhhhhhhhhhh


.


Dan
Gallery (external link) | Gear/Feedback

  
  LOG IN TO REPLY
rajah ­ sulayman
Senior Member
Avatar
262 posts
Joined Nov 2007
Location: New York
     
Feb 18, 2008 13:34 |  #7

Thank you for bumping this thread. Seriously. It's a great guide for creating faux DoF, something I do from time to time, and so much better than my old method of just masking out the background. I'm gonna try this technique right now!


.
focalmatter - photos that aren't entirely crap (external link)

  
  LOG IN TO REPLY
galahad
Member
Avatar
202 posts
Joined Sep 2006
Location: Ireland
     
Mar 08, 2008 06:27 |  #8

excellent tutorial on one of CS filters. Excellent!


Gear List

  
  LOG IN TO REPLY
vovko
Hatchling
1 post
Joined Apr 2009
     
Apr 23, 2009 22:28 |  #9

Good Tutorial! Thank you!
rpolitsr, could you explain how you made Depth Map,
you mentioned that you used 3d Editing software.
Are there any special keywords I can google or tools/plugins?
Thank you!




  
  LOG IN TO REPLY
rpolitsr
THREAD ­ STARTER
Moderator
Avatar
5,977 posts
Gallery: 5 photos
Likes: 25
Joined Jun 2005
Location: Quito - Ecuador
     
Apr 24, 2009 02:43 |  #10

Some delayed replies, sorry.
Thanks for reading, danpass. (Bumpig is not allowed :) )

rajah, galahad thank you for the comments, I'm glad you found this useful.

vovko stay tuned, I will post soon about your question.


rafael
Canon EOS Rebel XT, EF-S 18-55mm f3.5-5.6 II, EF 50mm f1.8 II, EF-S 55-250mm f/4-5.6 IS STM, speedlite 430EX, basic filters set.
My photo galleries (external link)
Marketplace: PAYPAL GIFT NO LONGER ALLOWED IN POTN

  
  LOG IN TO REPLY
Picture ­ North ­ Carolina
Gaaaaa! DOH!! Oops!
9,163 posts
Likes: 170
Joined Apr 2006
Location: North Carolina
     
Apr 24, 2009 05:25 as a reply to  @ rpolitsr's post |  #11

Wow. An old thread, but timeless and useful advice. Thanks for your contribution.


Website (external link) |

  
  LOG IN TO REPLY
rpolitsr
THREAD ­ STARTER
Moderator
Avatar
5,977 posts
Gallery: 5 photos
Likes: 25
Joined Jun 2005
Location: Quito - Ecuador
     
Apr 24, 2009 16:18 |  #12

CannedHeat, I’m glad you think so, thanks for reading.

vovko wrote in post #7792529 (external link)
rpolitsr, could you explain how you made Depth Map,
you mentioned that you used 3d Editing software...

I borrowed the idea from 3DStudio MAX for the creation of the depth map, but all the work described in this tutorial was manually created with Photoshop CS and its tools (no especial plug-ins or external software used).

Re-read the THE DEPTH MAP section again, with the help of the image below, you will understand better how to isolate the objects, create the masks and chose the point to pick the gray shadow with the eye dropper tool for each object.
I work with one outline mask at a time, starting with the farthest object.

Create the masks using the original image layer and paint inside them over the linear gradient layer. Pick the gray from the gradient at the base of each object.

Note: the objects with no special mask (the far building and the tiled floor) maintain the original gradient colors.

I hope this helps

IMAGE: http://sites.google.com/site/rpolitsr/r_polit/varios/onthenet/tut1/masks_how_to_addendum.jpg

rafael
Canon EOS Rebel XT, EF-S 18-55mm f3.5-5.6 II, EF 50mm f1.8 II, EF-S 55-250mm f/4-5.6 IS STM, speedlite 430EX, basic filters set.
My photo galleries (external link)
Marketplace: PAYPAL GIFT NO LONGER ALLOWED IN POTN

  
  LOG IN TO REPLY
PhotoCupcake
Senior Member
Avatar
673 posts
Joined Mar 2010
     
Apr 20, 2010 15:10 |  #13

Very good post, rpolitsr. Much appreciated!




  
  LOG IN TO REPLY
Gregg.Siam
Goldmember
Avatar
2,383 posts
Joined Jun 2010
Location: Bangkok
     
Nov 27, 2010 21:20 as a reply to  @ PhotoCupcake's post |  #14

thanks for the great tutorial. It will help when I have shots where I can't get the DoF that I would like for various reasons, but can through PP.


5D MKIII | 24-105mm f/4 L| 50mm f/1.8 | 600EX-RT [FONT=Tahoma][COLOR=bl​ue][FONT="]|
∞ 500px (external link)
flickr (external link)

  
  LOG IN TO REPLY
danpass
Goldmember
Avatar
2,134 posts
Likes: 1
Joined Oct 2006
Location: Miami, FL
     
Nov 28, 2010 14:26 |  #15

rpolitsr wrote in post #7793766 (external link)
Some delayed replies, sorry.
Thanks for reading, danpass. (Bumpig is not allowed :) )

.............

I sure hope not. Is that one of those drunk ungulates?




I can understand bumping ads or doing multiple times in a regular thread; but a simple, single, bump to bring something useful to the first page is perfectly fine as far as I'm concerned and I will continue to do so as I feel is warranted.


Dan
Gallery (external link) | Gear/Feedback

  
  LOG IN TO REPLY
sponsored links
(this ad will go away when you log in as a registered member)

55,719 views & 0 likes for this thread
Depth Maps for Lens Blur Filter in PhotoShop CS
FORUMS Post Processing, Marketing & Presenting Photos RAW, Post Processing & Printing 
AAA
x 1600
y 1600

Jump to forum...   •  Rules   •  Index   •  New posts   •  RTAT   •  'Best of'   •  Gallery   •  Gear   •  Reviews   •  Member list   •  Polls   •  Image rules   •  Search   •  Password reset

Not a member yet?
Register to forums
Registered members may log in to forums and access all the features: full search, image upload, follow forums, own gear list and ratings, likes, more forums, private messaging, thread follow, notifications, own gallery, all settings, view hosted photos, own reviews, see more and do more... and all is free. Don't be a stranger - register now and start posting!


COOKIES DISCLAIMER: This website uses cookies to improve your user experience. By using this site, you agree to our use of cookies and to our privacy policy.
Privacy policy and cookie usage info.


POWERED BY AMASS forum software 2.1forum software
version 2.1 /
code and design
by Pekka Saarinen ©
for photography-on-the.net

Latest registered member is sankulmama
1059 guests, 280 members online
Simultaneous users record so far is 15144, that happened on Nov 22, 2018

Photography-on-the.net Digital Photography Forums is the website for photographers and all who love great photos, camera and post processing techniques, gear talk, discussion and sharing. Professionals, hobbyists, newbies and those who don't even own a camera -- all are welcome regardless of skill, favourite brand, gear, gender or age. Registering and usage is free.