Aller au contenu

Channel Booleans Node

By Kriss Norde

Channel Booleans is an advanced plumbing tool that applies math and logic operations to the channels of two images. 15 operations are available (Copy, Add, AND, OR, XOR, Difference...) along with full routing to send any source channel to any output channel.

Overview

Channel Booleans works channel by channel between two images (Foreground and Background) and can:

  • Extract a channel (e.g. copy the Red channel of one image into the Alpha channel of another).
  • Combine two channels with a math operation (addition, subtraction, multiplication...).
  • Combine them logically (AND, OR, XOR) - useful for masks.
  • Build a channel from an auxiliary channel (Z-depth, luminance, saturation).

It is the go-to tool for any channel manipulation beyond what the classic color correction nodes can do.

Where to find this node

  • Effects Library: Tools > Color > Channel Booleans
  • Quick add: right-click in the Node Editor → Add Tool > Color > Channel Booleans

Inputs

  • Background (orange) - required. The main 2D image you operate on.
  • Foreground (green) - optional. A secondary 2D image used to modify the Background. Without a Foreground, the "Foreground channels" options automatically fall back to the Background channels.
  • Effect Mask (blue) - optional. Limits the operation to an area.
  • Matte (white) - optional. An external matte combined with the FG/BG operations.

Setup

MediaIn (plate) ──→ Background
Loader (mask/texture) ──→ Foreground
                   → Channel Booleans → Saver

The 15 available operations

The Operation menu picks the function applied to the channels. The 15 options, grouped by type:

Math operations

Copy (default)
Simply transfers the values of the source channel.
Add
Adds the values together. A brighter result. Watch out for clipping above 1.0 in 8-bit.
Subtract
Subtracts the FG values from the BG values. The equivalent of "removing the effect".
Multiply
Darkens proportionally. The equivalent of a Merge in Multiply mode. Value 0 = pure black, value 1 = no change.
Divide
Brightens proportionally. Rarely used, it can produce very high values.

Logic operations (bit-level)

And
Bitwise logical AND. The Foreground "removes" bits from the Background.
Or
Logical OR. The Foreground "adds" bits.
Exclusive Or (XOR)
Logical XOR. The Foreground "flips" the bits where it is active.

Comparison operations

Maximum
Keeps the larger value of FG and BG. The equivalent of a Merge in Lighten mode.
Minimum
Keeps the smaller value. The equivalent of Merge in Darken mode.
Difference
Subtracts the smaller value from the larger one → the absolute value of the difference. Widely used to detect changes between two images.

Utility operations

Negative
Creates the negative image (inverts the values of each channel).
Signed Add
Subtracts below 50% gray, adds above 50% gray. Produces an emboss effect from a bump map.
Solid
Fills the channel with 255 (pure white).
Clear
Sets the channel to 0 (pure black).

Channel routing (To Red / Green / Blue / Alpha)

4 drop-down menus in the Inspector define which source feeds which output channel. For each destination channel (R, G, B, A), you choose:

  • A Background channel: BG R, BG G, BG B, BG A
  • A Foreground channel: FG R, FG G, FG B, FG A
  • Auxiliary channels: Z-buffer, Saturation, Luminance, Hue (from FG or BG)

Typical example: "To Alpha" = FG Red → the Foreground's Red channel becomes the Alpha of the output image. Lets you extract a mask from a composition painted in red.

Turn on Enable Extra Channels to output channels beyond RGBA (Z, motion vectors, object ID...).

Use cases

  • Adding a Z-depth to an RGB image - FG = a 3D render with Z, BG = the plate. Operation Copy, To Z = FG Z-buffer. The plate inherits the CGI depth.
  • Extracting a mask from a color channel - FG = an image with a pure red object, BG = the target image. Operation Copy, To Alpha = FG Red. The alpha of the final image matches the red area.
  • Channel swap (stylized effect) - To Red = BG Blue, To Blue = BG Red. The image swaps red and blue → a psychedelic or film negative look.
  • Detecting changes between two shots - Operation Difference, FG and BG = two consecutive frames. Moving areas become visible in the output.
  • Combining two masks into one (union / intersection) - Operation Maximum for a union (visual OR), Minimum for an intersection (visual AND).
  • Creating an alpha channel from luminance - FG = the image in luma, To Alpha = FG Luminance. Bright areas become opaque, dark ones transparent.
  • Emboss effect from a bump map - Operation Signed Add with a bump map as FG → visible relief on the BG.

Tips & pitfalls

  • Without a Foreground, the FG options fall back - if you select "FG Red" without connecting a Foreground, Fusion uses the Background instead. No error, but not the result you expect.
  • Enable Extra Channels for aux channels - by default, only RGBA comes out. To keep Z, motion vectors, etc., check this option.
  • Difference to check a correction - plug the original into FG and the corrected version into BG, Operation Difference → you see exactly what changed (black = identical, colors = differences).
  • Multiply = Merge in Multiply mode, Maximum = Lighten, Minimum = Darken. Channel Booleans can replace some uses of Merge 2D with more control.
  • Preserve the alpha - if you change RGB but want to keep the Background's alpha, set To Alpha = BG Alpha.
  • For a simple channel swap, use Color Matrix or Channel Swap instead (quicker to set up). Channel Booleans is overkill for this simple case.