Content Index Search
 

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

  1. In the Toolbox, click Selection , and then select a path on the artboard.
  2. Under Brushes in the Properties panel, select OpacityMask from the list, and then click the Gradient Brush Gradient brush tab tab, and then at the bottom of the color editor, select the Linear gradient Linear gradient brush option or Radial gradient Radial gradient brush option option.
  3. To ensure 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%.

To create an opacity mask on an object using a brush resource

  1. Create a Grid Grid panel or other layout panel element on the artboard.
  2. Double-click the panel element in order to activate it so that you can add child elements.
  3. Add various child elements that will make up your opacity mask.
  4. For all of your elements, including the layout panel, adjust the Opacity property under Appearance in the Properties panel.
  5. 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 and area with a visual that can be updated during runtime if the brush is created from a panel that contains animations or interactive controls.
    Note A brush resource can be made from any object on the artboard, including art assets that are imported from Expression Design. 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.
  6. 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.
  7. 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.
  8. Click OK to exit the dialog box and create the resource.
  9. 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 Brush resources tab tab and select your brush resource.