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.

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

  1. In the Tools panel, click Selection Cc294816.2ff91340-477e-4efa-a0f7-af20851e4daa(en-us,Expression.40).png, and then select a path on the artboard.

  2. Under Brushes in the Properties panel, select OpacityMask from the list, and then click Gradient BrushCc294816.91fb0c61-7b3b-4ae7-8a59-760e625e3bd7(en-us,Expression.40).png, and then at the bottom of the color editor, select Linear gradient Cc294816.bd5eefed-9628-4363-be5d-29bfb5962175(en-us,Expression.40).png or Radial gradientCc294816.4279aa9a-15c2-4435-9937-6848afc38618(en-us,Expression.40).png.

  3. 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.

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

  1. Create a Grid Cc294816.a87ee957-7fbf-4135-a6ab-6de7e63160aa(en-us,Expression.40).pngor other layout panel object on the artboard.

  2. Double-click the panel object in order to activate it so that you can add child objects.

  3. Add various child objects that will make up your opacity mask.

  4. For all your objects, 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 in the Objects and Timeline panel, 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. 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 objects 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 Brush resourcesCc294816.415db740-5a54-48d2-8678-245ccfa7ee8b(en-us,Expression.40).png and select your brush resource.

Send feedback about this topic to Microsoft. © 2011 Microsoft Corporation. All rights reserved.