< Previous | Contents | Next >
The Channel Booleans node
Channel Booleans Node Introduction
NOTE: Be aware of another similarly named Channel Boolean (3Bol), which is a 3D node used to remap and modify channels of 3D materials. When modifying 2D channels, use the Channel Booleans (with an “s”) node (Bol).
NOTE: Be aware of another similarly named Channel Boolean (3Bol), which is a 3D node used to remap and modify channels of 3D materials. When modifying 2D channels, use the Channel Booleans (with an “s”) node (Bol).
NOTE: Be aware of another similarly named Channel Boolean (3Bol), which is a 3D node used to remap and modify channels of 3D materials. When modifying 2D channels, use the Channel Booleans (with an “s”) node (Bol).
The Channel Booleans node applies a variety of mathematical and logical operations on the channels in an image. This node works by using one image’s channels to modify another image’s channels. If a foreground input is not available, selecting options that use color channels from the foreground ends up using the background input’s color channels instead.
Inputs
There are four inputs on the Channel Booleans node in the Node Editor, but only the orange Background input is required.
— Background: This orange input connects a 2D image that gets adjusted by the foreground input image.
— Effect Mask: The blue effect mask input expects a mask shape created by polylines, basic primitive shapes, paint strokes, or bitmaps from other tools. Connecting a mask to this input limits the channel booleans adjustment to only those pixels within the mask.
— Foreground: The green foreground input connects a 2D image that is used to adjust the background input image.
— Matte: The white matte input can be used to combine external mattes with the foreground and background operations.
Basic Node Setup
The Channel Booleans node is an extremely flexible tool used in many different ways. The example below copies the z-depth channel from the foreground input (green) into the background
image (orange).
A Channel Booleans set to copy from foreground to background
Inspector
Channel Booleans controls
Color Channel Tab
On the Color Channels tab, the controls are divided into two columns.
On the left side are target channels for the image connected into the orange background input. The drop-down menu to the right lets you choose whether you want to modify the BG image with its channels (suffix BG after list name) or with the channels from an image connected into the green foreground input on the node (suffix FG in the drop-down list).
This menu selects the mathematical operation applied to the selected channels. The options are as follows:
Copy the value from one color channel to another. For example, copy the foreground red channel into the background’s Alpha channel to create a matte.
— Add: Add the color values from one color channel to another channel.
— Subtract: Subtract the color values of one color channel from another color channel.
— And: Perform a logical AND on the color values from color channel to color channel. The foreground image generally removes bits from the color channel of the background image.
— Or: Perform a logical OR on the color values from color channel to color channel. The foreground image generally adds bits from the color channel of the background image.
— Exclusive Or: Perform a logical XOR on the color values from color channel to color channel. The foreground image generally flips bits from the color channel of the background image.
— Multiply: Multiply the values of a color channel. This gives the appearance of darkening the image as the values scale from 0 to 1. White has a value of 1, so the result would be the same. Gray has a value of 0.5, so the result would be a darker image or, in other words, an image half as bright.
— Divide: Divide the values of a color channel. This gives the appearance of lightening the image as the values scale from 0 to 1.
— Maximum: Compare the two images and take the maximum, or brightest, values from each image.
— Minimum: Compare the two images and take the minimum, or darkest, values from each image.
— Negative: Invert the FG input to make a negative version of the image.
— Solid: Solid sets a channel to a full value of 255. This is useful for setting the Alpha to full value.
— Clear: Clear sets a channel to a value of zero. This is useful for clearing the Alpha.
— Difference: Difference subtracts the greater color values of one color channel from the lesser values of another color channel.
— Signed Add: Signed Add subtracts areas that are lower than mid-gray and adds areas that are higher than mid-gray, which is useful for creating effects with embossed gray images.
These menus represent the four color channels of the output image. Use the drop-down menu to select which channel from the source images produces the output channel.
The default setting copies the channels from the foreground channel. Select any one of the four color channels, as well as several auxiliary channels like Z-buffer, saturation, luminance, and hue.
Inspector
Aux Channel Inspector
Aux Channel Tab
This tab includes a series of menus where you select a source for the auxiliary channels of the output image.
EXAMPLES To copy the Alpha channel of one image to its color channels, set the red, green, and blue channels to Alpha BG. Set the Operation to Copy.
To copy the Alpha channel from another image, set operation type to Alpha FG.
To replace the existing Alpha channel of an image with the Alpha of another image, choose “Do Nothing” for To Red, To Green, and To Blue and “Alpha FG” for To Alpha. Pipe the image containing the Alpha into the foreground input on the Channel Booleans node. Set Operation: “Copy.” The same operation is available in the Matte Control node.
To combine any mask into an Alpha channel of an image, choose “Do Nothing” for To Red, To Green, and To Blue and “Matte” for To Alpha. Pipe the mask into the foreground input on the Channel Booleans node. Set Operation: “Copy.”
To subtract the red channel’s pixels of another image from the blue channel, choose
“Do Nothing” for To Red and To Green and “Red FG” for To Blue. Pipe the image containing the red channel to subtract into the foreground input on the Channel Booleans node. Set Operation: “Subtract.”
EXAMPLES To copy the Alpha channel of one image to its color channels, set the red, green, and blue channels to Alpha BG. Set the Operation to Copy.
To copy the Alpha channel from another image, set operation type to Alpha FG.
To replace the existing Alpha channel of an image with the Alpha of another image, choose “Do Nothing” for To Red, To Green, and To Blue and “Alpha FG” for To Alpha. Pipe the image containing the Alpha into the foreground input on the Channel Booleans node. Set Operation: “Copy.” The same operation is available in the Matte Control node.
To combine any mask into an Alpha channel of an image, choose “Do Nothing” for To Red, To Green, and To Blue and “Matte” for To Alpha. Pipe the mask into the foreground input on the Channel Booleans node. Set Operation: “Copy.”
To subtract the red channel’s pixels of another image from the blue channel, choose
“Do Nothing” for To Red and To Green and “Red FG” for To Blue. Pipe the image containing the red channel to subtract into the foreground input on the Channel Booleans node. Set Operation: “Subtract.”
EXAMPLES To copy the Alpha channel of one image to its color channels, set the red, green, and blue channels to Alpha BG. Set the Operation to Copy.
To copy the Alpha channel from another image, set operation type to Alpha FG.
To replace the existing Alpha channel of an image with the Alpha of another image, choose “Do Nothing” for To Red, To Green, and To Blue and “Alpha FG” for To Alpha. Pipe the image containing the Alpha into the foreground input on the Channel Booleans node. Set Operation: “Copy.” The same operation is available in the Matte Control node.
To combine any mask into an Alpha channel of an image, choose “Do Nothing” for To Red, To Green, and To Blue and “Matte” for To Alpha. Pipe the mask into the foreground input on the Channel Booleans node. Set Operation: “Copy.”
To subtract the red channel’s pixels of another image from the blue channel, choose
“Do Nothing” for To Red and To Green and “Red FG” for To Blue. Pipe the image containing the red channel to subtract into the foreground input on the Channel Booleans node. Set Operation: “Subtract.”
When the Enable Extra Channels checkbox is selected, the Channel Booleans node can output images with channels beyond the usual RGBA. Once enabled, the remaining controls in the Aux Channels tab can copy data into the auxiliary channels.
Common Controls
The Settings tab in the Inspector appears in other Color nodes. These common controls are described in detail at the end of this chapter in “The Common Controls” section.