Skip to Content

How to use Photoshop's Lens Blur tool with masking (Part 2 of 2)


Yesterday, I showed you how to simulate a photograph taken with a tilt-shift lens by using Photoshop CS3's Lens Blur tool. Today, we'll do something a bit more practical: clipping out an object that's not entirely in focus.

Clipping out objects that are out of focus can be something of a chore: either you have a hard, dark edge somewhere you don't want, or you have to settle for feathering the whole thing, leaving edges that should be sharp a little too blurry.

We'll be clipping out this old book, and dropping it on a new surface.

To start, we need to first draw a hard clipping path around the object using the pen tool. Be careful with accuracy around the parts in focus, you don't have to be as careful around blurry edges. Just make sure your path goes about halfway through the blurred edge, and doesn't capture too much of the surface underneath.

Unlike our last tutorial, instead of switching straight to the channels palette for this one, I find it easier to make layers first, and then copy the finished result into a channel.

So, create a new layer, and with the path selected in the Paths palette, choose Fill Path from the palette menu. I usually fill it with black.

Next, we need to create our depth map. We'll follow almost the same steps we did in our last tutorial:

  1. Select the Gradient tool.
  2. In the toolbar, click the "Linear Gradient" button:
  3. Choose black for your foreground color, and white for your background color.
  4. Make sure the gradient you're drawing is gradating from the foreground color to the background color.
  5. In the Channels palette, create a new channel.
  6. Click the channel visibility icon ( ) next to the RGB channel (first in the list).
  7. Now you can see your image (but tinted red), draw a gradient starting where the point of sharpest focus is and drag to the blurriest edge of the object.
  8. Click the RGB channel in the Channels palette.

Groovy! Our depth map is taken care of. Let's make that channel invisible by clicking the eyeball icon ( ) next to it.

We also want to make our black fill a little more translucent, so we can see the extent of the blurriness beneath it. In the Layers palette, reduce the opacity for that layer to zero or 1 percent.

Now we can play with Lens Blur. With our fill layer selected, choose Blur from the Filter menu, then select Lens Blur.

We want to choose a Radius that matches the blurriness of the soft edge in the background. You can move the Lens Blur window out of the way if you need to get a good look at how soft you need to make it.

Once you've chosen a Radius, click OK to make it happen. After waiting the customary few minutes, we'll copy the focus-accurate fill into a channel of its own.

On a layer below our fill, make a layer of solid white, and take the fill layer back up to 100 percent. Merge those two layers, and you should get something that looks like this.

From the Edit menu, choose Select All (or hit Command + A) to select the layer. Copy it to the clipboard.

Now, in the Channels palette, create a new channel. Paste in what you copied. In order to make it useful as a channel, we'll have to invert the colors, so while everything is still selected, hit Command + I to invert the colors. The object should now be white on a black background.

Coolio. (That's right, I'm bringing it back.) You can click the RGB channel in the channels palette, and delete any of the fill layers in the Layers palette -- we won't need them anymore.

If you command-click on the palette preview of the channel you just made, you'll make a selection we can use to pull the object away from the background, keeping the fuzzy edges intact.

With the selection made, click the layer with your object on it, and type Command + J. Voilà! A new layer with our object on a transparent background.

We can now copy and paste the object into other scenes, place shadows underneath, and otherwise have it look natural.

Careful observers will see I distorted the perspective on a flat wood image, and used Lens Blur to make it look like a table in focus with the rest of the book. The possibilities are nearly endless.



Yesterday, I showed you how to simulate a photograph taken with a tilt-shift lens by using Photoshop CS3's Lens Blur tool. Today, we'll do...
 

Add a Comment

*0 / 3000 Character Maximum

15 Comments

Filter by:
Scott

What about that shadow there that is cast from the book??

October 08 2008 at 8:17 PM Report abuse rate up rate down Reply
1 reply to Scott's comment
Robert Palmer

That's the easy part. Just draw it in roughly with the lasso tool, fill it with a dark color, and set its transparency mode to multiply. Put the layer under the book, and use Gaussian Blur to make it look realistic. Ta da!

October 08 2008 at 8:20 PM Report abuse rate up rate down Reply
Danish

What book is that in the pictures?
Or at least do you know what language it is? It looks a lot like Urdu

October 08 2008 at 4:33 PM Report abuse rate up rate down Reply
1 reply to Danish's comment
nowe

Yes I'd love to know the language :D. Beautiful book too!

October 09 2008 at 6:07 AM Report abuse rate up rate down Reply
Harr

Here are a few Photoshop tutorial blogs:

www.psdtuts.com
www.tutorial9.com
www.abduzeedo.com
... THE LIST GOES ON.

I believe the first blog on the planet was a photoshop tutorial blog. In fact, 23% of all blogs are photoshop blogs. And 10% of their posts covers this effect. What's next, Gradients? oooh, how exciting. No, why not a "Top 10 Awesome Photoshop Text Effects!" Surely nobody has ever done that either?

A good blog should have FOCUS. TUAW is now loosing it. I can read about this stuff in dedicated Photoshop blogs in lots of places. Start a new Weblogs Inc blog if needed.

And guess what, even a Windows user could follow this tutorial.

October 08 2008 at 4:29 PM Report abuse rate up rate down Reply
Seth Amott

You really need to quit complaining, I really like these. I love learning how to do different things in Photoshop. While this is a "Mac" blog, there is nothing wrong with branching out and giving tutorials on things you can do with your Mac, even if you can do them on Windows too. If they focused on things you can only do in the Mac version of Photoshop, that would be nice, but I don't think there is much of anything you can do in just the Mac version. Either way, keep it up, if you have to make a "No Tips" feed, because you will never please anybody. You get my vote for more, keep it up.

October 08 2008 at 3:45 PM Report abuse rate up rate down Reply
Sabi

they should change that URL to tupw.com
domain is for sale...

October 08 2008 at 3:41 PM Report abuse rate up rate down Reply
webstuff

I have a ton of Photoshop tips at TheGraphicMac - but there's always room for more sites out there.

I wouldn't want TUAW to make this a regular thing though. After all, as stated in the last Photoshop article, this site is for APPLE-related news, not Photoshop tips.

October 08 2008 at 3:06 PM Report abuse rate up rate down Reply
Tristan

I liked the one yesterday, but there wasn't enough step by step. today's was much better layout wise. Great job! hope to see more of these in the future.

October 08 2008 at 11:50 AM Report abuse rate up rate down Reply
ericdano

I didn't know Donnie worked for TUAW

http://www.mydamnchannel.com/Big_Fat_Brain/

October 08 2008 at 11:24 AM Report abuse rate up rate down Reply
dptronz

I'd like to offer another way to do this: Make a copy of the layer, do a quick mask (Q), add the gradient (G), add gaussian blur (1.5 to 3 px) and then repeat the command (cmd-F) two or three times (so that it's not a drastic 10px step-forward, but rather in incremental baby-steps). After doing this, sometimes I might play with the opacity a little bit.

October 08 2008 at 11:21 AM Report abuse rate up rate down Reply
Dominik Hahn

TUPW.com?
(The Unofficial Photoshop Weblog)

October 08 2008 at 11:15 AM Report abuse rate up rate down Reply
3 replies to Dominik Hahn's comment
Buy an ad here

Hot Apps on TUAW

Tweets

© 2012 AOL Inc. All Rights Reserved.