Ch 5 - "Masks are Your Friend" from K Eismann's PS Masking and Compositing

pathfinderpathfinder Super Moderators Posts: 14,708 moderator
edited May 2, 2006 in Finishing School
Chapter 5 - Masks Are Your Friend

Chapter 5 adresses the following points
1. The concept of masking
2. Different types of masks in Photoshop
3. Channel masks versus Layer masks
4. Vector masks

When you don a mask, it serves two purposes - It must hide some of your facial features, and must expose some of your features so that other people can communicate with you and recognize that you are a person, but not precisely who you are. A mask in Photoshop has a similar purpose - it controls which image areas you desire to reveal or affect, and which image area are not to be seen or affected in any way.

Two of the most common type of masks are the layer mask and the channel mask.

Internally, Photoshop seems all selections as grayscale images, as shown here in my selection with the marching ants of the tombstone I displayed in discussion of Chapter 2.
59304228-L.jpg

Masks have several different names as they developed in different arenas by graphical artists, photographers, and image retouchers, as well as cartoonists. Photographers called negatives of images that they used in the dark room, masks, to hold back or burn the image in the beam of light from the enlarger to the paper print being exposed. Alpha channels was a term used by Photoshop image editors with versions of Photoshop prior to version 4, which did not have layers. Mattes was a similar term used in the film industry when shooting against a blue screen.

Fundamentally, masks in Photoshop perform just as a mask on your face as I alluded to in the first paragraph. They hide some features of your visage, and they reveal some features of your visage, without altering any of your real facial features; ie, not plastic surgery, which is permanent, but a MASK.

A mask in Photoshop lets you alter the appearance of an image by hiding or revealing features in its layers, without permanently changing any part of the underlying image.

Think of a mask as a piece of black construction paper like you used to play with in the first grade - cut a section out in the shape of a star or a pumpkin or whatever and place it on top a print of yours and LO!! Black conceals!! White ( the empty hole ) Reveals!!

Masks can be sharply outlined - indeed sometimes we go to great effort to make a mask starkly outlined, but a mask can also be a very gentle grayscale gradient that slowly goes from black to white - Again - black conceals, white reveals. Here is the mask from the selection of the tombstone I showed above -


59312231-L.jpg

Black conceals - means that whatever I do to the layer the mask is associated with, will NOT affect the area that is blacked out - Black conceals. The area in my mask that is white, will reveal whatever effect we apply to the layer - White reveals. I used the mask to limit the Photo Filter to affect only the tombstone and not the surrounding grass, and ended up with a purple tombstone


59305459-L.jpg


The author spends several pages demonstrating images of Selection-based masks ( like I displayed above), Layer-based masks which included Opacity Blending and Blending Option in the Blend if command, Alpha channels, and Vector-based masks which are created from Pen tool selections. I find the Blend IF command quite helpful in altering the appearance of part of an image if I can select the colored area via the A or B channel in LAB.

Here is the arrow to press for the Blend IF command

39904412-L.jpg


Working with Alpha Channels

Every Photoshop image in Photoshop has the potential for 11 primary layers - 1 in grayscale, 3 in RGB ( R, G, B ), 3 in LAB ( L, A, B ), and 4 in CMYK ( C, M, Y, K ). In addition, each image can have 56 total layers, so in image can have 52-55 channels other than the primary channels, depending on the color space the image resides in.

Alpha Channels are grayscale images, that hide behind the primary channels that are displayed as the visible image. An alpha channel can be displayed by clicking on the alpha channel name in the layers palette, or typing Cmd+alpha channel number or Ctrl- alpha channel number on a PC. Cmd + ~ returns to viewing the image. Grayscale alpha channel masks can be 8 bit with 256 levels of gray, or 16 bit in 16 bit images, and contain 65,000 shades of gray.


When to Use Alpha Masks

Because Layer masks are so easy to work with, and allow you to see the effect of altering the mask real time in the image, many folks do not really learn to utilize alpha channel masks. There are several occasions when using an alpha channel masks is very effective.

1.) Whenever you have to a make more than a very simple selection, stop and choose Select>Save Selection, to save your selection as an alpha channel. Do this as you work on your complex selection - If you make a mistake, then you can just reload your latest selection, via Selections > Load Selection and continue on finishing your selection.

