Wednesday, April 7, 2010

SELECTIONS, ALPHA CHANNELS & LAYER MASKS

SELECTIONS, ALPHA CHANNELS & LAYER MASKS


Many authors have suggested that selections, alpha channels and layer masks are essentially the same thing.  To the extent that they are all represented internally as grayscale images, this is true.  However there are important  differences between these "masks" which affect their persistence and the manner in which they control image editing.

A selection is a temporary map that limits the effect of various manipulations to selected portions of the image while that selection is active.  By default, an active selection is outlined by a marquee, however the marquee may be concealed / revealed while leaving the selection active.  {Ctrl+H}.  The selection may be made inactive (non-operative) {Ctrl+D} or {Select > Deselect} in which case it is stored in memory and may be recalled {Select > Reselect}.   While the most recent selection is stored in memory, it will be over-written when any new selection is created and is not preserved when the file is saved.

A selection may be saved by converting it to an ALPHA CHANNEL (by definition an alpha channel is a saved selection).  With selection active:

·  {Select > Save Selection}
·  In Channels Palette, click {Save selection as channel}.
The alpha channel will be saved with the file  (in psd and tif format) and the selection it represents may be activated at any time:
·  In Channel Palette select channel & {Load channel as selection}
·  Drag the channel to {Load channel as selection} button.
·  {Ctrl click} the channel in Channel Palette.
·  Select > Load Selection and then choose from the list of channels.
Converting a channel to a selection is not limited to alpha channels.  Any of the color channels may be used.  The resulting selection will consist mostly or entirely of partially selected pixels depending on the darkness of the color channel's gray scale image.  The selection marquee will outline only those pixels that are more than 50% selected.

An alpha channel may also be created without first making a selection:
·  In Channel Palette {Make new channel} button.

By default the new channel appears in reveal all mode (i.e. no masked areas).  The new channel is then edited by painting with white to reveal (select) areas of the image and with black to conceal areas (remove from selection).  Intermediate shades of gray result in partial selection of pixels.


EXERCISE A:
1.      Open a file.  Any photo file will do.
2.      Duplicate the background layer.  Some of the operations to follow will not work on the background layer, and some will.  At this point it is not instructive to figure out which is which, so we will just work with the background copy.
3.      Select the background copy layer.  Using any of the selection tools (rectangular marquee works fine).  Set  feather = 0 and select a portion of the image.
4.      Image > Adjustments > Hue/Saturation.  (Any of the image adjustments may be used; this one is quick and easy.
5.      Make a radical shift of the Hue and Saturation sliders until the selected area of the image shows a very distinct change.  Click OK.
6.      Turn off the visibility of the background layer (not the copy) and turn it on again. 

A.  Notes:
·        Only the selected portion of the image was changed by the adjustment.
·        This was what is known as a destructive edit.  There's no going back and undoing or tweaking what you did with that adjustment.  Sure you can back up the history to where you first created the background copy and start again.  But if you have subsequently performed several other edits and then decide to go back, you will have to repeat all your work.  There's a better way.
·        The visibility of the background layer has no effect on the appearance of the image.  The background copy conceals it completely.

EXERCISE B:
1.      Back up the history to step 3. above, where you have just made the selection.
2.      At bottom of Channels Palette click on the second icon: "Save selection as channel".  A new layer will appear in the channels palette, labeled "alpha 1". 
3.      Select > Deselect (or Ctrl + D) to get rid of the selection.  You don't need it now and, when you do, it has been saved as the alpha 1 mask.
4.      Make the alpha 1 channel visible.  The famous rubilith mask appears, covering everything except the area you selected.  Personally I dislike the color of this mask so I double click the mask icon to bring up the Channel Options dialog.  Click on the color button and select black.  Leave the other options at their default settings (opacity = 95%). 
5.      Select the alpha 1 channel.  Select the brush tool and choose an appropriate size and hardness with Opacity = 100%.  Ensure that the default foreground and background colors are white and black respectively.
6.      Edit the mask:  Paint a small area with white on the colored (masked) portion to erase the mask.  Paint an X with black in the middle of the uncolored (unmasked) to add to the mask.  To convince yourself that you really have painted with white and black, turn off visibility of the RGB channel.  Now only the mask channel shows, in glorious black and white.


7.      Turn on visibility of RGB channel.  Turn off visibility of alpha 1 channel.  At the bottom of  the channel palette click the first icon: "load channel as selection".  Return to the layers palette.  Note that the selection marquee now replicates your edited mask.

B.  Notes:
·        You have seen how to save a selection as an alpha channel (a mask).  This mask can then be edited to include and/or exclude areas of the image using a brush.  This is an excellent means to fine tune a crude selection initially made with one of the other tools like the lasso or marquee.
·        The edited mask can then be loaded as a selection and used just as any selection.  You can make other selections and later return to the mask; the alpha channel will be saved with the image (in psd or tif format).

EXERCISE C:
1.      Pick up right where you left off in step B7 above.  Your mask has been loaded as a selection and select the background copy layer in the layers palette.
2.      At the bottom of the layers palette click the fourth icon "Create new fill or adjustment layer".   For this exercise select Hue/Saturation; but remember, in practice any type of adjustment may be made with this method.
3.      As you did in exercise A, shift the hue and saturation sliders until a distinct change occurs in the previously selected portions of the image.  Note two things that occur as soon as you choose Hue/Saturation:  the selection marquee disappears, and a new layer appears in the layers palette with a mask icon that replicates the previous selection.  Click OK to accept the adjustment.
4.      Now imagine it is several editing steps later and you decide you don't like the hue/saturation adjustment.  Piece of cake.  Double click the left hand icon in that adjustment layer and presto, the hue/saturation dialog reappears just as you left it.  Readjust the sliders to your taste.
5.      And suppose you decide that the area selected for this adjustment isn't quite right.  Easy to fix:  Select the adjustment layer.  Switch to channels palette. 
6.      In the channels palette you will find a mask labeled "hue/saturation".  Select this channel and make it visible.  Double click on the mask icon and in the Channel Options box set opacity to 95%. 
7.      Edit this mask with the brush tool by painting with black and/or white just as you did in exercise B6.  When finished, turn off visibility of this channel and return to the layers palette.
8.      Note that your adjustment now effects an area consistent with the edited mask.

C. Notes:
·        Just as in exercise A. the adjustment was confined to the selected area.  Here however you have performed a non-destructive edit.  You can return to this adjustment at any time and modify it as well as the area of the image it affects.
·        If no selection is active at the time the adjustment layers is added, the mask is completely "white" and the adjustment will affect the entire image.

No comments:

Search This Blog

ShareThis