tutorial photopaint
indietroindiceavanti
41) Work with masks (advanced)
Simple masks are easy to make.
Complex masks, on the other hand, can sometimes take hours to create, so saving a mask becomes almost as important as saving the image.immagine

Saving a Mask

All masks created in Corel PHOTO-PAINT can be saved and reloaded.
This ability to save masks is essential because:
1) only one regular mask can exist on an image at a time: so to use multiple masks during a project, it becomes necessary to store them;
(using Additive mode, you can create several mask outlines, but the result will be one regular mask)
2) if you spent several hours creating a mask, it is essential to have a copy;
3) a mask is a great way to copy the same size image are out of several different images.

Saving a Mask with the Image

immagine There are two ways that a mask can be saved:
it can be saved to disk or saved with an image in a temporary storage called a channel.
An image containing a regular mask, that is saved in Corel PHOTO-PAINT format, will have its mask saved with the image automatically.
In addition to Corel PHOTO-PAINT format, masks can be saved in TIFF (.tif) formats.
They are also saved as alpha channel information when an image is saved as an Adobe Photoshop (.psd) image.
Saving masks to disk is just like saving image files.
Assuming you have a mask you want to save, choose Mask/Save and the drop-down menu shown above opens:
choose Save Mask to Disk and, when prompted, select a drive and folder from the dialog box, name the mask file and select the file type (CPT is strongly recommended).
note: do not use a unique extension such as .msk for the mask: this three-character extension is used by Corel PHOTO-PAINT and other applications to determine the correct import filter to use. Although the mask can be saved in any bitmap format (PCX, TIFF, BMP, and so on), it is recommended to save masks in Corel PHOTO-PAINTs native CPT format.
The ability to save a mask apart from the image allows a mask created in one image to be loaded and applied to other images for special effects or accurate placement of objects.
How a different application uses the saved mask information depends on the application. For example, the mask information in a .tif or .tga file is interpreted by Photoshop as an alpha channel.

Loading a Mask

immagine The Load Mask function allows a wide variety of image file formats to be loaded as masks.
Any image file can be used for a mask: using photographs or other non-mask files may give unpredictable, although not necessarily undesirable, results. A non-mask file is any image file that was not created using the mask tools in Corel PHOTO-PAINT.
When loading a mask, it is important to be aware that Corel PHOTO-PAINT will resize the mask to fit the image!
note: if you have several images open on your screen, make sure that the one you want to load the mask into is active: if you load the mask into another image, the mask may replace any existing mask in that image, depending on the mask mode.
Loading a mask into an image involves the following procedure:
1. Select the image to which the mask being loaded will be applied.
2. Choose Mask/Load/Load from Disk: the Load a Mask from Disk dialog box opens.
3. Select the file to be used for a mask: while any image can be used, the mask will become a black-and-white or grayscale image.
4. Click the Open button and a thumbnail of the mask you are loading will appear on the cursor, as shown next. The mask being loaded in this illustration is a mask of the word "mas".At this point you have two options:
a) click the cursor anywhere on the image and the mask will be applied to the entire image, as shown (below left).
b) click and drag a rectangle and the mask will be resized to the shape you dragged: center figure shows a mask that was made much smaller and in the right figure, the mask was made larger (and a little bit lower) than the original: this action can cause some deterioration of the edges.
original mask mask resized smaller mask enlarged
immagine  immagine  immagine

Saving a Mask As an Alpha Channel

