FUSION · FULL ARTICLE
DifferenceKeyer
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.
Overview
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, obtain physical port IDs and the Invert control identifier from an exported .comp or .setting file; check which Filter choices the installed build supports.
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.
Article screenshots
Inputs & outputs
DifferenceKeyer: clean Background + subject Foreground → difference alpha, with three mask inputs serving different jobs
DifferenceKeyer is a two-image matte keyer but has five physical inputs. Orange Background is the clean plate, green Foreground is the subject shot, gray Garbage Matte removes alpha, white Solid Matte forces opacity, and blue Effect Mask limits the whole node after processing.
Compares Foreground against Background, maps measured difference through Threshold into alpha, and outputs Foreground RGB with the generated/refined alpha.
Inputs
- Background
Clean-plate reference
Receives: A 2D clean plate of the set without the subject, matching Foreground camera/focus/lighting.
Inside the node: Acts as the reference against which per-pixel difference is measured.
Typical sources: MediaIn clean plate · Loader clean plate · aligned reference branch
This is orange Background. A mismatched clean plate creates false differences that Threshold cannot honestly repair.
- Foreground
Subject plate
Receives: The 2D shot containing the subject on the same background.
Inside the node: Its difference from Background creates alpha; its RGB becomes the visible foreground output.
Typical sources: MediaIn subject plate · Loader subject plate · aligned/stabilized subject branch
This is green Foreground, not the clean plate. Swapping roles changes the intended key/premultiplication workflow.
- Garbage Matte
Force transparent
Receives: A mask/bitmap covering regions that must be forcibly removed from alpha.
Inside the node: Applies directly to alpha as a garbage matte; local Invert flips the helper mask before combination.
Typical sources: Polygon · B-Spline · Rectangle · Bitmap / mask image
Do not confuse it with Effect Mask: Garbage Matte edits alpha rather than merely limiting node contribution.
- Solid Matte
Force opaque
Receives: A mask/bitmap covering subject regions that must remain opaque.
Inside the node: Applies directly to alpha as a solid matte; local Invert flips the helper mask before combination.
Typical sources: Polygon · B-Spline · Rectangle · Bitmap / mask image
Solid Matte does not improve the difference calculation; it protects a local region.
- Effect Mask
Post-process operation gate
Receives: A blue effect mask limiting where DifferenceKeyer operates.
Inside the node: Applied after tool processing to limit where the keyer contributes.
Typical sources: Rectangle · Ellipse · Polygon · B-Spline · Bitmap
Effect Mask is not the generated key and does not replace Solid/Garbage Matte.
Outputs and destination
Output
A 2D image carrying Foreground RGB and difference-derived alpha after helper matte/refinement; with Post Multiply Image enabled, RGB is multiplied by alpha.
Next step: MediaOut for inspection · MatteControl · Despill / color cleanup · Merge.Foreground
If Post Multiply Image is disabled, do not blindly treat output as a normal premultiplied keyed foreground.
- Output
- A normal 2D image stream carrying Foreground RGB and the generated/refined alpha. With Post Multiply Image enabled, RGB is premultiplied by that alpha.
Processing order
- Background receives the clean plate without the subject and acts as the pixel-difference reference.
- Foreground receives the matching subject plate and supplies the visible RGB in Output.
- Before keying, both plates should match camera, focus, exposure, lighting, noise and preprocessing as closely as possible.
- Threshold Low/High maps difference magnitude into black/gray/white alpha.
- Filter and conditional Num Passes choose the matte-filtering method after key calculation.
- Blur softens the generated matte while Clipping Mode controls DoD/boundary behavior.
- Contract/Expand and Gamma refine semitransparent alpha while Main Invert changes overall polarity.
- Solid Matte forces selected regions opaque while Garbage Matte forces selected regions transparent.
- Local Invert in Solid/Garbage affects only the corresponding helper mask.
- Effect Mask acts as a post-process gate for the whole operation and does not replace Solid/Garbage.
- Post Multiply Image determines whether Foreground RGB is multiplied by generated alpha before Output.
- Output remains a normal 2D image with Foreground RGB and difference-derived alpha for MatteControl/Despill/Merge/MediaOut.
Locked-off clean-plate key
CleanPlate → Background · SubjectPlate → Foreground · optional Solid/Garbage → DifferenceKeyer → MatteControl / Merge
Prove plate registration and Threshold first, then add local helper mattes. Effect Mask belongs only where the entire operation must be spatially limited.
DifferenceKeyer has five physical inputs. Background/Foreground create the key; Solid/Garbage edit alpha; Effect Mask limits the whole operation. These are three different contract layers.
Parameters
DifferenceKeyer · Inspector reference
Read DifferenceKeyer as eight layers: scope → plate inputs/registration → Threshold → filter/DoD refinement → alpha shaping → Solid/Garbage helpers → Effect Mask → output/premultiplication. The key discipline is keeping the three mask ports distinct and not trying to fix a bad clean plate in the Inspector.
- Reference
- clean Background
- Subject
- Foreground
- Key
- Threshold
- Refine
- Filter / Blur / Gamma
- Helpers
- Solid / Garbage
- Gate
- Effect Mask
- Output
- RGB + alpha / Post Multiply
Scope / Contract · Clean-plate difference key
Five physical inputs and an image Output with generated alpha; this is not a chroma keyer.
- Two-image comparison keyer
Tool scopeDifferenceKeyer compares a subject plate against a clean plate and derives alpha from their difference.
Check / distinguish: Verify Background/Foreground roles before tuning.
- Not chroma key
Tool boundaryThe node does not search for green/blue hue and is not a chroma keyer.
Check / distinguish: Do not look for Key Color controls.
- Not motion detector
Tool boundaryTemporal change can resemble motion detection, but the contract is clean-plate keying.
Check / distinguish: Use a matching clean plate.
- Image output with generated alpha
Output contractOutput carries Foreground RGB with generated/refined alpha.
Check / distinguish: Inspect RGB and Alpha separately.
- Five physical inputs
Flow contractBackground, Foreground, Garbage Matte, Solid Matte and Effect Mask are distinct physical ports.
Check / distinguish: Do not collapse the three mask ports into one.
- No Studio-only boundary in reviewed entry
EditionThe reviewed Resolve 21 entry is not marked Studio Version Only.
Check / distinguish: Check availability in your installed Resolve edition.
- Rough matte is a valid use
Production roleDifferenceKeyer is often more useful as a rough matte source than the only final keyer.
Check / distinguish: Plan downstream MatteControl/roto for difficult shots.
- Live target build remains separate
CertificationStatic semantics do not replace live filter/DoD/premult validation.
Check / distinguish: Keep runtime certification separate.
Plate Inputs / Registration · Background clean plate · Foreground subject
Registration/lighting/noise quality determines the raw difference.
- Background is clean plate
Flow > BackgroundOrange Background is the reference without the subject.
Check / distinguish: Label it CleanPlate_BG.
- Foreground is subject plate
Flow > ForegroundGreen Foreground is the shot with the subject and supplies Output RGB.
Check / distinguish: Label it Subject_FG.
- Roles are not interchangeable
Flow semanticsSwapping inputs changes the key/premult contract.
Check / distinguish: Do not use swapping as Invert.
- Camera must match
RegistrationCamera shift creates false difference.
Check / distinguish: Verify transform/registration.
- Focus must match
RegistrationFocus mismatch changes edges/texture and enters the matte.
Check / distinguish: Verify focus state.
- Exposure/lighting must match
Photometric matchLighting/exposure variation is also difference.
Check / distinguish: Compare plates before Threshold.
- Noise/grain can key
Signal matchMismatched noise/grain creates gray alpha.
Check / distinguish: If reducing noise, process both plates symmetrically.
- Symmetric preprocessing is critical
PipelineStabilizing/denoising/lens-correcting only one branch creates new difference.
Check / distinguish: Match preprocessing on both branches.
Threshold · Low / High → alpha
The primary difference→black/gray/white alpha transfer function.
- Threshold · Low / High
Threshold > Threshold · Low / HighMaps the difference between the two plates to alpha: below Low is black, above High is white, with gray values in between. These are two bounds of a single keying range, not independent source-brightness adjustments. A narrow range hardens the edge; a broad range can retain unwanted background differences.
Check / distinguish: Align the plates and inspect the alpha channel before adjusting Low/High.
- Low defines transparent floor
Threshold LowDifference below Low maps to black/transparent.
Check / distinguish: Use Alpha Viewer.
- High defines opaque ceiling
Threshold HighDifference above High maps to white/opaque.
Check / distinguish: Watch weak subject detail.
- Between Low/High stays gray
Threshold transferThe interval produces semitransparent matte.
Check / distinguish: Do not force binary matte without reason.
- Threshold is not registration repair
CausalityBad registration remains a source problem.
Check / distinguish: Return to plate matching.
- Narrow range hardens matte
Threshold rangeA narrow range hardens the transition.
Check / distinguish: Inspect hair/soft detail.
- Wide range retains noise
Threshold rangeA wide range retains background variation in gray.
Check / distinguish: Inspect static background.
- Main Invert changes final polarity
InvertMain Invert flips the generated key.
Check / distinguish: Do not confuse it with helper Inverts.
- Invert is not input swap
Invert boundaryInvert does not swap clean/subject roles.
Check / distinguish: Keep the wiring correct.
Filter / Blur · Filter · Num Passes · Blur · Clipping Mode
Matte filtering and DoD boundary behavior after key calculation.
- Filter
Filter / Blur > FilterSelects the alpha-filtering algorithm: Box, Bartlett, Multi-box, Gaussian or Fast Gaussian. All five choices are visible in the original Resolve Inspector screenshot. The algorithm affects smoothing controlled by Blur; it cannot repair a bad Background/Foreground comparison.
Check / distinguish: Compare algorithms on a visible soft edge while keeping Threshold unchanged.
- Num Passes · Multi-box only
Filter / Blur > Num Passes · Multi-box onlySets the number of filtering passes when Filter is set to Multi-box. This control is conditional and may be hidden for other filters. More passes change the quality and processing cost of matte smoothing.
Check / distinguish: Select Multi-box first, then compare edge quality and speed at different pass counts.
- Blur
Filter / Blur > BlurSoftens edges of the already generated difference matte. Zero is useful for diagnosing the raw alpha. Heavy blur can reduce silhouette accuracy even if it visually hides noise or doubled contours.
Check / distinguish: Start at zero and add only the minimum needed after Threshold has been tuned.
- Clipping Mode
Filter / Blur > Clipping ModeSets the image-edge and Domain of Definition behavior: None, Domain or Frame. Frame works with the full frame, Domain respects the available source area, and None disables source clipping. Differences are most visible around image edges during filtering.
Check / distinguish: Compare modes on a real boundary problem; do not treat this as an artistic Crop control.
- Filter acts after difference
FilterFilter changes matte filtering rather than source comparison.
Check / distinguish: Tune after Threshold.
- Box is simple baseline
Filter = BoxBox is a simple fast filter baseline.
Check / distinguish: Use it for diagnosis.
- Bartlett is distinct
Filter = BartlettBartlett is a distinct filter option.
Check / distinguish: A/B on one edge.
- Multi-box unlocks Num Passes
Filter = Multi-boxNum Passes is meaningful only in Multi-box.
Check / distinguish: Verify conditional UI.
- Num Passes 1/2 boundaries
Num PassesThe manual ties 1/2 passes to Box/Bartlett-like behavior.
Check / distinguish: Do not increase passes without reason.
- 4+ passes approach Gaussian
Num PassesThe manual notes 4+ passes approach Gaussian quality.
Check / distinguish: Compare cost/edge quality.
- Gaussian is high-quality baseline
Filter = GaussianGaussian is a high-quality smooth matte filter.
Check / distinguish: Compare ringing/softness.
- Fast Gaussian is target-build UI evidence
Filter menuCurrent target UI shows Fast Gaussian; historical menus may differ.
Check / distinguish: Verify the live menu after upgrades.
Alpha Refinement · Contract/Expand · Gamma · Main Invert
Refine semitransparent alpha and overall polarity.
- Contract / Expand
Alpha Refinement > Contract / ExpandAdjusts the extent of semitransparent regions of the matte. Positive values expand and negative values contract the intermediate gray regions. Completely hard black-and-white areas do not simply turn into a new geometric border.
Check / distinguish: Make small adjustments on a genuinely soft matte edge and inspect the alpha.
- Gamma
Alpha Refinement > GammaReshapes intermediate gray alpha values between transparency and opacity. Fully black and fully white endpoints remain fixed. If Threshold has already collapsed the edge into a strictly binary matte, Gamma cannot recreate the missing soft detail.
Check / distinguish: Preserve meaningful gray values with Threshold before refining them using Gamma.
- Invert
Alpha Refinement > InvertReverses the resulting difference key, swapping transparent and opaque regions. This is the main Invert for DifferenceKeyer. The Invert switches in Solid Matte and Garbage Matte affect only their respective helper mattes.
Check / distinguish: Do not use this to compensate for swapped Foreground and Background connections.
- Blur softens generated matte
BlurBlur works after key calculation.
Check / distinguish: Start at 0.
- Blur cannot fix misregistration
CausalityLarge Blur hides doubled contours but does not fix them.
Check / distinguish: Fix alignment upstream.
- Clipping Mode is DoD behavior
Clipping ModeNone/Domain/Frame relate to boundary sampling.
Check / distinguish: Do not treat it as a crop preset.
- Frame uses full frame context
Clipping Mode = FrameFrame operates relative to the full frame.
Check / distinguish: Useful as a full-frame baseline.
- Domain respects upstream DoD
Clipping Mode = DomainDomain respects upstream Domain of Definition.
Check / distinguish: Test limited-DoD sources.
- Contract/Expand affects semitransparency
Contract / ExpandThe control affects gray transition rather than hard endpoints.
Check / distinguish: Inspect a soft edge.
- Gamma reshapes gray alpha
GammaGamma changes the density of semitransparent values.
Check / distinguish: Do not expect pure black/white to move.
- Refinement follows key quality
WorkflowRefine controls should follow a good raw matte.
Check / distinguish: Save a raw-alpha snapshot.
Solid / Garbage Matte · Force opaque · force transparent
Two helper ports with independent local Invert controls.
- Solid Matte · Invert
Solid / Garbage Matte > Solid Matte · InvertThe white Solid Matte input forces selected regions opaque. Its local Invert reverses only the Solid Matte before it is combined with the main alpha. It helps restore subject regions too similar to the clean reference.
Check / distinguish: Protect only the missing subject detail instead of covering the entire frame.
- Garbage Matte · Invert
Solid / Garbage Matte > Garbage Matte · InvertThe gray Garbage Matte input forces selected regions transparent. Its local Invert affects only the Garbage Matte. Use it for false background differences caused by set elements, shadows or movement.
Check / distinguish: Fix a local problem with a matte instead of tightening Threshold across the whole frame.
- Solid Matte forces opacity
Solid MatteThe white helper forces selected regions opaque.
Check / distinguish: Use it for lost subject detail.
- Garbage Matte forces transparency
Garbage MatteThe gray helper forces selected regions transparent.
Check / distinguish: Use it for false difference.
- Solid local Invert is local
Solid Matte > InvertInvert changes only Solid helper polarity.
Check / distinguish: Do not confuse with Main Invert.
- Garbage local Invert is local
Garbage Matte > InvertInvert changes only Garbage helper polarity.
Check / distinguish: Do not confuse with Main Invert.
- Helper mattes do not improve registration
BoundarySolid/Garbage repair alpha locally but do not improve clean-plate comparison.
Check / distinguish: Do not hide global failure with helpers.
- Too many helpers signal strategy problem
ArchitectureDozens of helper mattes suggest the keying strategy should be reconsidered.
Check / distinguish: Compare roto/another keyer.
- Same mask means different result by port
Port semanticsThe same Polygon behaves differently in Solid/Garbage/Effect Mask.
Check / distinguish: Perform a port A/B.
- Helper matte polarity needs documentation
HandoffLocal Invert states matter for handoff/automation.
Check / distinguish: Document intent.
Effect Mask · Post-process operation gate
The blue port localizes whole-node contribution and does not replace helper mattes.
- Effect Mask gates whole operation
Effect MaskThe blue port limits whole-node contribution after processing.
Check / distinguish: Build the key without it first.
- Effect Mask is not generated alpha
Flow semanticsIt does not replace the difference matte.
Check / distinguish: Inspect Alpha separately.
- Effect Mask is not Solid
Port boundaryThe mask does not force opacity.
Check / distinguish: Use Solid to protect object detail.
- Effect Mask is not Garbage
Port boundaryThe mask does not remove alpha like Garbage.
Check / distinguish: Use Garbage for false difference.
- Local operation is valid
Use caseEffect Mask is useful when DifferenceKeyer should operate only in part of the frame.
Check / distinguish: Limit the operation region.
- Mask feather is operation blend
Mask semanticsEffect Mask feather blends node contribution rather than Threshold.
Check / distinguish: Do not confuse it with alpha-edge refinement.
- Tracked Effect Mask adds another failure source
TemporalMask tracking can drift independently of the key.
Check / distinguish: Diagnose tracking separately.
- Bitmap remains mask datatype
FlowAn image through Bitmap can become an Effect Mask, but the physical port remains mask data.
Check / distinguish: Use the documented primary and reference image inputs; verify each branch before adjusting the key.
Output / Premultiplication · Post Multiply · Alpha/RGB QC
Output contract for downstream compositing and automation.
- Post Multiply Image
Output / Premultiplication > Post Multiply ImageWhen enabled, multiplies Foreground RGB by the generated alpha. The default enabled state suits a normal premultiplied compositing workflow. Disabling it means downstream nodes must account for a different RGB/alpha relationship.
Check / distinguish: Inspect Merge edges over both light and dark backgrounds before disabling Post Multiply.
- Post Multiply On is normal keyed output
Post Multiply ImageOn multiplies Foreground RGB by generated alpha.
Check / distinguish: Use for normal premultiplied Merge.
- Post Multiply Off is unpremult boundary
Post Multiply ImageOff leaves RGB unmultiplied by the new alpha.
Check / distinguish: Downstream must know this.
- Mix artifacts can be premult errors
Composite QCBright/dark fringes are not always Threshold problems.
Check / distinguish: Inspect premult state.
- Foreground RGB remains visual source
Output semanticsOutput RGB comes from the Foreground plate.
Check / distinguish: Background is reference only.
- Alpha Viewer is mandatory
QCGenerated alpha must be inspected separately.
Check / distinguish: Inspect raw/refined states.
- 100% edge QC
QCMisregistration/premult halos are visible at 100%.
Check / distinguish: Do not rely on Fit View.
- Playback QC
Temporal QCNoise/light/background changes cause matte chatter.
Check / distinguish: Play the shot.
- Serialization needs live export
AutomationFive ports, filters, local/main Inverts and Post Multiply require target-build evidence.
Check / distinguish: Export a .setting/.comp.
Before adjusting the node
- Background is the clean plate, Foreground is the subject shot. Verify the roles and registration first.
- Inspect raw alpha at Blur=0 and tune Threshold Low/High before any smoothing.
- Solid Matte preserves opacity, Garbage Matte removes it, and Effect Mask limits the whole node.
- Keep main Invert separate from the two local Inverts, and retain Post Multiply for a normal Merge.
- Compare the real Controls/Filter screenshots, then QC alpha, RGB edges at 100%, and the Merge over playback.
Reference documentation
- Blackmagic Design · Fusion Visual Effects
Official Blackmagic learning material for Fusion logic, masks, compositing and core tools.
- Blackmagic Design · DaVinci Resolve support
Current Resolve/Fusion manuals and support material. Exact control names and placement can vary by version.
Examples
DifferenceKeyer: registration first, Threshold second
Lock in the correct Background/Foreground roles and observe the exact Low/High mapping without hiding registration errors behind heavy Blur.
Starting conditions
DaVinci Resolve / Fusion Target: Resolve 21/21.1 · Difference Keyer is documented as a standard Fusion Matte node; no Studio-only label is attached to its Resolve 21 manual entry · Cross-platform reference; live Resolve execution not run in this package
1920 × 1080 · 24 fps · 96 frames · 2D image keying: clean Background + subject Foreground → difference-derived Alpha → normal image output
- DaVinci Resolve / Fusion 21+
- DifferenceKeyer
- Precisely aligned clean plate and subject plate
Source material
- subject-plate
A locked-off plate containing the subject/actor on the real background.
Any subject plate with a closely matching clean plate.
- clean-plate
The same shot without the subject, with matching camera, focus and lighting.
Any geometrically and photometrically aligned background reference.
Nodes and connections
KEY— DifferenceKeyer · DifferenceKeyerOUT— MediaOut · MediaOut
| Source | Destination | Data |
|---|---|---|
DifferenceKeyer (KEY)Output | MediaOut (OUT)Input | image |
External inputs
clean-plate— DifferenceKeyer (KEY) /Background· imagesubject-plate— DifferenceKeyer (KEY) /Foreground· image
Graph output: MediaOut (OUT)
Parameter values
- DifferenceKeyer (KEY) / Controls / Threshold Low
0Start from the documented lower-threshold baseline.
- DifferenceKeyer (KEY) / Controls / Threshold High
0.02Use the captured Inspector default as a diagnostic starting point, not a universal key preset.
- DifferenceKeyer (KEY) / Controls / Blur
0Expose registration and threshold errors before matte smoothing.
- DifferenceKeyer (KEY) / Controls / Invert
falseKeep normal subject-opaque/background-transparent polarity.
Reproduce the example
- Connect the clean plate to orange Background and the subject plate to green Foreground. Keep Blur at 0 and Invert off.
DifferenceKeyer measures Foreground against Background; swapping their roles breaks the intended matte/premultiplication workflow.
Check: Matching static background areas produce little difference while the real subject produces a clear difference.
- Tune Low/High while viewing alpha: values below Low should become black, above High white, and the interval between them grayscale.
This is the documented DifferenceKeyer transfer function; Filter/Blur should not replace the actual key threshold.
Check: The subject remains white/gray while the clean background is mostly black without aggressively destroying weak subject detail.
Expected result
- MediaOut (OUT) · frame 48
A correctly polarized rough difference matte is produced without hiding registration errors behind blur.
Alpha: Alpha directly reflects Threshold mapping: black=transparent, white=opaque, gray=partial transparency.
When the result differs
- The whole background is covered by noisy gray matte.
Cause: The clean plate does not match camera/focus/noise/lighting, or Threshold is being tuned before registration.
Correction: Align/match the plates first and keep Blur at zero until the baseline difference is under control.
References
- Blackmagic Design — DaVinci Resolve 21 Reference Manual: Matte Nodes / Difference Keyer [DFK]
Fusion Page Effects > Matte Nodes > Difference Keyer [DFK]: Background, Foreground, Garbage Matte, Solid Matte and Effect Mask inputs; Threshold, Filter, Blur, Clipping Mode, Contract/Expand, Gamma, Invert and Post Multiply Image.
- Blackmagic Design — The Visual Effects Guide to DaVinci Resolve 20
Fusion fundamentals and MediaOut role used only for the terminal viewer/output node in these editorial graphs.
DifferenceKeyer: Solid Matte and Garbage Matte solve opposite problems
Verify the two dedicated matte ports and keep them conceptually separate from Effect Mask.
Starting conditions
DaVinci Resolve / Fusion Target: Resolve 21/21.1 · Difference Keyer is documented as a standard Fusion Matte node; no Studio-only label is attached to its Resolve 21 manual entry · Cross-platform reference; live Resolve execution not run in this package
1920 × 1080 · 24 fps · 96 frames · 2D image keying: clean Background + subject Foreground → difference-derived Alpha → normal image output
- DaVinci Resolve / Fusion 21+
- DifferenceKeyer
- Precisely aligned clean plate and subject plate
Source material
- subject-plate
A locked-off plate containing the subject/actor on the real background.
Any subject plate with a closely matching clean plate.
- clean-plate
The same shot without the subject, with matching camera, focus and lighting.
Any geometrically and photometrically aligned background reference.
- solid-mask
A mask covering subject detail that the difference key incorrectly loses.
A Polygon/B-Spline/Bitmap mask over subject detail that must remain opaque.
- garbage-mask
A mask covering a scene region that must be forcibly removed from the matte.
A Polygon/B-Spline/Bitmap mask over an unwanted/rigging region.
Nodes and connections
KEY— DifferenceKeyer · DifferenceKeyerOUT— MediaOut · MediaOut
| Source | Destination | Data |
|---|---|---|
DifferenceKeyer (KEY)Output | MediaOut (OUT)Input | image |
External inputs
clean-plate— DifferenceKeyer (KEY) /Background· imagesubject-plate— DifferenceKeyer (KEY) /Foreground· imagesolid-mask— DifferenceKeyer (KEY) /SolidMatte· maskgarbage-mask— DifferenceKeyer (KEY) /GarbageMatte· mask
Graph output: MediaOut (OUT)
Parameter values
- DifferenceKeyer (KEY) / Controls / Solid Matte > Invert
falsePreserve the protected subject region as opaque.
- DifferenceKeyer (KEY) / Controls / Garbage Matte > Invert
falseRemove the unwanted region using the normal garbage-matte polarity.
- DifferenceKeyer (KEY) / Controls / Gamma
1Keep matte gamma neutral while proving helper-matte roles.
Reproduce the example
- Connect a Solid Matte to the white input around subject detail lost by Threshold.
Solid Matte is applied directly to alpha and is used for regions that must remain opaque.
Check: The protected region returns to the opaque matte without globally weakening Threshold.
- Connect a Garbage Matte to the gray input over a false-difference region that should be removed.
Garbage Matte makes the selected region transparent so a local problem does not force destructive global Threshold changes.
Check: The unwanted region disappears from alpha while the protected Solid Matte remains opaque.
Expected result
- MediaOut (OUT) · frame 48
The difference matte is locally repaired by two independent helper masks without changing the base plate registration.
Alpha: Solid Matte adds opacity and Garbage Matte removes to transparency; each local Invert affects only its helper mask.
When the result differs
- Garbage Matte unexpectedly preserves the region instead of removing it.
Cause: Garbage Matte Invert is enabled or the source mask has opposite polarity.
Correction: Check the local Garbage Matte Invert without changing the DifferenceKeyer main Invert.
References
- Blackmagic Design — DaVinci Resolve 21 Reference Manual: Matte Nodes / Difference Keyer [DFK]
Fusion Page Effects > Matte Nodes > Difference Keyer [DFK]: Background, Foreground, Garbage Matte, Solid Matte and Effect Mask inputs; Threshold, Filter, Blur, Clipping Mode, Contract/Expand, Gamma, Invert and Post Multiply Image.
- Blackmagic Design — The Visual Effects Guide to DaVinci Resolve 20
Fusion fundamentals and MediaOut role used only for the terminal viewer/output node in these editorial graphs.
DifferenceKeyer: Effect Mask and Post Multiply are different boundaries
Verify that Effect Mask limits the node contribution after processing while Post Multiply defines the output RGB/alpha relationship.
Starting conditions
DaVinci Resolve / Fusion Target: Resolve 21/21.1 · Difference Keyer is documented as a standard Fusion Matte node; no Studio-only label is attached to its Resolve 21 manual entry · Cross-platform reference; live Resolve execution not run in this package
1920 × 1080 · 24 fps · 96 frames · 2D image keying: clean Background + subject Foreground → difference-derived Alpha → normal image output
- DaVinci Resolve / Fusion 21+
- DifferenceKeyer
- Precisely aligned clean plate and subject plate
Source material
- subject-plate
A locked-off plate containing the subject/actor on the real background.
Any subject plate with a closely matching clean plate.
- clean-plate
The same shot without the subject, with matching camera, focus and lighting.
Any geometrically and photometrically aligned background reference.
- effect-mask
A local mask covering only the area where DifferenceKeyer should contribute.
A Rectangle/Polygon/B-Spline/Bitmap mask around the local keying region.
Nodes and connections
KEY— DifferenceKeyer · DifferenceKeyerOUT— MediaOut · MediaOut
| Source | Destination | Data |
|---|---|---|
DifferenceKeyer (KEY)Output | MediaOut (OUT)Input | image |
External inputs
clean-plate— DifferenceKeyer (KEY) /Background· imagesubject-plate— DifferenceKeyer (KEY) /Foreground· imageeffect-mask— DifferenceKeyer (KEY) /EffectMask· mask
Graph output: MediaOut (OUT)
Parameter values
- DifferenceKeyer (KEY) / Controls / Post Multiply Image
trueNormal keyed-foreground baseline with RGB multiplied by the generated alpha.
- DifferenceKeyer (KEY) / Controls / Clipping Mode
"Frame"Use the captured/default full-frame DoD baseline while testing the mask boundary.
- DifferenceKeyer (KEY) / Controls / Filter
"Fast Gaussian"Use the captured target-build option for a small controlled matte blur if needed.
- DifferenceKeyer (KEY) / Controls / Blur
0.5Apply only a small amount so the mask/premultiplication test remains readable.
Reproduce the example
- Connect a local mask to the blue Effect Mask and compare DifferenceKeyer contribution inside and outside that area.
Resolve 21 defines Effect Mask as a post-process limitation; it is neither a Solid/Garbage Matte nor a clean-plate source.
Check: Difference keying is limited to the selected area while the difference transfer function inside it remains unchanged.
- Keep Post Multiply Image enabled and inspect the keyed foreground in a normal downstream Merge/composite.
According to the manual, enabled Post Multiply multiplies RGB by the generated alpha and yields the normal premultiplied keyed image.
Check: Semi-transparent edges do not retain full-strength hidden RGB that would create incorrect fringes in a normal premultiplied Merge.
Expected result
- MediaOut (OUT) · frame 48
Effect Mask localizes the node contribution while enabled Post Multiply preserves the normal premultiplied output for compositing.
Alpha: Effect Mask does not replace the generated alpha; it limits DifferenceKeyer application. Post Multiply changes RGB relative to that alpha, not the Threshold logic itself.
When the result differs
- Edges look wrong in a normal Merge after Post Multiply is disabled.
Cause: RGB is no longer premultiplied by the generated alpha while downstream still treats it as a normal keyed foreground.
Correction: Re-enable Post Multiply Image or explicitly rebuild downstream for an unpremultiplied/subtractive workflow.
References
- Blackmagic Design — DaVinci Resolve 21 Reference Manual: Matte Nodes / Difference Keyer [DFK]
Fusion Page Effects > Matte Nodes > Difference Keyer [DFK]: Background, Foreground, Garbage Matte, Solid Matte and Effect Mask inputs; Threshold, Filter, Blur, Clipping Mode, Contract/Expand, Gamma, Invert and Post Multiply Image.
- Blackmagic Design — The Visual Effects Guide to DaVinci Resolve 20
Fusion fundamentals and MediaOut role used only for the terminal viewer/output node in these editorial graphs.
Other outlines from the article
Locked-off actor plus clean plate
The actor plate is compared with the empty set to generate a rough alpha for downstream refinement.
- Clean Plate → Background
- Actor Plate → Foreground
- DifferenceKeyer
- MatteControl / Merge
Solid plus Garbage refinement
Solid Matte restores lost subject detail while Garbage Matte removes a region where clean-plate comparison is unreliable.
- Foreground + Background
- Solid/Garbage masks
- DifferenceKeyer
- Output
Localized difference key
Effect Mask limits the whole keyer to a small area without becoming the generated key itself.
- Foreground + Clean Plate
- Effect Mask
- DifferenceKeyer
- Merge
Mistakes
- Sending the subject shot to Background and the clean plate to Foreground.
- Comparing plates with mismatched framing, focus, exposure or lighting.
- Ignoring moving leaves, water, shadows and reflections, which are real differences from the reference.
- Denoising, stabilizing or applying lens corrections to only one input branch.
- Using an excessively narrow Threshold range and losing subtle subject detail.
- Keeping Threshold too broad and retaining a dirty gray background.
- Using heavy Blur to hide camera shifts or a poor clean plate.
- Expecting Filter to change the initial pixel-by-pixel comparison.
- Looking for Num Passes under every filter instead of selecting Multi-box.
- Treating Clipping Mode as Crop or an artistic masking control.
- Assuming Contract/Expand is a general hard-edge grow/shrink operation.
- Trying to repair a strictly binary 0/1 matte using Gamma alone.
- Confusing main Invert with the local Solid Matte and Garbage Matte Inverts.
- Using Solid Matte to delete an area or Garbage Matte to protect it.
- Treating Effect Mask as a replacement for Solid/Garbage or the final subject alpha.
- Turning Post Multiply Image off and then using an ordinary premultiplied Merge without checking RGB edges.
- Judging only one frame without inspecting alpha and motion playback.
- Expecting a guaranteed final hair/smoke key on a changing background without further refinement.
Tips
- Start with an overlay or difference-style comparison of the plates and fix geometric mismatch first.
- Keep Blur at zero until Threshold produces a meaningful raw alpha.
- Separate Low/High from Contract/Expand and Gamma: the first creates the key, the others reshape its edges.
- For Multi-box, increase Num Passes only after comparing both quality and speed.
- Solid Matte preserves desired opacity; Garbage Matte removes unwanted regions; Effect Mask limits the effect itself.
- Match denoise and stabilization across both plates without erasing genuine subject detail.
- If a shadow should not appear in the matte, remove it locally instead of breaking global thresholds.
- Inspect the alpha and composite over both light and dark backgrounds.
- For a regular Merge workflow, keep Post Multiply Image enabled.
- If helper mattes cover most of the frame, consider whether another keyer or roto would be more reliable.
- Play the full shot: noise and light fluctuations may cause temporal edge chatter.
- Label the inputs CleanPlate_BG and Subject_FG to protect their roles during revisions.
- Record the Resolve build and save a test .comp/.setting before automating the node.
Workflow order
- Prepare a clean plate and subject plate with matching camera, timing, lighting, focus and image dimensions.
- Connect the empty scene to orange Background and the subject shot to green Foreground.
- Begin with Blur=0, neutral Gamma and no helper masks; inspect the alpha channel.
- If the background is already visible in alpha, correct registration, noise or lighting before adjusting Threshold.
- Set Low and High until the background is black, the subject mostly white and the edges appropriately gray.
- Choose Filter for matte refinement only; when using Multi-box, compare different Num Passes.
- Apply minimal Blur and verify the 100% matte edge against the actual subject boundary.
- When input DoD is limited or frame-edge artifacts appear, compare None/Domain/Frame in Clipping Mode.
- Tune Contract/Expand and Gamma on semitransparent regions, comparing before/after alpha.
- Use Solid Matte to protect lost subject regions and Garbage Matte to remove false background differences.
- Check local Solid/Garbage Invert separately from the main Invert control.
- If required, restrict the complete operation using blue Effect Mask without treating it as a helper matte.
- Keep Post Multiply Image on for a normal premultiplied Merge; disable only with an intentional downstream setup.
- Perform QC: alpha → RGB edges at 100% → final Merge → several seconds of playback.
- For portable graphs, validate physical port and control IDs in a .comp/.setting from the target Resolve build.
