Let me show you how to
remove complex backgrounds in Photoshop with Calculations.
This is the image that we're going to work with.
It's the Manhattan Bridge.
Look in the description for a link to this image.
And before I actually show you
the technique with Calculations, I'm going to show you the automated feature,
so that we can compare the difference.
In the latest release of Photoshop,
you can go into Edit and Select Sky replacement.
I'm just going to use the default settings and I'll press OK.
Photoshop will create this Layer Mask.
If you hold Alt on Windows, Option on the Mac and click.
You can see the Layer Mask that was created.
The Layer Mask is not bad, but once we start zooming in,
you can see that we are losing a lot of detail here on the cables on the bridge
and in some cases the cables are almost gone, like in this area here.
Obviously, we can fine-tune that Layer Mask
to get better results, but the initial selection is not
that great because of all that intricate detail.
We can actually get better results by using Calculations.
And let me show you what that's all about.
With my Background layer selected,
I'm going to go into Image and select Calculations.
The first thing you need to do is select a source for your first channel.
Source1. You can select channels from different documents that you have open.
In this case, I only have one document, so there's only one option.
And I can now select a layer in my document.
"Merged" simply means all the layers combined.
Basically what you see in your canvas.
Since I have the "Sky," "Foreground Lighting,"
and "Foreground Color" disabled,
"Background" will give me the same result as Merge.
So, to be organized,
I'll just select the Background because that's where this photo actually is.
Then you can go into the Channels,
dropdown and look through the list of channels to see which channel has
the most contrast between foregone and background.
By the way, make sure that
"Blending" is set to Normal.
Because we're going to go through the individual channels
and if you don't have "Normal" set,
you might not see what I'm seeing on screen.
So, make sure that you have "Normal" selected under "Blending."
Channel "Gray" and Layer "Merged" is fine at the moment.
So, go through each individual channel and see which channel
has the most contrast between the foreground and the background.
In this case, the blue channel has the most contrast
between the bridge and the sky.
And that's what we want.
If you need to, you can "Invert" the channel, but it's not necessary in this case.
Then, we need the second source.
This is the second document where we're going to take a channel
to apply it to that Blue channel.
It can be the same document, but you could also use separate documents if you like.
For now, we're going to select the same document for this image.
So, Source 1 and Source 2 are using the same document.
And again, "Merged" and "Background" will give us the same result.
I'll select "Background" just to have the same layer active.
Then I can select a background to blend.
What background am I going to blend?
The Red channel, the Green channel, or the Blue channel?
It's not going to change because I have this set to "Normal."
So, what I'll do is I'll select Blue
and then I can just hover over the different Blending Modes
to see what channel gives me the most contrast
between the foreground and background.
In most cases, selecting a channel like
"Multiply" will give you great results.
Also, "Screen" in some instances.
Or "Overlay" tend to be good choices.
But in this video, I'm going to show you two Blending Modes that you don't see in the Layers panel.
The "Subtract" and the "Add" Blending Modes,
And you can see them here. In between these two lines.
"Add" and "Subtract"
"Subtract" will give you gray
when you subtract the channel from itself.
Something very important to remember is
that each pixel in a channel has a brightness value.
The Calculations command manipulates these values to produce a resulting pixel.
When you subtract something from itself, you get nothing.
That's what's going on here.
But the trick that I want to show you is
with the "Add" Blending Mode.
I'm going to select "Add" and notice that we have new boxes.
"Offset" and "Scale."
"Offset" can go as high as 255.
Which will make the image brighter
and as low as -255, which will make the image darker.
This is the Blending Mode that I will use to create my mask.
-255 is a little too low.
So, I'll increase it to -235 to get more detail in the highlights.
And notice that in "Output" I can select a "New Document," a "New Channel," or a "Selection."
I'll select "New Channel" and I'll press OK.
Now from the Channels panel, you will see my new Alpha One channel.
There it is.
I can now fine-tune this channel to make it even better.
One of the things that you can do is make
a selection around the areas that are going to be completely black on the mask.
You can do so by selecting the Lasso Tool from the toolbar.
Then dragging over the image to select these areas.
I'm going to go quickly here. Just to save a little time,
but make sure to spend more time on your projects to get better results.
Now that I've selected these areas, I can fill with black.
Black is my Foreground color,
So, I'll press Alt and Backspace on Windows
That's Command Delete on the Mac.
It looks like I missed a little bit down here and I'll do the same thing.
Next, I'll tap on the Z key to enable the Zoom Tool.
And I'll Zoom in so that you can see the detail we were able to achieve
by using the Calculations command.
I'm now going to go into Image, Adjustments, and select Curves,
and I'll brighten the brightest pixels by dragging the White Point to the left.
And then from this point, I'm going to click and drag down to
darken the darkest pixels
and maybe move this even further to the left.
I'm trying to push it as much as I can
without losing any detail in the actual cables.
I think I might have gone a little too far.
So, let me just back up a bit
and I'll press OK.
I can now double-click on the Hand tool and fit the image to screen.
What I'll do now is show you a "copy and paste" trick that you can do with channels.
I'm going to Zoom in into this area.
As you can see, we lost some detail here.
What I'm going to do now is take this Blue Channel and paste it onto the Alpha channel 1
just to get some of the details that we lost.
So, I'm going to select the Lasso tool
and I'm just going to trace a selection on the top here. Like so.
It doesn't have to be perfect.
Then I'm going to go into the Blue Channel
because that channel has more information that I can copy from and paste.
So, with the Blue channel,
I can press Ctrl C on Windows Command C on the Mac
and then move over into the Alpha 1 and paste.
Ctrl V on Windows, Command V on the Mac.
And that just brings back some of the information that I lost.
And I can use the Image, Adjustment, Levels command to create that contrast again.
And now I'm just looking to make sure
that I don't lose all the detail that I want to keep.
It's not going to be perfect, but it will be better than what we had.
When you're done press OK.
You can disable a selection
by pressing Ctrl D on Windows, Command D on the Mac.
Here's another trick for you!
With the Brush Tool, you can select either Black or White of course,
and change the Blending Mode to Overlay.
If you want to reveal something, paint with white,
and this helps you keep some detail because the Overlay Blending Mode will make it so
that you don't really paint over black area.
See how I'm not painting on this black area?
That's because of the overlay Blending Mode.
So, the overlay Blending Mode gives you
flexibility when you're painting on these details.
Another thing that you can do is select the Burn Tool
and make sure that you have "Shadows" enabled.
I'll decrease my brush size by tapping on the left bracket key,
and you can darken the shadows in these areas.
I'll go back into the Lasso Tool
and again I'll make a quick selection around these areas
and I'll fill with black.
Black is now my background color,
so, I can press Ctrl Backspace on Windows. That's Command Delete on the Mac.
Next, disable the selection,
fit the image to screen,
and you can work on fine-tuning the mask.
With the brush still active, white as your foreground color, and the Blending Mode set to Overlay
paint on the white areas on top of that image.
Again, I'm going very quickly here.
Take a little more time on your projects to get all these small details.
When you're done, your image should look like this and this is looking really good.
Look at all the good details we have
on the cables and the other areas of this image.
It looks fantastic.
Next, you need to load this Alpha 1 channel as a selection.
There are two ways of doing that.
You can hold Ctrl on Windows. Command on the Mac, and click on the channel thumbnail.
Or look at the shortcut here
Ctrl 6, which is Command 6 on the Mac.
If you add the Alt key on Windows or the Option key on the Mac to that keyboard shortcut,
you will load this channel as a selection.
So, press Ctrl Alt 6 to load it as a selection.
With the selection active, click on RGB,
go back into the Layers panel, hold Alt on Windows, Option on the Mac
and click on the Layer Mask icon to create an Inverted Layer Mask.
And that looks fantastic.
And by the way, if you're enjoying the video and you think that it will be useful to you and your projects,
make sure you hit that "LikeL button now!
It really helps me out with the YouTube algorithm.
Also, if you haven't already, make sure to subscribe.
Let's compare the Layer Mask.
I'll hold Alt Windows, Option on the Mac, and click on the Layer Mask thumbnail
to enter into the Mask View.
And look how much better this mask is
than the one that we created automatically with the Sky Replacement.
See that? Less detail and not as good.
Of course, you spend a lot more time fine-tuning the smaller details in the Calculations mask.
But even if we spent the same amount of time fine-tuning the details of the A.I. Mask,
it wouldn't be as good because the starting point was not as good.
Now you're probably wondering, "well, that's great.
How do I get this Layer Mask that we just created onto the sky replacement layer Mask?"
Let me show you! You can enable this group
and all you need to do is replace the Layer Mask.
Before I replace it, I want you to notice one thing.
Look at the Layer Mask thumbnail.
See how the bridge is black and the bridge is white here on the bottom.
We need to convert that.
You can actually do that all in one move.
So,, I'll right-click on this layer and select "Delete Layer Mask."
Here's the keyboard shortcut.
When you have a Layer Mask active.
If you hold Alt and Shift on Windows,
that's Options Shift on the Mac, click and drag that mask onto a layer
you'll duplicate it and invert it all at the same time.
It's a great time saver.
You don't have to copy and invert a Layer Mask.
You can do it all just with a keyboard shortcut.
And of course, just so that this looks better, I need to disable the layer.
So, I can hold Shift and click on the Layer Mask icon.
That red X means that this Layer Mask is disabled.
When I Zoom in, you can see that this looks much better.
In some cases, you will need to paint over the fringing; those white outlines.
Let me show you how you would do that.
With this layer active you can create a new layer.
I'll call this mask "Fringe" just so that we know we're removing the fringe.
And you can press Ctrl Alt G on Windows. Command option G on the Mac
to create a Clipping Mask.
Then with the Brush Tool,
I can hold Alt on Windows, Option on the Mac and click on the color
of these cables. And I can just paint over them like so.
And this will also give you a good result.
Let me show you an advanced tip.
I wasn't really planning on showing this, but I guess I'll do it.
I'm just going to paint over this entire thing here.
Like so.
You can actually use channels to create a mask so that you only paint over the brighter pixels.
And we're going to use "Blend If" for that.
If you're not familiar with Blend If, check below in the description.
There's a video where I talk all about Blend if and how it works.
I'm just going to use it for one quick thing here.
So, with this layer selected, I'm going to double-click to the side
of the layer and that will bring up the Layer Style window.
From here we have the Blend If options.
And if you remember, we used the Blue channel to mask this background.
So, now with the "Underlying Layer," not the layer that we're on.
Not this layer. The underlying layer. We can click-and-drag this white point
and drag it to the left.
And notice that the white comes back.
And if we click-and-drag this point over to the right,
the highlights of the Brown come back
because we're hiding the paint over the darker portions of that channel.
And here's another trick.
If you hold Alt on Windows, Option on the Mac and click,
you can split this point in half
and create a smooth transition between visible and invisible pixels.
Also, if you think about how channels work, you can go into the Red Channel
because the opposite of Red is Cyan and there's a lot of Cyan in the blue sky.
So, I can go into this drop-down, select red and make an adjustment.
I can just reduce the red. See that?
So, when I reduce the Red, it starts bringing some of those highlights.
Maybe that's a little too much.
So, I can hold Alt on Windows, Option on the Mac
and click to split these in half. Like so.
Just to bring in some of those highlights
without affecting too much of the fringing there.
I can also try and move this over to the right and see if it helps.
I don't think that it does,
but I'll still split it and just create a smooth transition just in case.
So, this is before
and after.
I can continue painting and I can be a little looser now because
Photoshop is doing some Masking for me.
You don't want to be too loose because
this is not a perfect way of masking, but
I just wanted to give myself some wiggle room so that I don't have to be so precise.
But of course, spend some time fine-tuning all the small details in your project.
I'll double-click on the Hand Tool to fit the image to screen
and you can see the before and the after when I click on this Eye icon.
And we're not done yet! There's still one more thing I want to show you.
Now I have three documents open.
This one labeled "RGB," this one "CMYK," and this one is labeled "LAB."
Notice that the parenthesis reads "RGB" and all three.
That's because I haven't changed the Mode.
So, I'm going to go into the CMYK document
and I'm going to go into Image, Mode, and change it to CMYK.
Press. OK
And I'll do the same thing for the LAB Color Mode.
Image. Mode.
LAB.
And by the way, in case you don't know,
this is how you would do a "Save Copy" of a document.
You can just go into File, Save As Copy and you can save two copies.
But anyway, I have this document that's labeled LAB.
If you go into the channels panel now you have the Lightness, A, and B channels.
And in this document, I have the CMYK Cyan, Magenta, Yellow, and Black.
And I'm going to go back into my RGB document and it only has one layer.
You can go into Image and Calculations.
And do basically what we did.
But now under Source 2, notice that we have CMYK and LAB.
I can go into CMYK and now I can look through the channels of a CMYK document
to see if they give me better results.
And I can do the same from the LAB document
and just navigate through the different channels
to see if any of those gives you better results.
I would like to give a big shout-out
to my friend Bert Monroy, who co-wrote the book "Channel Chops."
There's a lot more information about the Calculations command in that book.
Even though this book came out in 90s
It is still relevant today when it comes to Calculations.
So, check it out if you like.
There's an Amazon link below in the description.
Also, if you want to learn more about Masking from me,
check out my Mask Tips and Tricks video.
You can click on it here or check out the link in the description.
My name is Jesus Ramirez.
Thank you so much for watching.