FUSION · NODE REFERENCE
DifferenceKeyer
Difference matte from a subject plate and clean background
DifferenceKeyer [DFK] generates alpha from the difference between a clean plate and a subject shot. Its five inputs separate the reference image, subject image and three distinct masking tasks.
DifferenceKeyer
Overview
What DifferenceKeyer does
DifferenceKeyer [DFK] is a difference-based 2D keyer. Background receives a clean plate without the subject; Foreground receives the matching shot with the subject. Matching pixels become transparent while significant differences form an opaque subject matte.
The essential requirement is matching framing, resolution, focus, exposure and lighting. Even a small camera shift turns background edges into false positives. A difference keyer cannot inherently distinguish the subject from unrelated changes in the set.
The comparison is also sensitive to sensor noise, grain, flickering light, reflections, moving foliage, water and subject shadows. They all differ from the reference. Fixing the sources or choosing another keying method may be better than forcing more extreme Threshold values.
Where preprocessing is needed, match the treatment of both input branches. Stabilizing, correcting lens distortion or denoising only one side may introduce a new difference that the keyer will faithfully extract.
DifferenceKeyer has five physical inputs: orange Background (reference), green Foreground (subject), gray Garbage Matte, white Solid Matte and blue Effect Mask. Its output is a standard 2D image carrying Foreground RGB with a newly computed alpha.
Garbage Matte, Solid Matte and Effect Mask are not interchangeable. Garbage Matte removes selected regions from the matte, Solid Matte forces selected regions opaque, and Effect Mask limits the spatial contribution of the complete operation.
Threshold Low/High is the core of the key. Differences below Low become black/transparent; differences above High become white/opaque; values in between form grayscale, partially transparent alpha.
An excessively narrow Low–High range makes a harsh cutout and may erase weak subject detail. An overly broad range retains background fluctuations. Tune thresholds in an alpha view rather than judging solely from RGB.
Filter determines how Blur softens the resulting matte. The two original Inspector screenshots show Box, Bartlett, Multi-box, Gaussian and Fast Gaussian. These choices filter alpha; they do not change the underlying image comparison.
Num Passes is exposed when Multi-box is selected and controls the number of filtering passes. It is not a permanently visible parameter for every Filter choice. Compare the edge at fixed Threshold settings.
Blur softens the already generated matte. Small amounts may help with noisy edges, but heavy blur cannot repair mismatched plates. It only hides symptoms while moving or softening the edge away from the subject.
Clipping Mode controls boundary processing and the Domain of Definition: None, Domain or Frame. This matters when input data are spatially limited or filtering occurs near frame edges; it is not a Crop control or a way to define subject geometry.
Contract/Expand alters semitransparent matte areas: positive values expand them and negative values contract them. It is not a general grow/shrink operation on a fully hard black-and-white edge, where little may change.
Gamma reshapes intermediate gray alpha values while retaining the fully black and fully white endpoints. If all soft detail has already collapsed to 0 or 1, Gamma cannot recreate that missing transition.
The main Invert reverses the DifferenceKeyer result. Solid Matte and Garbage Matte also have their own Invert controls, affecting only their respective helper mattes. These switches have distinct scopes.
Solid Matte protects subject regions that difference keying incorrectly makes transparent. For example, clothing that closely resembles the clean background can be restored locally without weakening the global key.
Garbage Matte forcibly removes false positives such as moving set elements or an unwanted section of the frame. A local exclusion is often safer than sacrificing fine edges by over-tightening the entire Threshold.
Effect Mask limits the node as a whole, unlike Solid/Garbage mattes. A mask connected to the blue input does not automatically become the final subject alpha; compare the result inside and outside the mask region.
Post Multiply Image is enabled by default and multiplies Foreground RGB by the generated alpha. When disabled, ordinary Merge workflows must not simply assume premultiplied RGB; semitransparent edges may reveal fringes.
An effective order is: match the two plates → inspect raw alpha with Blur=0 → choose Low/High → apply only necessary matte filtering → refine soft alpha → add local Solid/Garbage masks → check Effect Mask and premultiplication over the actual composite.
DifferenceKeyer is often valuable as a rough matte generator for MatteControl, roto and downstream compositing, particularly with locked-off footage. Hair, smoke and dynamic backgrounds rarely justify promising a perfect result from this node alone.
Final QC has three separate views: the black-and-white alpha, RGB edges at 100% zoom and the Merge over a contrasting background. Then play the shot: temporal matte chatter can be invisible in a still frame.
This page links two real Resolve Inspector screenshots: the overall Controls panel and the opened Filter menu. They confirm visible labels and layout, but they are not proof of rendered behavior.
For automated compositions, validate physical port IDs, local Invert serialization and Filter availability with an exported .comp/.setting in the target Resolve build. Static reference documentation does not replace live certification.
When to use it
Rough subject alpha when a closely matching clean plate is available.
Difference extraction from a locked-off shot without a chroma screen.
Preparing a source matte for MatteControl or local rotoscoping.
Technical comparison of two registered images of the same setup.
Local corrections through Solid/Garbage Matte without damaging global thresholds.
DifferenceKeyer in context
Screenshots referenced by this article. Open an image to inspect it at full size.
Example for DifferenceKeyer.
Original imageExample for DifferenceKeyer.
Original image