Since only one mask can be active in an image, each new mask you create replaces the current mask.
When creating special effects, it is possible to use three or more masks.
While we could save each of these to disk, as previously described, we also have the option to save the current mask to an alpha channel in the image so that it can be reused.
When you save an image to a file format that supports mask information, such as Corel PHOTO-PAINT (.cpt) or TIFF bitmap (.tif), the current mask and all alpha channels are saved with the image.
You can also save the current mask or an alpha channel to disk as a separate file.
Saving a mask or an alpha channel lets you use masks in other images.
This is especially useful if you want to save an image to a file format that doesn't support mask information, but you want to keep copies of the masks used to edit that image.
Saving a mask to an alpha channel is also very easy: choose Mask/Save/Save As Channel.immagine
This opens the preceding dialog box that asks you to name the channel in which the mask will be stored, as shown (default: Alpha1, Alpha2,...). The mask is now safely stored as an alpha channel. Managing Masks and Channels
The alpha channel can hold a large number of masks.
To load a mask from the alpha channel, choose Mask/Load and the drop-down menu that appears, shown next, displays all of the alpha channels that have currently been assigned.
The Channel docker
the Channel docker (shown right) has many masks stored as alpha channels: one of those is also the current mask.
Whenever you click a channel, its contents appear in the current image window.
note: you cannot delete any of the color channels using the Delete icon.
The size of the thumbnails in the docker is controlled by the flyout option in the upper-right corner of the docker.immagine
Exploring Channels
The top entries are the composite (RGB, in the example) and, below, the individual channels.
Whenever a mask is created, the Current Mask appears below the individual color channels. Although an image can have only one mask at a time, you can store many different masks with an image in the form of channels.
You can create a new channel without a mask by clicking the Create New Channel button at the bottom of the docker.


Removing a Mask

immagine Click the Remove Mask button located on the Mask/Remove (CTRL+R).
A mask must exist on the active image for the mask button in the toolbar to be available.
Use the DEL key: a mask may also be removed with the DEL key if the mask is selected as indicated by the control handles (the mask is selected whenever the Mask Transform tool is selected).
If the mask is not selected, the DEL key will clear the contents of the mask. Therefore, use the DEL key with caution.


Inverting a Mask

immagine One of the more useful mask functions is the Invert Mask command (CTRL-SHIFT+I).
When a mask is created, the area inside the mask can be modified while the area outside the mask is protected.The Invert Mask command reverses the mask so that the area that was inside the mask now becomes protected and the area outside can be modified.
The Invert Mask command can be accessed through the Mask menu on the Mask/Object toolbar by clicking the Invert Mask button or with the keyboard combination CTRL-SHIFT+I.
note: some masks are so complex that it is difficult to determine what part of the image lies inside or outside of the mask. A quick way to check is to select the Mask Overlay button on the Mask/Object toolbar. Only the tinted area (red, by default) is protected. The Mask Overlay is a display function and does not affect the operation of PHOTO-PAINT.

Select All

immagine To mask the entire image, click the Select All button from the Mask/Object toolbar or choose the Select All command in the Mask menu.
You can select the entire image by double-clicking any of the Mask selection tools in the Toolbox except the Mask Brush tool.
The mask will encompass the entire image inside of the image window. If the image is only partially visible because you have zoomed into an area, the entire image is still masked.
Manipulating Masks
After a mask has been created, we often need to modify it.
Corel has provided several mask manipulation tools to help us do this.

Feather Mask

immagine Technically speaking, feathering a mask changes the transparency of the pixels located near the mask boundary: any effect or command applied to the selection fades gradually as you get near the protected area.
Feathering can be applied to a mask during or after its creation.
It is particularly useful if you want to apply an effect to the masked area but not the surrounding area: feathering a mask makes the transition between the two areas gradual and, therefore, less noticeable.
Photo, below, shows an example of an object created from a photograph using a nonfeathered mask and one from a feathered mask (right).
immagine immagine immagine immagine
immagine
On the property bar, we can set only the inside feather width (below) Whether you select Mask/Shape/Feather from the Mask menu, a dialog box opens enabling you to set the direction, amount and type of feathering to be applied to the current mask.
The Width setting determines how wide a feather to apply to the mask edge.
We also have a choice of two different Edges: Linear and Curved.
inside middle outside average
immagine immagine immagine immagine
Above, the Feather Mask command was applied to identical masks.
The masked area was filled with 100 percent black fill and zoomed to 300 percent.

The Shape Category Mask Commands

immagine Some of the other mask commands you may have occasion to work with are located in the Shape category of the Mask menu: Border, Remove Holes, Smooth, Threshold, Expand, and Reduce.
Border
The Border command removes a portion of an existing mask to a border according to the setting in the Border dialog box.
It offers the option of three different Edges settings: Hard, Medium, and Soft. Borders only move outward from the mask regardless of the Mask Mode setting.
Be careful when applying this command to circles: it tends to degrade the general shape of the circle.
In the next illustration, the mask created from a square has a 20 pixels border applied, creating a diffuse glow: the preview feature of the mask is shown in left image.
note: for a creative effect, try applying the Border command to a square or rectangular mask multiple times (right).
immagine immagineimmagine

