Join Deke McClelland for an in-depth discussion in this video A first peek at the Calculations command, part of Photoshop CS3 Channels & Masks: Advanced Techniques.
As promised, I am going to show you how I made the Alpha Channel that we used as a layer mask for the swirling tiles layer. Now you don't have to work through this exercise if you don't want to. There is not to learn a new stuff going on inside of this exercise. I just provided by way of a practice exercise to give you a little more experience because the more experience you have with masking, the better you are going to get. So it's totally up to you whether you follow this exercise or not. I am at this point working inside this image called Study in blue.psd which is the final version of the composition as you may recall, found inside the 10 Advanced Blend folder. I am going to bring back up my Layers palette. Now I am going to switch over to the Channels palette. Inside the Layers palette incidentally you can see that layer mask that I am talking about. This is a layer mask, that's assigned to the Tiles layer, to the swirling tile smart object layer.
I am going to switch over to the Channels palette and here is where I created the mask. These are the Alpha channels that lead up to the creation of the final mask and each one of them tells an important step in the story, but we are going to be walking through every one of them. This is the red channel inverted with these Levels values assigned to it. This is the blue channel with these Levels values assigned to it. This is those two Alpha channels multiplied together and this is the final cleaned up version of the mask. So let's do it people. I am going to switch to this image right here, it's called Her blueness.jpg and all it is the image, the original version of the image from photographer Kevin Ross, without any layers, without any Alpha channels, without any extra special stuff going on.
So here is the RGB version of the image. You should go ahead and switch over to the Channels palette incidentally and I am going to make my palette a little less wide. So it doesn't take up this much room on screen. Now I am going to grab the red channel. We are going to be working incidentally from the Red channel and the Blue channel and the reason we are working from these two channels is that they provide the highest degree of contrast and they are the most different from each other. So they are going to fill in each others gap. It's basically what it comes down to. Bear in mind, we want her to be black and we want the background to be white, because we want that swirling tiles layer to fill in the background and that's where these channels are going to be proved to be so useful. So I am going to go ahead and grab the Red channel and I am going to duplicate it by dragging it to the little Page icon at the bottom of the Channels palette, there it is and the first thing I am going to do is invert it, by pressing Ctrl+I or Command+I on the Mac. Now why did I inverted because I want her to be black and I want her background to be white and this comes close to that obviously.
Now I am going to go ahead and apply some Levels Settings to increase the contrast. I will press Ctrl+L or Command+L on the Mac and the settings I came up with were 70 for the black point and then 190 for the white point. I am going to leave the gamma value set as it is. Then I am going to go ahead and click OK. That pretty radically increases the contrast of this image. I am going to go ahead and rename this channel, R inv I might as well we will call it to indicate that it got inverted, 70//190 and that // is telling me that I didn't change the gamma because I don't have a value in between the slashes. That's my first channel right there. The first base channel.
Now let's go grab the Blue channel because basically what we need to do is fill in some more colors. For example, we need her hair to be black. Check out inside this Red Alpha Channel, this Alpha channel that began from the Red channel that is to say. The hair is white. So we need to bring in the black hair and it will be nice to bring in the black goggles, make the goggles black but that's not actually going to be possible. We are going to have to draw the goggles by hand. But anyway the Blue channel does have black hair. I get some white background so that's great. Go ahead and grab that Blue channel, duplicate it by dragging it down to little Page icon at the bottom of the Channels palette. Let's bring up the Levels dialog box by pressing Ctrl+L or Command+L on the Mac.
I am going to go ahead and click in this Input Levels value and change that black point to 140, Tab, change the white point to 205, click OK and I will go ahead and rename this layer, B and then I will call it 140//205 because those are the values I have applied. And the reason that I am being careful about naming my channels, it just in case things don't really go right as I get closer and closer to the final mask and I need to change out my values. It's helpful to be able to see what my original values were.
Now we want to go ahead and multiply the Red image, the red Alpha channel by the Blue Alpha channel here in order to darken things up across the board. So we have dark hair, we have got dark face, we have got all kinds of dark stuff going on, but now we can't really composite one image on top of the other and apply the Multiply blend mode because we don't have layers inside of channels. Instead we have got to take advantage of the thing called the Calculations Command. We are going to be looking at the Calculations command in more detail inside a later chapter but for now, a little preview of coming events. I want you to go up to the Image menu and choose Calculations. Now by default it's probably set to these settings right here which is to say, we are taking the channel inside of Her blueness. So both Source 1 and Source 2 should be set at Her blueness.
Both the layers should be set to Background because there is only one background layer inside of this image and then the Channels probably, as I say probably are by default B 140//205 in both cases. So what we are doing we are multiplying by default the blue channel, the Blue Alpha channel by itself at an Opacity of a 100% and that's how things work inside the Calculations dialog box. Should basically specifying the two channels that you want to blend together using the string Source 1 and Source 2 options and then we are specifying the blend mode and the Opacity value that we want to apply.
In our case though, we want the first channel to be R invert 70//190 because that first Alpha channel right there and then the second channel should be set to the second Alpha channel which is B 140//205. blend mode should be Multiply because we want to darken the images. We want to darken up these channels. Opacity should be a 100%. So everything else is set fine by default. So why don't you just go ahead and make sure that all of your options match mine on screen and then click OK in order to generate this new Alpha channel right there and I will go ahead and rename it R*B to indicate that it R times B.
Now let's go ahead and duplicate that Alpha channel because I want to keep R*B in its original condition there and we will go ahead and call this one cleanup because that's what we are going to do. We are actually going to cleanup this Alpha channel and we are going to be doing that in the more or less traditional way, the same way that we saw couple of chapters ago using the Brush tool set to the Overlay mode. So I will go ahead and grab the Brush tool. Make sure that you have a pretty large brush going and it should be soft as well. Then switch from the Normal mode to the Overlay mode by pressing Shift+Alt+O or Shift+Option+O on the Mac.
Your Opacity should be a 100%. Flow and all that other stuff should be set to their defaults. The foreground color will probably be set to white. If it isn't go ahead and press the D key in order to switch the foreground to white. Then I am going to Shift+Tab away my palettes for a moment so I can see the entire width of the image and I am just going to scrub away. I am just going to paint some of this background area to white like so and then I am going to paint over here on the other side of the image as well. A second douse of brush, I am going to paint up there. I am going to paint back over here, again. So basically I am really going to town brushing away and I can get away with that because we multiply the Alpha channels on top of each other. We have a lot of darkness that we need to get rid of. That's pretty good actually. Now I will just go ahead and get the Lasso tool and maybe I will do a little cleanup like this in order to get rid of these weird little sort of pock marks that are still infecting this left side of the image and I go ahead and Shift+Drag around that little guy there. Otherwise, things look pretty clean.
So now I am going to press Alt+ Backspace or Option+Delete to get rid of that garbage. The only thing left to do really is fill on of course the lips and then fill in the goggles. That's going to be the hard thing. Luckily the goggles are fairly circular, so we can use the Elliptical Marquee tool. So I am going to press the Tilde key in order to show the RGB image and the Alpha channel at the same time and notice that inside of this document I have the Alpha channel set up to display in standard quick mask mode that is to say as Rubylith overlays which contrast nicely with the blue image.
Now I am going to switch over to the Elliptical Marquee tool and this is the hardest step. The one we are about to apply because this area of the goggle is not quite standard ellipse. We are going to have to do a little distortion but go ahead and try your best to surround this portion of the goggle. We are just concerned about the lower right corner if you will, the lower right region of the goggle and we are going to go ahead and get it inside of that marquee to the best of our ability. It almost fits inside the marquee properly in my case.
But I am going to have to do a little bit of distortion as I say. So go to the Select menu and choose Transform Selection and then once you have done that you want to Ctrl+Drag or Command+Drag the corner handles in order to distort that ellipse, ever so slightly actually. Just to get it into the proper position. So that it exactly or as exactly as possible traces the edge of the goggles. That works up pretty good for me. Now you might have to do a little bit more work depending on how accurately you trace the goggles in the first place and when you are done, press the Enter key or the Return key on the Mac. Now still armed with the Elliptical Marquee tool.
Let's Shift+Drag with the tool in order to surround some other portions of the goggle and notice that I am using the Spacebar in order to align one ellipse with another and then I am going to Shift+Drag around this upper region of the goggle like so. So I want to clip down to the corner of the arm there. I don't want to come in any farther because I don't want to see like a little bit of ellipse coming down below the arm and notice this little bit of goggleze stuff going right there. I don't know what that is but I am going to go ahead and Shift+Drag around it as well.
You know it's actually kind of lumpier than an ellipse but an ellipse is good enough to approximated that figure and then I am going to Shift+Drag around this portion of the goggle on top, right there and I am using the Spacebar to right to get into the position. Sometimes it's a little hard. Now let's go ahead and zoom out and I will go ahead and Shift+Drag around the lips in order to grab them. Shift+Drag around this portion of the goggles. Notice you want to avoid the beads. So keep the marquee down a little bit. So it just surrounds this area of the goggles. You are going to have a little bit of goggle stuff at the top here off her heads. So go ahead and surround that as well by Shift+Dragging around it and that's pretty good.
Now I am going to fill the selection with black and in my case, the foreground color is now black. So I will press Alt +Backspace or Option+Delete to fill in the selection with black. So that we are deselecting this region of the image. Now press Ctrl+D or Command+D on the Mac in order to deselect the image and press the Tilde Key in order to hide the RGB image. So you can focus in on the mask and make sure you selected everything as well as you need to select it. I am going to go ahead and zoom in and notice I have got a little weird thing going right there next to the arm and then I have a lot of weirdness right here underneath the goggles and I am going to get rid of those just using the Brush tool. What the heck? So I am going to reduce the size of the brush by pressing the Left Bracket key a few time. I am going to increase the hardness of the brush to a 100% by pressing Shift+ Right Bracket four times in row and then I will switch back to the normal painting mode by pressing Shift+Alt+N or Shift+Option+N on the Mac.
Now I want to paint with black. So I am going to press the X key in order to make black my foreground color. I am actually going to reduce the size of the brush a little more and then I am just going to paint like so in order to get rid of that area and then I am going to paint right there. Just a single click right there in order of get rid of that thing. Oh, another click that will do it. All right, now I am going to zoom out groovy, looks actually really great and in fact I am done. This is the final version of the mask and this is indeed the Alpha channel that we used to mask the contents of this swirling tiles layer.
So there you have it, a little more practice for you. Hopefully you feel that much stronger about masking inside of Photoshop, if not, you are going to have yet another opportunity to create a mask in the very next exercise.
Download Deke's customized keyboard layouts for Channels and Masks from the Exercise Files tab."
- Distorting and shading with a DMap
- Understanding bits and channels
- Creating paths with the Pen tool
- Using blend modes and the Dodge and Burn feature
- Understanding channel mixing
- Using layer masks, clipping masks, and knockouts
- Applying Smart Filters