Pixel Masking Previous

Chapter 18, Masking
Masking Parameters

The masking parameters are in a separate tab in the Tool UI. This tab is immediately to the right of the tool tab the mask will originate from.

Show full-size image

Select: To:
Create Create an instance of a masking tool selected from the pull-down list. The tool is created in the current composition and its output is connected to the Mask input of the current tools. The list is editable in the user settings tab under Masking Menu Tools.
Edit Return to the tool UI to change its parameters.
Active Determine whether masking is enabled or disabled. By default, masking is on.

Note: If no image is connected to the Mask input, the value of Active has no effect. That is, no masking is applied in any case.
Invert Invert the mask prior to using it in the blend operation. By default, Invert is off.
Channel Select one of R, G, B, A. This is the channel of the Mask image to be used for masking. By default, Channel is A.
Intensity Scale the mask (after optional inversion) prior to using it in the blend operation. By default, Intensity is 1 (full intensity).

The list of tools in the masking tool menu contains all plug-in tools that describe they can act as masks. The most recently used masking tool becomes the default selection in the menu, for all maskable tools. This most recently used masking tool is stored as a user setting.

When you add a masking tool from the masking tool input menu, it is added to the dependency graph and its output is connected to the masked tool's input. If there is already a tool connected to the masking input, there are two behaviors:

Note: A masking tool with no image input, such as a mask generator, takes its output format and resolution from the composition settings.

The Active, Invert, Channel, and Intensity controls in the masking tab correspond to the Masking structured input. The Image text field shows the name of the node connected to the masking input (if any).

Pixel Masking Example Top

The following example illustrates how you can use several masking inputs to perform simple color corrections (using CC Basics) on different parts of an image.

Show full-size image

By using the masking inputs, four color corrections (sky, water, sand, and chairs) were quickly applied.

Show full-size image

  1. Original Image

Show full-size image

  1. Sky corrected
  1. Water corrected
  1. Sand corrected
  1. Chairs corrected

Compositing Operators

The following table lists the compositing operators applicable between generated masks and previously composited masks:

Operator Result:
Over Composites the generated mask (front) over the previously composited masks (back). The output will cover any area covered by either the front or the back. Where the front and back overlap, the output will show the front.
Replace Completely replaces the previously composited masks with the generated mask.
Atop Similar to the Over operator, but the output will cover the same area covered by the previously composited masks.
Inside Composites the generated mask (front) over the previously composited masks (back), but the output will cover only the area covered by both front and back.
Outside The output will be equal to the generated mask (front) except that the part of the front overlapping the previously composited masks (back) will be missing. No part of the back will be visible in the output in any case.
Cutout The output will be equal to the previously composited mask (back) except that the part of the back covered by the generated masks (front) will be missing. No part of the front will be visible in the output in any case. Basically this operator is equal to the Outside operator with the front and back roles reversed.
Xor Both generated mask (front) and previously composited masks (back) are copied to the output except for the part where they overlap.


Global Composite Operators

The following table lists the compositing operators applicable between the input image and previously composited masks:

Operator Result:
Over Composites the previously composited masks (front) over the input image (back). The output will cover any area covered by either the front or the back. Where the front and back overlap, the output will show the front.
Replace Completely replaces the input image alpha channel with the previously composited masks.
Atop Similar to the Over operator, but the output will cover the same area covered by the input image alpha channel.
Inside Composites the previously composited masks (front) over the input image alpha channel (back), but the output will cover only the area covered by both front and back.
Outside The output will be equal to the previously composited masks (front) except that the part of the front overlapping the input image alpha channel (back) will be missing. No part of the back will be visible in the output in any case.
Cutout The output will be equal to the input image alpha channel (back) except that the part of the back covered by the previously composited masks (front) will be missing. No part of the front will be visible in the output in any case. Basically this operator is equal to the Outside operator with the front and back roles reversed.
Xor Both previously composited masks (front) and input image alpha channel (back) are copied to the output except for the part where they overlap.


Previous