Easy-to-follow video tutorials help you learn software, creative, and business skills.Become a member
You may already be familiar with the fact that a color image is comprised of multiple channels that represent the individual colors, the primary colors. In most cases those channels are red, green and blue for an RGB image and that represents the amount of red, green or blue light that is included for each individual pixel, determining the overall brightness and color values for each of those pixels. But you can also use those channels as the basis of a layer mask. Let's take a look at how it's done.
I have an image here and I'd like to select the foreground so that I can replace the sky, for example. So I'll go to the Channels panel and if you don't have the Channels panel visible, you can go to the Window menu and choose Channels. But then we can click on each thumbnail in turn for the red channel, the green channel and the blue channel and what we're looking for is the channel that has the best contrast for the area of the photo that we want to select versus not select or to have visible versus not visible on a layer mask. In this case I think the blue channel is going to be our best bet, because the sky for the blue channel was relatively bright and the rest of the image is relatively dark.
And what we really need for this technique is contrast between the area that we want to create a mask for and the area that we do not want to have the mask represent. So, the blue channel it is. I'll go ahead and drag the thumbnail forward. For that blue channel, down to the create new channel button, the blank sheet of paper icon at the bottom of the channels panel and that will create a blue copy channel. Now, the individual channels red, green and blue contain color information about the image, so we mkost certainly do not want to work directly on the channels.
Doing so would alter the color in the image and can have some disastrous effects as far as the overall photo is concerned. But because of working with a blue copy we can do anything we like to with this layer without having any concern whatsoever for the color internal values in the photo. Because this blue copy layer is not one of the color bearing channels, not one of the channels that contains color information for our photo, it's generally referred to as an alpha channel. But you can just think of it as an extra channel that you don't have to worry about as far as the appearance of the image.
With this blue copy channel selected, I'll go to the image menu, followed by adjustments, and then levels. That will bring up the levels adjustment dialog. And here I want to increase contrast. I already have reasonably good contrast between the rock in the foreground and the sky in the background. But I want very, very strong contrast. In fact, ideally so much contrast that we only have black and white pixels, with no shades of gray. So I'll start by bringing the white point inward, so that I can get the sky to go compeltely white, and it looks like right about there will take care of that.
And then I'll drag the black point slider inward in order to darken up the dark areas, the rocks in the foreground. And what I really ultimately want to do is to get both of those sliders, the black and white sliders, pressed completely against each other so the we've really maximized contrast in the image. And what I mostly need to focus on is that edge, the boundary between the area that will be white and the area that will be black. If I can get a good line there, the rest I can cleanup. You'll notice, for example, I have some white areas throughout the black of this foreground.
That's very easy to clean. Up, but what's most important and most challenging is to make sure that we have a really good crisp line along that edge between the object I'm trying to select or mask, and the area of the image that I'm not. So, that looks to be a pretty good result. In this case, I'll go ahead and click the OK button and now, we can work on cleaning up all of the extra areas. It looks like the sky is actually pretty clean. I don't see any dark spots in the sky, so I think we're good there, but there is some clean up work to be done for the foreground, for those black areas.
So I'll choose the Brush tool from the toolbox. I'm going to change the hardness of the brush up to a 100% value so that I don't have to worry about blending into other areas as I'm painting. And then I'll make sure that the colors are set to their default values. I can press the letter D on the keyboard to get the defaults. Because I'm working on an alpha channel the defaults are actually white for the foreground and black for the background. I want to paint with black to cover up these white areas. So I'll simply press the letter X on the keyboard. To switch the foreground, background colors, so that black is now my foreground color. And then I'll adjust the brush size, I'll reduce the brush size in this case, but I can reduce or enlarge the size of the brush by pressing the left square bracket key to reduce brush size or the right square bracket key to increase brush size.
I'll go ahead then and just simply paint away, I'm painting with black on this alpha channel, removing all of the white areas in this case. Obviously, if they were black pixels in the sky, I could clean those up by painting with white. So, a very, very easy task here, since I had a good edge to begin with. Now I'm just performing some cleanup work. That looks to be pretty good, so now, I'm ready to create a layer mask based on this Alpha channel. So, with my blue copy channel active, I'll just simply click on the dashed circle icon, that is the Load Channel As Selection button, and that will load a selection, where areas that are white will be selected, and areas that are black will be deselected.
With that selection created, I'll click on the RGB channel, the composite channel, to get back to my full image. And you can see, I now this sky selected, and the foreground not selected, that's actually the opposite of what I want. So, I'll go to the Select menu, and then, choose Inverse, so that I now have a selection of the rock formation. Here and now going back to my layers panel if I double-click on my background image layer and click okay, in order to convert that background image layer to a normal layer and then click on the Add Layer Mask button, the circle inside a square icon at the bottom of the layers panel.
That will add a layer mask based on the selection that I created. Just to show you some of the potential, to get a better sense of what we've accomplished here. I'll go ahead and add a new layer, below my existing layer. So, I'll hold the Ctrl key on Windows, or the Cmd key on Macintosh, while clicking on the Create New Layer button. That will add a new layer below the current layer. And then I'll just choose the gradient tool and I'm going to choose a wild gradient here and then simply paint that across the background. And that fills the underlying layer with the gradient and you can see that I've now replaced the background. This could've been anything, I could replace the sky with a cloudy sky or I could simply make the background white, whatever I'd like to do. The point is, that I'm able to use one of the individual channels as the basis of a selection, that I can then convert into a layer mask quickly and easily, producing, as you can see, a very good result, without much effort at all.
Get unlimited access to all courses for just $25/month.Become a member
164 Video lessons · 54405 Viewers
64 Video lessons · 86341 Viewers
86 Video lessons · 55736 Viewers
148 Video lessons · 93095 Viewers
Access exercise files from a button right under the course name.
Search within course videos and transcripts, and jump right to the results.
Remove icons showing you already watched videos if you want to start over.
Make the video wide, narrow, full-screen, or pop the player out of the page into its own window.
Click on text in the transcript to jump to that spot in the video. As the video plays, the relevant spot in the transcript will be highlighted.
Your file was successfully uploaded.