Remove Holes

Remove Holes is supposed to remove those nasty little mask fragments that tend to be left when using the color-sensitive masks.
As a result, when the conditions of the mask and image are suitable, it works great.
It has no adjustable settings.
Smooth
The Smooth command creates a more fluid mask boundary by smoothing out sharp bends (jaggies) in the mask that occur especially when creating color-sensitive masks.
Some pixels that are not in the selection before smoothing will become part of the selection after smoothing and some pixels that are currently in the selection will no longer be included in it.
The Smooth command, like the Remove Holes command, can sometimes eliminate entire portions of a mask.
The amount of smoothing this command does is dependent upon the Radius setting you enter in the dialog box.
Large values tend to completely change the shape of the mask.
Below you can see an example:
(a): the original ragged mask edge;
(b): smooth at 10;
(c): smooth at 30;
(d): smooth at 50;
in c and d, the Radius setting of the Smooth mask command has significantly altered the shape of the mask.
immagineimmagineimmagineimmagine

Threshold

The Threshold command is the opposite of the Smooth command.
When you have a mask with an indefinite edge, as with a feathered mask, this command makes it into a binary (black-and-white) mask by applying a Threshold function to it.
It allows to make the edges of masks more distinct.
The only setting, Level (1-255), determines which grayscale values in the mask become white (below the Level setting) and which become black (above the Level setting).
Expand and Reduce
Use them to make masks larger or smaller. Like the Border command, these commands tend to degrade shapes with large values or multiple applications.
threshold: level 150 expand: 7 pixels reduce: 7 pixels
immagine immagine immagine

The Color Mask