2.) After making a complex selection, choose Select> Save Selection to save your work as an alpha channel.

3.) When working with the Image Calculations command (see Chapter 10 ), saving each step as an alpha channel can be very helpful. Alpha channels can be helpful in saving each step in complex, lengthy selections.

4.) Alpha channels can be used to build Luminance Masks to mask out hair and fine detail.

5.) Alpha channels can be sued to save simple selections if they are going to be used more than once or twice.



Layer Masks Versus Alpha Masks


Alpha masks are created before applying an image modification. Changing an alpha mask after modifying the image has no effect on the image. On the other hand, changing a layer mask, directly alters how an effect is applied to an image; ie, changing a layer mask, WILL change an image each time you change a layer mask.

A layer mask correlates ONLY to the layer it is part of - an Alpha channel applies to the whole image stack of layers. You CAN Cmd-click on a Layer Mask to activate it and use it on a different layer, it is primarily associated with only one layer.


In the Channels palette alpha masks are named in plain text, and layer masks are in italics and only visible when their specific layer is active.

Managing Alpha Masks

Since you are allowed up to 56 separate channels in a given image, it is good form to name each alpha channel so that you know what it represents. You can double click on the channel name, or double click on the alpha channel icon in the channels palette to bring up the Channel Options dialogue box, and type in the name in the appropriate box.

66464466-L.jpg

Notice that the Color Indicates section allows you to choose whether the color indicates the area selected, or the area not selected eg: masked. The default area is white for the selected area - this means the effect will be displayed in the areas masked white.

Selecting Spot Color adds channels to print additional colors other than standard CMKY. This is for the commercial printing facility.


66466805-M.jpg



Five Steps to Alpha Channel Mastery


Working with alpha channels successfully, requires 5 steps in succession to be successful.

1.) Make the alpha channel - after creating an active selection, Select>Save Selection. OR drag an existing channel down to the Create a New Channel button.

2.) Target where the changes should take place...after creating an alpha channel, activate the channel or layer to be effected.

3.) Activate the alpha channel with Select >Load Selection or Cmd + Option + {alpha channel number }, PC Ctrl + Alt + {alpha channel number }

4.) Apply a change by adding an adjustment layer, running a fliter, pasting in a new image element, etc,

5.) Refine the Composite - Usually performed on the grayscale image of the mask or alpha channel.

Make, Target, Activate, Apply, Refine.

Accentuating an Existing Sky


Selecting an existing image with a blue sky, allows us to change the sky for a better one perhaps. Here the blue sky is selected with the Color Select command.

59245880-L.jpg

And here is the alpha channel mask created - White reveals ....Black conceals

66473573-L.jpg

And I apply the Filter>Render>Clouds a few times and a Hue and Saturation command, and end up with this

66469793-L.jpg

The sky can be selected by Color Select or other means, and the Multiply Blending mode used to darken and vivify the sky, using the Opacity slider to taste.

Or the mask can be used to clone in a new sky from another image shot and saved from another location.

66471888-L.jpg


Or another new background entirely


66472752-L.jpg


If the selection for the mask is imperfect, you may have an area between the subject and the mask that does not show the proper background replacement, as around the egret throat and back of his head. To correct this you can click on the alpha channel mask and select Filter>Other>Maximum, which will reduce the halo effect.

Creative Techniques using Alpha Masks

The alpha channel mask is a grayscale image, and can be manipulated by all of the painting tools and filters to add textures and distortions.

Working with Image Luminosity

Every image is made up of three or four channels of grayscale images that combine to make the color image displayed on the monitor. Each channel can be used to create masks to re-adjust the lighting of the image.

Loading the image luminosity by clicking on the Load Channel as Selection button, translates a channels brightness date to a selection based on all the brightness values above 128. You can also type Cmd + option + ~ to do the same thing.

66466805-L.jpg

Here is a picture on an ibis that could be improved, perhaps, by working with the image luminosity.

Here is the image as posted on smugmug.

66768501-L.jpg


Switch to the channels palette, and drag the blue channel down to the Save as Channel Selection button. This selects the luminosity tones above 127, but we want to invert here to choose the darker tones in the image so Select>Invert.

