FUSION · NODE REFERENCE
CustomTool
CustomTool — programmable channel and matte expressions
Fusion expression processor with three image inputs, a white Matte Input, blue Effect Mask, Number/Point/LUT controls, Setup/Inter and RGBA/aux channel formulas.
CustomTool
Overview
What CustomTool does
CustomTool is a programmable 2D image processor, not a C++ compiler or Fuse. You write expressions for pixels and auxiliary channels, using three image sources, user controls and masks.
CustomTool has five distinct input roles: three image inputs (Image1, Image2, Image3), a white Matte Input and a blue Effect Mask. Collapsing them into a single Image connection misrepresents the expression and Flow model.
Orange Image1 is the primary source addressed by r1/g1/b1/a1. Green Image2 uses r2/g2/b2/a2; magenta Image3 uses r3/g3/b3/a3. Sources can represent different maps or alternate versions of a shot.
Matte Input supplies a mask value to the math, documented as m1. It differs from Effect Mask: the white matte can affect the equation itself, while the blue Effect Mask gates the finished effect.
CustomTool still has one 2D image output. Writing a black/white Alpha or a depth value into Z does not turn Output into a blue mask connector.
Controls contains four Point In (X/Y), eight Number In and four LUT In controls. They are editable values consumed by expressions; ordinary animation and modifiers can drive them.
Number In 1–8 are addressed as n1…n8. Renaming a control in Config improves the artist-facing interface but does not rename the expression variables.
Point In 1–4 are addressed as p1x/p1y…p4x/p4y. They are useful for centers, anchors and animated positions, but do not automatically create extra point sockets in the node graph.
LUT In 1–4 are curves; getlut1(value)…getlut4(value) map channel/scalar values. They are not file LUTs, OCIO transforms or additional image inputs.
Setup and Inter are different evaluation stages. Setup handles values computed once per frame; Inter handles intermediate values computed per pixel before final channel expressions.
The bundled current Inspector captures show Setup 1–8 and Intermediate 1–8. Older published Blackmagic references document only Setup 1–4 (s1…s4) and Inter 1–4 (i1…i4); confirm the names s5…s8/i5…i8 on the target build rather than guessing.
Setup is not a per-pixel evaluation stage. r1/g1/b1, x and y are not safe as frame-wide constants; put per-pixel work in Intermediate instead.
Documented Intermediate 1–4 expose i1…i4 to later expressions. Moving repeated math there makes Channels easier to read, but does not remove the need to document variable scope.
Channels provides separate Red, Green, Blue and Alpha expressions. The bundled capture shows r1, g1, b1, a1 for pass-through, which is the best smoke-test baseline.
c1…c3 refer to the current channel from each input. An expression such as c1/2 acts on whichever output channel field contains it; it does not always mean red.
Pixel-stage x/y coordinates are normalized roughly to 0…1 across the frame. w/h (also w1…w3/h1…h3) provide image size; ax/ay provide pixel aspect. These belong to CustomTool formula context, not ordinary Inspector expressions.
Aux Channel Expressions let you write Z, Z Coverage, U/V, XYZ Normal, XY Vector and other technical channels, but their usefulness depends on source data and downstream readers.
Z means depth, Z Coverage means coverage, U/V are texture coordinates, normals encode direction and motion vectors encode motion. These channels are not interchangeable auxiliary colors.
The current capture shows X BackVector below XY Vector. Do not infer a complete BackVector or export-channel inventory from one cropped Inspector image.
CustomTool supports neighbor sampling with get… functions and explicit boundary behavior. Official examples use getr1b(x,y) for zero out of bounds, getr1d(x,y) for clamped edges and getr1w(x,y) for wrapped sampling.
get… arguments are spatial coordinates; do not confuse them with the input index after the channel letter. Neighbor sampling in expressions can be much slower than a dedicated Blur/CustomFilter node.
Color channels may exceed 0…1 in float pipelines. Integer destinations clip out-of-range values; an early hard clamp can destroy HDR headroom while appearing to fix a preview.
Alpha is coverage, not brightness. If an equation changes RGB but not alpha, inspect translucent edges over the intended background and confirm premultiplication handling.
Common Blend/channel controls in Settings apply according to their post-node rules and do not replace expression routing between Image1/Image2/Image3.
Config shows Random Seed and Reseed. Seed controls reproducible rand()/rands() patterns; Reseed deliberately changes the sequence and can make duplicates of a comp diverge.
Show/Name Number, Point and LUT affect the Inspector UI, not the Flow topology. Hiding a control does not necessarily delete its stored value or expression variable.
Do not paste CustomTool formula variables directly into the normal expression field of a Number In control expecting the same namespace: CustomTool and ordinary Inspector expressions use different variable contexts.
For a fixed 3x3/5x5/7x7 convolution, CustomFilter is generally simpler and faster. CustomTool earns its place for arbitrary functions, multiple images, user controls, matte math or specialized auxiliary channels.
Before handoff, verify every referenced image/matte is connected, expressions avoid zero divisions and undefined data, and each exposed control is named for its purpose.
Do not present this article as complete scripting API documentation. The captures establish current UI labels and the manual documents common variable syntax; target-build Resolve 21/21.1 verification is still required for serialized IDs and expanded s5–s8/i5–i8 behavior.
When to use it
Linearly mix two image inputs with an exposed Mix number.
Use a third image as a procedural/noise/control input to an equation.
Use a white Matte Input as a scalar term inside math.
Gate a processed RGB effect with a separate blue Effect Mask.
Implement custom remapping for RGB/Alpha/auxiliary channels.
Build a procedural gradient or radial field using a Point and x/y.
Add an editable LUT spline for a nonlinear mapping.
Prototype processing before writing a Fuse.
Build repeatable randomized effects with a fixed seed.
Test preservation of technical Z/UV/normal/vector channels in a VFX pipeline.
CustomTool in context
Screenshots referenced by this article. Open an image to inspect it at full size.
Example for CustomTool.
Original imageExample for CustomTool.
Original imageExample for CustomTool.
Original imageExample for CustomTool.
Original imageExample for CustomTool.
Original image