Skip to content

Mask Boolean

Node icon
Mask

Combines two masks with boolean operations: union, subtract, intersect, or difference.

The Mask Boolean node combines two masks with a set operation.
Three panels: mask shape A, mask shape B, and the combined boolean result mask.

Build complex selections from simple ones: Union keeps either mask, Subtract removes B from A, Intersect keeps the overlap, and Difference keeps where they do not overlap. When B is a different size, Mask Fit (Stretch by default) maps it onto A.

Pins

Mask AMask
InputRequired
Mask BMask
InputRequired
MaskMask
Output

Mask

OperationChoice
Default: Union

How Mask A and Mask B combine, smooth where soft edges overlap

  • UnionCombine both masks: white wherever either mask is white.
  • SubtractRemove mask B from mask A: white only where A is white and B is black.
  • IntersectKeep only the overlap: white only where both masks are white.
  • DifferenceKeep non-overlapping areas: white where the masks differ.
Mask FromChoice
Default: Luminance
Color image connected to the mask input

How the connected color image is read as a mask

  • LuminanceRead the image's brightness as the mask. The default.
  • AlphaRead the image's transparency as the mask.
  • RedUse the red channel as the mask.
  • GreenUse the green channel as the mask.
  • BlueUse the blue channel as the mask.
Mask FitChoice
Default: Stretch
Mask connected

How Mask B is mapped when it doesn't match Mask A

  • None (native size)Center the mask at its native size, with no resizing. Unmasked regions are unaffected.
  • StretchStretch the mask to exactly match the image dimensions. May distort the mask shape.
  • Fit (letterbox)Scale the mask to fit inside the image, preserving aspect ratio. Letterboxes where needed.
  • Fill (crop)Scale the mask to fill the image, preserving aspect ratio. Crops edges if aspect ratios differ.
  • Use Subtract to punch holes in a mask, for example removing an inner area from an outer selection.
  • Use Intersect to restrict one mask to the area covered by another.
  • Difference is useful for ring or outline selections.
  • Chain several Mask Boolean nodes for multi-region selections.