66773126-L.jpg

Using the Curves command allows us to increase the contrast more effectively in the darker tones after clicking on the alpha channel.

Now we must target where we want the change to be affected, which in this case is the Layers palette. After clicking on the Layers Palette, we activate the alpha channel by typing Cmd + Option + 4 ( or Ctrl + Alt + 4 if you drive a PC )

Now click on the Curves adjustment layer, and it will automatically add a layer mask of the chosen alpha channel. I used an S curve on the Curves adjustment layer and then a Soft Light blending mode on the affected areas of the luminosity mask and ended up with this image

66772555-L.jpg


Adding Textures to Images

Adding texture to an image, can create a new image with character or distinction.

Lets start with a picture of a brick pathway.

67108855-L.jpg


Lets add some texture from this image of tree bark

67109350-L.jpg

First, we inspect each of the color channels in the bark image and drag the grayscale image of the chosen color channel to Create a New Channel button which creates a new alpha channel, as a fifth channel, the copy of one of the RGB channels, at the bottom of the Channel palette well.

Next, we increase the contrast of the newly created alpha channel, by using the Curves command and creating a high contrast image in our mask. Type Cmd+M, or Image>Adjustments>Curves

Next we drag the bark alpha channel image from its location in the Channel palette over on top of the brick image. Dragging the bark alpha channel direct from the Channels palette, over on top of the brick image, automatically creates a new alpha channel image in the brick image.

If the images are different sizes, after dragging the alpha channel from the first image to the second, you may have to type Cmd-T to invoke the Transform command, and drag the corners or the sides of the alpha channel overlay on the second image to cover it properly.


Now, we need to Target the layer which we want to add the texture with Select>Load Selection and choose the R,G, or B COLOR CHANNEL COPY we dragged from the bark texture image.

Add a Curves Adjustment Layer and increase the contrast, and then blend by the appropriate Blending Mode.

There are may ways to vary the effects with this technique. Inverting the alpha channels tones by using a Curves command and changing the angle of the line from 45 degrees to -135 degrees.


And here is the brick with the bark pattern displayed in the Multiply Blending mode invoked twice.

67120590-L.jpg


Here is a signature carved into the rock at El Morro Ntional Monument circa 1709 anno domini.

67109733-L.jpg


And here is the image of the brick paving stones we altered by blending in with the bark image alpha channel.

67120590-M.jpg

I will create an alpha channel of the brick and bark image, by dragging the blue channel down to the Create a New Channel button at the bottom of the Cannel palette. A little curve steepening and I will then drag this new alpha channel to the top of the El Morro signature image.

Another Curves Adjustment layer and some Overlay Blending will arrive here.

67126743-L.jpg

Vector Masks

Vector Masks are created from selections created with the Pen or Shape tool - they are very precise and sharp edged.

Using Paths and Vector Masks.

Here is an image of a V1 buzz bomb, I removed from its background stanchions and stand in Putnam County Indiana.

66775512-L.jpg

Selected by the Pen tool and moved onto a new sky in the background layer. The border of the image was selected by the Select>Modify>Border command with a Gaussian blur of 3 pixels.

67140378-L.jpg

It takes a fair investment of time to get comfortable with the Pen tool for creating selections, but selections created from Paths done with the Pen tools and the use of various kinds of masks are where the real power of Photoshop hides. I recommend learning chapter 4 and 5 carefully.
Pathfinder - www.pathfinder.smugmug.com

Moderator of the Technique Forum and Finishing School on Dgrin

Comments

  • MarkRMarkR Registered Users Posts: 2,099 Major grins
    edited May 1, 2006
    Very cool.

    When I was teaching myself how to use masks, I came up with the mnemonic "black" = "block". That is, anything in a mask that is black will block anything else from showing through.
  • gluwatergluwater Registered Users Posts: 3,599 Major grins
    edited May 2, 2006
    Great summary Jim. I agree that once you learn how to use masks and channels correctly you will wonder what you ever did without them.
    Nick
    SmugMug Technical Account Manager
    Travel = good. Woo, shooting!
    nickwphoto
Sign In or Register to comment.