Obviously, the best way to get a blurry background in your photos is to do it all in camera,
but if you don't have the right lens
or you're working with photos that you didn't take,
then the next best way to blur the background in your photos
is to use Photoshop.
The method that I will show you today will give you realistic results
without halos or ghosting.
And best of all, this technique is completely nondestructive.
You can always come back and edit your adjustments.
Let's jump right into the editorial.
The first step is to duplicate your background layer.
You can press Ctrl J Windows Command J on the Mac
to duplicate,
to keep things organized or rename this layer and I'll call it "foreground."
The first thing that you need to do is
remove the background from your main subject.
The reason that you want to do that is
to avoid edge haloes when blurring the image.
And it also gives you more flexibility
when you're masking your foreground element.
You're going to see what I mean by that in a few moments.
But first, let's make a selection out of the main subject.
There's a lot of ways of doing that in Photoshop.
In newer versions of Photoshop,
One of the easiest ways is by going into the Select menu
and clicking on Subject.
And this will use Adobe Sensei,
Photoshop's artificial intelligence
to find the main subject in your photo
and make a selection around it.
In this case, it does a really good job.
The selection is not perfect, but that's OK.
We're going to fine tune it later.
I'm going to zoom in so that you can see what the next step is going to do.
And you can see that we have a selection
going around her body and that's usually what we want.
But in this case, we actually want a gap
between the selection and the edge of her body.
So to create that gap,
I'm going to go into the Select menu
and choose, Modify and Expand.
And you can expand by 5 or so pixels.
Press OK.
and make sure that you have a gap that looks like this between the selection
and the edge of the main subject of your image.
Once you have that gap,
you can remove her from the image
and you can do so by going into Edit
Content-Aware Fill
in the preview window, you can see the fill.
It doesn't look perfect, but that's OK.
All we really care about are the edges.
We don't really care about the center part
because that's where she's going to be standing.
In this case, the default settings look great.
So, I will output the fill.
Make sure that you have "Output To"
set to "Duplicate Layer" and press OK.
Photoshop will generate this new background copy
where she has been removed from the background.
You can then enable the foreground layer
and disable the two background layers.
Notice that the selection is still active.
You can apply it as a Layer Mask
to the foreground layer by clicking on the Layer Mask icon with that layer selected.
But we now have one problem.
Since we expanded the selection.
The Mask now has a five pixel border
around our main subject
and we'll fix this issue by using
that technique to remove fringing or edge halos.
With the Layer Mask selected, you can go in to Filter,
Other,
Minimum.
And this filter will contract the mask
by the number of pixels you have here.
I have 4 at the moment,
but you might remember that I expanded the mask by 5 pixels.
So if you set it to 5,
you should get something like what you had before.
In my opinion, this filter is better at contracting and expanding masks,
than the Expand or Contract feature in the Select menu,
especially because you can decide to use an algorithm
that preserves straight edges or round edges.
In this case, round edges works best.
And also you can use decimal points, not just whole numbers.
For example, I can set the Radius through 5.5 pixels.
In this case, it might be a good idea to actually go up a whole pixel.
So we'll go to 6
to push the mask, one for pixel inward.
That way we can be sure that we have no edge halos or fringing
I'll press OK.
And this is looking pretty good.
By the way, if you want to learn more
about how to use this filter to enhance your Layer Mask,
then check out my tutorial on the Minimum and Maximum filter.
The link is below in the description.
It's now time to blur the background.
So, select your Background Copy layer.
Then Right-click on it and convert it into a Smart Object.
A Smart Object is a container that allows
you to hold one or more layers
and you can apply editable
adjustments, distortions, filters and transformations
so you can always come back and change it.
With my background layer selected,
I'm going to go into Filter
Blur Gallery
Tilt-Shift.
This filter blurs the image on the top
and the bottom and it leaves the center pixels intact.
Let me increase the blur so you can better see what we have here.
First, notice these two solid lines.
Everything inside of them will remain intact
and everything outside of them will receive some sort of blur.
from the solid line to the dashed line.
You'll get a gradual blur.
Once you get past the dashed line,
you'll have the full blur that you set on this slider.
And the same thing is true for the two at the bottom
with the solid line and the dash line.
So what you want to do is adjust these controls
to recreate the effect that a camera and lens would make
on an actual photo with a shallow depth of field.
And if you think about it,
if this were a real photo, our model will be in focus.
So, the area in space or she's standing
will be in focus, meaning blur applied to it
and everything behind her
and in front of her,
will gradually get blurrier as the image recedes
into the background or as items get closer to us in the foreground.
So you can just the just these controls to get the appropriate blur in your image.
I think that my background is looking a bit too blurry,
but I can reduce the blur to about 100
and I think that looks pretty good
and I'll adjust these controls as well.
And the bottom one, I think I pushed that down way too much, so I'll bring it up.
And as you can see, the only area that's in focus is where she's standing.
When you're happy with the results, you can press OK
and notice that there is no ghosting effect on the edges.
Everything looks fantastic.
And the reason it looks this good is
because we removed her from the background that we blurred.
If she were still there, we would get blurriness on the edges
and it creates that ghosting effect that you often see.
The final step is just to fine-tune your mask,
for example, her hand
is not looking very good,
but we can always go into the Layer Mask
and you can paint them with white to reveal and black to conceal.
So if I paint with black, I can paint away the pixels that don't belong.
And if I paint with white,
I can bring back the pixels that do belong in this image.
Obviously, you're going to need some time
to fine-tune the photo, but this is what you need to do.
Before we finish the video,
I want to show you something very important, which is her hair.
You will see
that her hair is not looking very good.
And obviously, she was up against a
really busy background, so her hair was really difficult to select.
So what do you do?
Well, first of all, make sure that none of these stray pixels
are showing, because I think it will break the effects.
So, I'm going to hide these pixels
and I can now paint her back in.
In one of two ways.
Number one is, you can create a layer above the foreground layer.
I'll call it "hair"
and what the Brush Tool selected.
You can go into the options bar,
click on this down-pointing arrow
and set the size to one and the hardness to 0.
Now, if you have a Wacom tablet, there's one more step.
Click on this icon and under Shape Dynamics.
Make sure that you set the Size Control to "Pen Pressure"
and now you can paint in hair.
Holding Alt on Windows Option on the Mac
will temporarily enable the Eyedropper tool
and you can select a color from your hair.
and start painting in these flyaway hairs.
Also, you can select colors from other areas and continue painting.
Obviously, this will take some time, but it'll give you great results.
You can also use custom hairbrushes to paint in hair.
Like the ones that I've used in my 3 masking tips tutorial.
If you haven't seen it,
I'll place a link in the description so that you can check it out.
And I will also place a link to the actual brush that I'm using in this tutorial
so that you can download it and use it in your projects.
I have my custom brush in a Creative Cloud library and here it is.
All I need to do is type in hair and I can just select that from the list.
And what I need to do is create a layer, a new layer,
below my foreground element
right here,
I'll double-click on the Hand Tool to fit the image to Screen
so that you can see what I've got.
I got this brush right here.
When I paint, you'll see what it creates.
So that's what that brush is.
It will help you paint in flyaway hairs.
So let me zoom in again and also resize my brush.
It's a little too big, so I'm going to tap on the left bracket key on the keyboard
and you can see the preview there.
And I'm going to match it as best as I can.
And I'm just going to click once to paint and I can place this here accordingly.
And you can see how this is going
to create the illusion that those flyaway hairs are really hers,
because I selected the color that was already found in her hair.
And you can also transform this hair layer to match the rest of the image.
You can press Ctrl T on Windows Command T on the Mac
then right-click and select Warp.
And I can warp the hair in, so, I'm not really liking the bottom part,
but I am liking the top part.
So, I can adjust that accordingly
and I can always adjust the color of the flyaway hair.
For example, I can click on this icon, which will lock the transparent pixels.
And just with a regular brush,
I can paint in with a new color and you'll see how that works.
I'll hold Alt on Windows, Option on the Mac and click
and I can paint those hairs.
And so you're not stuck with the color that you select.
You can paint different colors
to make it more realistic.
Like so.
I'll double-click on the Hand Tool to fit the image to fit the screen
and you can see what we have so far.
And this is my result.
After spending a few minutes fine-tuning both the mask in the hair.
Then I placed all the layers into a Smart Object
and applied the Camera Raw filter.
I made the image warmer and adjusted
the highlights and shadows to bring in more detail.
And I increased the vibrance to make
the colors pop a bit, but most importantly,
go into the Effects panel,
because when you apply a blurring filter,
the image looks a bit too smooth and too digital.
So, I think that it's always a good idea to add a little bit of green.
And you could also allow the vignette to drive the focus to your main subject.
And this is my result.
Let me know what you think in the comments.
And if you learn something,
make sure that you click on that thumbs up button.
By the way, I would love to see your blurry backgrounds.
So, if you decide to share your results on Instagram,
make sure that you use the hashtag
#PTCvids.
I would love to see what you came up with.
Also, if this is your first time
at the Photoshop Training Channel,
make sure that you click on that subscribe
and notification button
so that you don't miss any future Photoshop tutorials
and make sure to watch my Minimum filter tutorial.
The link is in the description.
My name is Jesus Ramirez.
Thank you so much for joining me
on this blurring backgrounds Photoshop tutorial.
I look forward to speaking to you again very soon.