What is it for?
- When you want to combine two shapes into one mask
- When you want to remove an area to make a hole
- When you want to extract only the overlapping area
Overview
Combines two masks with Boolean operations that add them, subtract one from the other, or retain only their intersection. It is a core mask-work component for building complex selections from simple shape masks.
Usage tips
- Think of it as the 2D-mask counterpart to the Solid nodes
solid_combine/solid_subtract/solid_intersect. - Cutting a window with
Subtractis a common pattern: subtract a circle from a rectangle to make a frame, or subtract a face mask from a full-character mask to create "everything except the face." - Clean up small chips or specks after combining with
pixel_cleanupormorphology. - It supports both binary masks and gray or translucent values as continuous
soft masks. Use
blendorexpression_pixelfor value images with another meaning, such as progress maps.
Related nodes
path_mask/shape_generate— generate source masksmask— cut out an image with the completed maskmorphology/pixel_cleanup— shape and clean up the combined resultblend— combine value images
Operations
Union- Retains areas present in either A or B.
- Use it to combine two shapes.
Subtract- Removes the area of B from A.
- Useful for making shapes with holes.
Intersect- Retains only areas where A and B overlap.
- Use it to extract only the common area.
Notes
- The output is a white + alpha mask image. RGB is always white.
- The output dimensions match the larger of A and B.
sourceselects the channel.Alphareads alpha,Luminancereads luminance, andAutoreads alpha for any image containing at least one translucent pixel but reads luminance for a fully opaque image.- For soft masks,
Union=max(A,B),Intersect=min(A,B), andSubtract=A*(1-B), preserving continuous values. - An antialiased black-and-white image can switch
Autoto alpha, making opaque black pixels value 1. ChooseAlphaorLuminanceexplicitly when the intent must be stable. - This is not suited to combining "value images" such as progress maps, normal maps, or depth maps. Treat those as maps rather than masks.
Examples
- Apply
UniontoRectangle MaskandCircle Mask- Creates a mask combining the two shapes.
SubtractCircle MaskfromRectangle Mask- Creates a cutout like a window or hole.
- Apply
Intersectto two flow masks- Use this when you want to process only their overlap separately.