One of the most common mistakes I’ve seen even professionals make while doing a tilt-shift effect is when they simply erase/mask out the area they want in focus from a layer that has already been completely blurred. Before I jump into the right way to do this, let’s go through why this is a bad habit.

So you duplicate your background layer, and go to Filter->Blur->Lens Blur. You set it to the radius you want, and let it render out. Then you add a layer mask onto that layer, and simply drop a gradient on the area you want in focus. Wrong. Don’t do this. Don’t ever do this. When you do this, you’re simply adjusting the opacity of the layer with the blur in certain areas. That means that the parts of your image that are transitioning from in focus to out of focus will have transparent blur- and this isn’t what we want. You’ll see it when you zoom in, the blur will simply be opaque and you’ll see a soft version of your in focus image in those areas. It won’t be the slightly out of focus effect you’re looking for, it’ll just be a weird combination of in focus and then a transparent blur that makes it seem foggy. You’ll see this effect on the image below:

Weird ghosting as a result of simply masking your blur.

So then what’s the proper way? Well, I could go the lazy route and just tell you to upgrade to CS6 and have the blur gallery available to you so you can just drag and drop your blur gradients, but that would be too easy and leave most of the people who are still using CS5 and below out of the mix. So I’ll show you how to go about doing this inside of those versions.

First thing is first- In your layers palette,select the “Channels” tab. Once selected you should see the Red, Green, and Blue channels listed in front of you; along with a composite RGB channel. Click the “New Channel” button at the bottom of the palette (It looks like a little sticky note, similar to the “Create New Layer” button.), and then turn on the visibility of all the above channels by clicking the eye icon next to each channel. Make sure that your new channel is selected, and now you should see a red cast over your image.

Good job! You’re getting there. Select the gradient tool from the tools panel on the left of your screen, if you don’t see it simply click and hold on the bucket tool and select the gradient tool from inside of that list. In the top of the Photoshop window, inside of the tool settings bar, you should see a couple of tiny icons representing different gradient types. Choose the one that is a mirror, showing a white outline in the middle with both the bottom and top of the icon being black.

Make sure your primary and secondary colors are set to black and white, respectively. If they aren't, just quickly tap D to set them back to the defaults. Now drag your gradient from the center of the object/area you want in focus, to the outer edge of the area you want to be the transitioning area (The feather).

Setting the gradient down for your blur.

Awesome. Now you have your blur area set. Just click the little eye icon next to your Alpha 1 channel to turn its visibility off, and then select the RGB channel in the Channels palette. Switch back over to the Layers tab, and duplicate your background layer.

With this new layer selected, do the blur dance: Filter->Blur->Lens Blur. Now before you get all excited and hit GO and then get confused as to why nothing is different, you have to set up some stuff. You’ll see one option called “Depth Map”. In the “Source’ drop-down, select that channel you created, “Alpha 1". Set your radius to whatever exaggerated amount you desire, and hit Okay.

Now let’s look at what we get:

Boom. A nice gradual transition without any of that messy ghosting. When you tell lens blur how to map out the blur, you’re telling it to intelligently adjust the radius depending on how far from center the blur is. So closer to the center, the radius will be smaller. Farther from the center, the radius will be closer to the radius you set inside of the Lens Blur tool.
Congrats! Experiment away and try this out on loads of images, see what works best for you.

Thanks for the read, and more advanced tutorials are coming up soon.
-Dylan