Create an opacity mask
An opacity mask is a brush whose color is ignored and whose opacity is transferred to the masked object. Wherever the opacity mask is opaque, the masked object will be opaque; wherever the opacity mask is transparent, the masked object will be transparent. Any object can have an opacity mask defined for it through the Appearance section of the Properties panel. For more information about opacity masks, see Opacity masks.
To create an opacity mask on an object using a gradient brush
In the Toolbox, click Selection , and then select a path on the artboard.
Under Brushes in the Properties panel, select OpacityMask from the list, and then click the GradientBrush tab, and then at the bottom of the color editor, select the Lineargradient or Radialgradient option.
To make sure that the mask allows at least a small portion of the object or objects behind to show through, define at least one gradient stop with an alpha value of less than 100 percent.
Back to top
To create an opacity mask on an object using a brush resource
Create a Grid or other layout panel element on the artboard.
Double-click the panel element in order to activate it so that you can add child elements.
Add various child elements that will make up your opacity mask.
For all of your elements, including the layout panel, adjust the Opacity property under Appearance in the Properties panel.
When you have completed your opacity mask design, select the layout panel under Objects and Timeline, and then on the Tools menu, point to Make Brush Resource, and select one of the following available brush types:
Make Drawing Brush Resource A drawing brush paints an area with a drawing, which can include shapes, text, video, images, or other drawings.
Make Visual Brush Resource A visual brush paints an area with a visual that can be updated during runtime if the brush is created from a panel that contains animations or interactive controls. The Create Brush Resource dialog box appears.
Note
A brush resource can be made from any object on the artboard, including art assets that are imported from Microsoft Expression Design 2. Remember that the colors of your brush will be ignored when applied as opacity mask, because only the opacity values create the masking effect.
The Create Brush Resource dialog box appears.
Under Resource name (Key), enter a key name. This is the name by which other elements can reference the resource, thus applying the resource to themselves.
Under Define in, select the option where you want the resource to be defined:
To make the resource available to any document in your application, select Application.
To make the resource available only to the current document, select This document(Window: Window).
To make the resource available only to the object from which you created the resource or its child objects, select This document (object).
To define the resource in a resource dictionary file that can be reused in other projects, select Resource dictionary. You can then select an existing resource dictionary file or create a New one.
Click OK to exit the dialog box and create the resource.
To apply the brush resource as an opacity mask on your object, you can do one of the following:
In the Resources panel, locate your brush resource, and then drag it onto the object on the artboard that you want to mask.
Select the object that you want to mask, and then under Brushes in the Properties panel, click the Brush resources tab and select your brush resource.
Back to top