immagine Most of the color-sensitive masks could only include colors that were connected to the original sampled color. The Color mask, like the Similar command, selects pixels by their color content, regardless of the position of the selected pixels in relation to the original sample point. immagine Selecting Color Mask, located in the Mask menu, opens the dialog box shown below. The dialog box is quite simple to use: use the eyedropper to select colors in the image that you want masked.
If you don't like the result of one of the color selections, remove the checkmark from its box.
Use the Preview (it looks like an eye) option to determine how successful the color selection process has been and click the OK button.
1) the Color mask uses a dialog box: so you must complete the selection of the mask and apply the mask before you can do any other operation.
2) the Color mask command does not create a Color mask: it creates regular masks.
When you save a Color mask, you are saving the settings of the Color Mask dialog box.
3) Preview of the mask made by the Color Mask tool is done on the actual image.
Selecting individual colors in a complex image can take time, even with the Color mask.
The first step is to mask all of the colours we have to change:
1) Select Mask/Color Mask to open the dialog box;
Click the Reset button to clear any previous settings;
2) Click the Eyedropper button and place the cursor in the image and it will become an eyedropper; Click the image at desired colour portions of the image;
3) Click the Preview button and the image in the Preview shows masked (protected) areas in a red tint. Click the OK button.
immagineimmagineimmagine
4) Select Mask/Mask Overlay.
Select the Mask brush and change the mode to Subtractive by clicking the minus button on the property bar (if you wrong, change mode to Additive).
Now paint all of the areas outside of boundaries.
note: technically, you could use the mask marquee to find the areas to remove, but it is much better to use Mask Overlay.
When you have finished with the mask, turn off the mask overlay.
5) Here to change the color, Image/Adjust/Hue-Saturation-Lightness has been chosen.
Edit the Hue setting to +100 and click OK.
immagine immagine
Additional Information About the Color Mask
There are other controls in the Color mask dialog box that deserve some explanation.
Across the top are the four Mask Mode buttons and the Invert Mask button:
the Mask Mode buttons control how the mask you make with the Color mask tool reacts to an existing mask;
the Invert mask is a feature that allows you to either protect or select the sampled colors.
When you click the Reset button in the Color Mask dialog box, it resets the mask mode to whichever mask mode PHOTO-PAINT is in.
Clicking the "More »" button on the Color Mask dialog box opens the rest of the dialog box, containing a few additional settings that modify how this mask tool operates.
From the expanded dialog box, you can determine what criteria the Color mask uses to select its color: you can use HSB instead of Normal mode.
For most applications, the Normal setting (default) will do the job.
HSB uses a combination of hue, saturation and brightness to make its selection of colors.
You can also select to use the HSB components individually to determine which colors are selected. The Threshold settings act just like the Threshold filter: they use the value of the Threshold slider to cause the created mask to move toward either white or black.
Click the flyout option arrow to get even more options:
you can save all of the settings as a Color mask file: this file can be loaded into the Color mask and used at a later time;
the Color mask can also be saved to an alpha channel through this option: when saved as an alpha channel, it is a grayscale image that can be used as a mask but cannot be loaded as a Color mask file later on;
set Tolerance Default sets the default tolerance value that is used when colors are sampled: the default setting for the Color Mask tool creates a mask in Sampled, Colors mode: in this mode, everything that is not selected is protected;
if you right-click one of the color selections, the Delete Color and Edit Color options become available: choosing Edit Color opens the Color Palette dialog box from which you can specify a color to select: if, for example, you wanted to select every place in the image that the color PANTONE CV742 was used, this is where you would make the selection;
at the top of the Color mask (next to the Eyedropper icon) is a large list of preset settings that allows you to quickly select a type or range of colors or shades;
I strongly recommend that you use Sampled Colors;.
the Preview button changes the image so that you can see the parts of the image that are currently masked; there are several options available for viewing the Color mask:
the default setting is Overlay, which places a tint over the masked area: the advantage is that you can see the mask in relation to the image;
another way to preview the mask is the Grayscale setting: in which you cannot see the image, just the grayscale image that is the mask;
the Black Matte or White Matte preview options display protected areas covered by a black-tinted transparent sheet or by a white-tinted transparent sheet, Marquee displays a dotted line around the editable area, just like the mask marquee normally displayed for masks.
Using the Color Mask More Productively immagine
If you are attempting to mask a narrow range of colors, like the blue in a sky, use multiple samples or take a single sample and increase the Numerical setting for it; many times when selecting a color or range of colors, you end up with parts of the image selected that you didn't want selected: rather than waste time trying to balance the color and Numerical settings to get the "perfect" mask, use the Color mask dialog box to create most of the selection and then use the mask tools to fine tune the mask to its final shape;
when changing the Numerical value, the Preview window won't reflect the changes until you press the Enter key or click another color.
immagineimmagine immagine
Paths

immagine Paths are line and curve segments connected by square endpoints called nodes.
A mask is created from a bitmap image;
a path is a vector drawing that exists on a layer above the image and is independent of the image resolution;
a closed path completely encloses an area, as a mask would, an open path has start and end nodes that are not connected: this is something that a mask cannot do.
The advantage of the path over the mask is, in a word, precision.
A path, being a vector image, can be precisely edited;
a mask, being a bitmap image, is adjusted by adding or subtracting from it with a Brush tool or something similar.
With a path, you have full Bezier-level control over the points and nodes, just as you have in CorelDRAW.
When you need to make accurate masks, you will want to create a path using the Path Node Edit tool.
New paths can be created using the Path Node Edit tool or existing masks can be converted to paths: when the path is exactly the shape you want, you can save the path or convert it to a mask, or both; a mask can be converted to a path, edited as a path and converted back to a mask.
If you export a mask as a part of an encapsulated PostScript (EPS) image, the mask is converted to a path.
immagine immagine

Stroke Mask/Path Command

immagine This command is used to automatically apply brush strokes along a path defined by either a mask or a path. You can use it to apply many of the brushes.
Operation of this puppy is simple: select the brush/tool you want to apply;
make any changes to the size or shape of the nib, and then click the appropriate button on the property bar, this opens the dialog box where you can select a stroke on, inside or outside the mask; to make the Stroke Mask or Stroke Path options available, there must be a mask or path on the image and one of the following tools must be selected: the Paint tool, the Effect tool, the Color Replacer tool, the Eraser tool or the Image Sprayer tool.
immagine immagine immagine immagine immagine
by Dave Huss ("The Official Guide, Corel PhotoPaint 10")
icosu
italiano
indietroindiceavanti