Masks Basic Info & Examples

by

D'Lanok de Caresk

Part 1 Basic Operations

Question! What the heck is a Mask?

Each layer of painting in PSP5 has a hidden layer called a Mask. It's a 256 gray scale painting which controls the transparency of each individual pixel on the current layer.

Like the name implies, you can 'Mask' off sections of the current layer, so that only the unmasked area may be seen. Like painting in real life, and removing masking tape from a protected area to reveal the un-painted section below.

However, a layer mask does NOT change any of the picture of the current layer,it merely allows the viewing of a layer in various transparency as long as the mask is active. (When the mask is deleted, see below.)

Question! How about showing that in PSP5?

OK, create a picture in PSP5 16M colors, 300 x 300, transparent, and draw blue lines 10 pixels wide, from corners to corners. Save it for use later as BlueX.psp

We'll be working on the background layer most of the time, but all of this can be applied to each layer.

Click on MASKS>NEW>Hide All(This will create a mask to hide everything on the current layer. We could have gone the other way by Show all, and edit to blank out.)

Now set the checks on Masks>Edit and Masks>View Masks. This allows us to see the mask and make changes to it.

Notice that the blue x is no longer visible, and that the primary/secondary color boxes are gray scale. Click on the primary color box to bring up the palette, and select white 255,255,255 as the primary, and black as the secondary 0,0,0.

Paint a Primary color blob (don't worry about being neat) in the middle of the layer. The blue X of our original layer becomes visible in the white area.Painting with black puts transparent red in, and hides the current layer.

Uncheck Masks>Edit and Masks>View Masks. Now we see the original X but the Mask will be Hiding the ends of the X. The entire X is still there, but parts are hidden by the mask.

Our mask is active in there, too. Swap primary and secondary and paint a black line from side to side of the current layer.

See how the Black line only shows up in the unprotected area?

Now click Masks>Invert and the previously hidden sections become visible, along with the black line that was just drawn, but the previous visible section is now invisible.

Supposing that this mask is one that we realize we'll need again at some point,we'll want to save it. If it'll be used in this picture, we can save it in the Alpha Channel, another hidden layer. Save it now as 'Test'.

Question! Can more than one mask be saved as an Alpha Channel?

Yes! You can save multiple masks in the Alpha Channel, just by giving the current mask a different name for each save. You can load the Alpha channel saves into any layer.

Question! Can I use the mask from an Alpha Channel in another drawing?

If that drawing is open in a different window in PSP5, yes. Otherwise, no. The Mask must be saved to disk to be available to other drawings unconditionally.Saves to the Alpha Channel go with that picture, saves to the drive are available to all.

Question! Does it hurt anything to leave the Mask active, or do I need to delete it before saving.

I recommend that you save in PSP format in order to save the Alpha Channel,Selections, and a lossless compression. There are other formats that will save the mask information, but as a general rule, if the format flattens the layers before saving, the mask information will be lost from the layers and the Alpha Channel.

When deleting the Mask, you'll have the option to Merge the mask into the picture. Merging causes the masking to become a permanent change to the layer.If the mask is not merged, the picture is unchanged.

Question! Does the size of the mask change when loaded into a new picture?

If from a Alpha Channel that's open, no. If from a disk save, yes. The new size of the mask will be proportional from the original to the new, independent proportions in vertical and horizontal. If you create a circle mask in a drawing, save the mask to drive, then load into a canvas with double the vertical size, the mask will have the same width, but twice the height.

Question! That's all nice, but what can I do with it?

Plain and fancy ovals, squares, and edges can be created with the mask feature,then saved for other pictures. You can use the mask to airbush/paint fancy edges into pictures, or even patterns.

All manner of fancy edging may be performed, then the image flattened into onelayer and saved as a web ready image. Note that flattening will erase all current mask data, and further mask operation requires loading a mask or creation of a new one.

Part 2 Advanced Operations

As mentioned in part 1, the mask is a 256 level gray scale picture, and we've seen the Black/White operation. The gray scale allows much more flexibility than has been seen.

What the Mask actually controls is the opacity of each pixel in a drawing.Where we painted white into the mask, the pixels had no transparency, black was totally transparent.

Any level between those, sets the opacity of a picture pixel to one of 256 transparent levels.

The gray scale mask can be created from any of the normal editing tools, such as Fill, Airbrush, pen, and even an existing picture. When editing the mask, even selection works correctly.

Reload BlueX, create a new mask on layer 1, check View and Edit. Use the selection tool to select a part of the picture and the Fill Tool to fill the selection with a medium gray 127,127,127.

Notice that the red color is more transparent, and when Show Mask is unchecked,the gray mask area is about 50% transparent.

While the Show Mask is unchecked, but Edit Mask is , let's see what editing the mask when it's not visible is like. Use the brush with various gray levels to paint, and notice how the transparency changes with the strokes of the brush.

This can be quite dramatic if you're working on a upper layer, with a picture below. As you paint, the lower level is more or less visible, with each stroke of the brush.

You may load a mask from the current image, by Masks>New>From Image>This Image

Edit the gray scale mask with any tool, then use all or part of the mask to change colors, feather between images, and so on.

I think that just about covers the operation of the MASK. I've covered the operation of masks, or at least enough to get you started. After playing with the exercises in these pages, you'll have the ability to understand all of the mask examples on the web.

D'Lanok de Caresk