<a name="1019774"> </a>You can create a layer mask to define what areas of a layer are visible in the document window.
</p>
<p id="1019828" class="Body">
<a name="1019828"> </a><span style="color: #000000; font-style: normal; font-weight: bold; text-decoration: none; text-transform: none; vertical-align: baseline">Masking</span> originated as a technique for creating color separations, where sheets of masking material were hand-cut to define the color regions in an image. In the Corel Painter digital workspace, the layer mask is a powerful tool for controlling image composition and effects.
</p>
<h3 id="1019780" class="Heading2">
<a name="1019780"> </a>Layer Masks vs. Channels
</h3>
<p id="1019764" class="Body">
<a name="1019764"> </a>A layer mask is similar to an alpha channel. Both are grayscale images that you can create and edit. Although the Channels palette provides access to both channels and layer masks, their characteristics and functions are different:
</p>
<ul>
<li class="SmartList1"><a name="1019765"> </a>The canvas can have up to 32 alpha channels; each layer can have at most one layer mask.</li>
<li class="SmartList1"><a name="1019766"> </a>Channels don't influence the visibility of the canvas image; a layer mask defines what areas of a layer's image are visible.</li>
<li class="SmartList1"><a name="1019460"> </a>An alpha channel, when loaded, protects designated areas of an image; a layer mask does not provide protection.</li>
<li class="SmartList1"><a name="1019920"> </a>A channel is enabled by loading it to a selection; a layer mask can be enabled and disabled at any time.</li>
</ul>
<p id="1019895" class="Body">
<a name="1019895"> </a>For more information about channels, refer to <a href="13-Channels3.html#1012691">"Understanding Alpha Channels"</a>.
</p>
<h3 id="1019883" class="Heading2">
<a name="1019883"> </a>Creating Layer Masks
</h3>
<p id="1019464" class="Body">
<a name="1019464"> </a>A layer mask is a grayscale image. Where the mask is white, the layer content is visible; where the mask is black, the layer is transparent, revealing the imagery below it. Intermediate levels of gray are partially transparent.
</p>
<p id="1019524" class="Body">
<a name="1019524"> </a>You can create a new, blank layer mask, or you can create a layer mask based on the layer's transparency. A layer mask based on transparency is white wherever the layer has content, and black in other areas. For more information about layer transparency, refer to <a href="14-Layers9.html#999411">"Preserving Layer Transparency"</a>.
</p>
<p id="1020577" class="Body">
<a name="1020577"> </a>You can also copy a channel to a layer mask.
<a name="1019477"> </a><i>A layer mask for the butterfly layer is created based on its transparency. Black areas are transparent; white areas reveal the image.
</i></p>
<h5 id="1019456" class="ToDoHead">
<a name="1019456"> </a>To create a new, blank layer mask
</h5>
<ol type="1">
<li class="SmartList1" value="1"><a name="1019536"> </a>Select a layer.</li>
<li class="SmartList1" value="2"><a name="1019540"> </a>Do one of the following:</li>
<li class="SmartList1"><a name="1019582"> </a>You can create layer masks based on transparency for pixel-based layers only. Other layers must first be converted to default layers.</li>
<li class="SmartList1"><a name="1019667"> </a>Earlier versions of Corel Painter used layer visibility masks. If you have a file with a modified visibility mask that was created with an earlier version of Corel Painter, use this procedure to load the visibility mask to a layer mask.</li>
</ul>
<h5 id="1020563" class="ToDoHead">
<a name="1020563"> </a>To copy a channel to a layer mask
</h5>
<ol type="1">
<li class="SmartList1" value="1"><a name="1020564"> </a>Align the layer with the portion of the channel you want. </li>
<li class="SmartList1" value="2"><a name="1020565"> </a>Select the layer on the Layers palette.</li>
<li class="SmartList1" value="3"><a name="1020578"> </a>Click the Create Layer Mask button.</li>
<p id="1020579" class="ToDoBody">
<a name="1020579"> </a>A blank layer mask is created.
</p>
<li class="SmartList1" value="4"><a name="1020566"> </a>On the Channels palette, select the channel you want to copy.</li>
<li class="SmartList1" value="5"><a name="1020567"> </a>Click the palette menu arrow, and choose Duplicate. </li>
<li class="SmartList1" value="6"><a name="1020568"> </a>In the Duplicate Channel dialog box, choose the layer mask from the Destination pop-up menu. </li>
<p id="1020572" class="ToDoBody">
<a name="1020572"> </a>Corel Painter copies to the layer mask the portion of the channel that coincides with the layer content.
</p>
</ol>
<h3 id="1020385" class="Heading2">
<a name="1020385"> </a>Selecting and Viewing Layer Masks
</h3>
<p id="1020449" class="Body">
<a name="1020449"> </a>Before you work with a layer mask, you must select it. You can also view a layer mask as a grayscale image. Selecting a layer mask and viewing it are distinct operations-you can select a layer mask without viewing it.
</p>
<h5 id="1020505" class="ToDoHead">
<a name="1020505"> </a>To select a layer mask
</h5>
<ol type="1">
<li class="SmartList1" value="1"><a name="1020457"> </a>On the Layers palette, choose a layer that has a layer mask.</li>
<p id="1020458" class="ToDoBody">
<a name="1020458"> </a>The layer mask is displayed on the Channels palette.
</p>
<li class="SmartList1" value="2"><a name="1020459"> </a>Do one of the following:</li>
</ol>
<ul>
<li class="Bulleted2"><a name="1020460"> </a>On the Channels palette, click the layer mask.</li>
<li class="Bulleted2"><a name="1020461"> </a>On the Layers palette, click the layer mask icon <img src="images/14-Layers69.jpg" height="16" width="16" border="0" hspace="0" vspace="0" />
next to the layer name.</li>
</ul>
<h5 id="1020408" class="ToDoHead">
<a name="1020408"> </a>To view a layer mask
</h5>
<ol type="1">
<li class="SmartList1" value="1"><a name="1020409"> </a>Select a layer with a layer mask.</li>
<li class="SmartList1" value="2"><a name="1024620"> </a>On the Channels palette, click the layer mask. </li>
<p id="1020415" class="ToDoBody">
<a name="1020415"> </a>In this mode, the RGB image is hidden.
</p>
</ol>
<h5 id="1020416" class="ToDoHead">
<a name="1020416"> </a>To hide a layer mask
</h5>
<ul>
<li class="SmartList1"><a name="1020417"> </a>Click the eye icon next to the layer mask item to close the eye.</li>
</ul>
<h3 id="1019532" class="Heading2">
<a name="1019532"> </a>Managing Layer Masks
</h3>
<p id="1019651" class="Body">
<a name="1019651"> </a>You can copy a layer mask to an alpha channel.
</p>
<p id="1019983" class="Body">
<a name="1019983"> </a>If you've finished working with a layer mask, you can delete it. You can also clear a layer mask without deleting it, leaving you with a blank mask.
</p>
<p id="1019972" class="Body">
<a name="1019972"> </a>The layer mask is a grayscale image. By inverting it, you can make dark pixels light, and light pixels dark.
</p>
<p id="1020209" class="Body">
<a name="1020209"> </a>You can disable a layer mask, which lets you view the entire layer. The layer mask can be re-enabled at any time.
</p>
<p id="1020210" class="Body">
<a name="1020210"> </a>If you like the result of a layer mask, you can apply it. This permanently removes the hidden parts of the layer and deletes the layer mask.
</p>
<p id="1020138" class="Body">
<a name="1020138"> </a>Although a layer mask does not protect areas of a layer from being edited, you can load a layer mask to a selection. The selection provides protection to the hidden parts of the layer. For more information about selections, refer to <a href="12-Selections3.html#998948">"Working with Selections"</a>.
</p>
<p id="1020332" class="Body">
<a name="1020332"> </a>The name of a layer mask on the Channels palette reflects the name of the layer (<span style="color: #000000; font-style: normal; font-weight: bold; text-decoration: none; text-transform: none; vertical-align: baseline">Layer Name</span> Layer Mask). Although you cannot change the name of a layer mask, it automatically updates if you change the layer name.
</p>
<p id="1020627" class="Body">
<a name="1020627"> </a>When you move a layer, Corel Painter also moves the layer mask to maintain the pixel correspondence.
</p>
<h5 id="1020074" class="ToDoHead">
<a name="1020074"> </a>To copy a layer mask to a channel
</h5>
<ol type="1">
<li class="SmartList1" value="1"><a name="1020009"> </a>Select a layer mask.</li>
<li class="SmartList1" value="2"><a name="1020150"> </a>On the Channels palette, click the palette menu arrow, and choose Duplicate.</li>
<li class="SmartList1" value="3"><a name="1020010"> </a>In the Duplicate Channel dialog box, choose New from the Destination pop-up menu.</li>
<li class="SmartList1"><a name="1020012"> </a>You can also copy to an existing channel, which replaces that channel. To do this, choose the channel to be replaced from the Destination pop-up menu.</li>
</ul>
<h5 id="1020013" class="ToDoHead">
<a name="1020013"> </a>To delete a layer mask
</h5>
<ol type="1">
<li class="SmartList1" value="1"><a name="1020014"> </a>Select a layer mask.</li>
<li class="SmartList1" value="2"><a name="1020162"> </a>Do one of the following:</li>
</ol>
<ul>
<li class="Bulleted2"><a name="1020015"> </a>On the Channels palette, click the palette menu arrow, and choose Delete.</li>
<a name="1020285"> </a>To load a layer mask to a selection
</h5>
<ol type="1">
<li class="SmartList1" value="1"><a name="1020289"> </a>On the Layers palette, select a layer that has a layer mask.</li>
<li class="SmartList1" value="2"><a name="1020296"> </a><span style="color: #000000; font-style: normal; font-weight: bold; text-decoration: none; text-transform: none; vertical-align: baseline">Control</span>+click the layer mask icon (Mac OS) or right-click the layer mask icon (Windows), and choose Load Layer Mask to Selection.</li>
</ol>
<h3 id="1015344" class="Heading2">
<a name="1015344"> </a>Editing Layer Masks
</h3>
<p id="1020747" class="Body">
<a name="1020747"> </a>When you select a layer mask, you can edit it as you do a channel. You can paint in a layer mask; apply effects to it; fill it with a color, pattern, gradient, or weave; and feather it. You do not have to view a layer mask to edit it; you can select the layer mask, make changes to it, and view the resulting image immediately.
</p>
<p id="1024647" class="Body">
<a name="1024647"> </a>For information about editing layer masks, refer to <a href="13-Channelsb6.html#1009435">"Editing Channels"</a>.
<a name="1020751"> </a><i>A layer mask before and after feathering
</i></p>
<p id="1024446" class="Body">
<a name="1024446"> </a>When you edit a layer mask, you are making modifications to the mask, and not to the layer's image. You can use shades of gray only; no colors are available. This is because the layer mask is a grayscale image, separate from the RGB image.
</p>
<p id="1015346" class="Body">
<a name="1015346"> </a>The paint and effects you apply to a layer mask are reflected as follows:
</p>
<ul>
<li class="SmartList1"><a name="1015347"> </a>Applying white removes from the mask, which reveals more of the layer. </li>
<li class="SmartList1"><a name="1015348"> </a>Applying black adds to the mask, which conceals more of the layer. </li>
<li class="SmartList1"><a name="1015349"> </a>Applying an intermediate gray value makes the mask semi-transparent.</li>