Filmlexikon.
Support
Difference Matte
VFX

Difference Matte

Murnau AI illustration
difference matte unsharp masking mask

Automatic mask extraction by comparing two frames pixel-by-pixel — subtracts background layer to isolate foreground without manual rotoscoping. Fast for controlled environments.

Two identical shots, one with an object and one without—the difference matte is created automatically from this setup. The compositor subtracts pixel by pixel: Where the two images are the same, the result is black (no difference = transparent). Where the object is, it remains white (difference = opaque). This saves hours of rotoscoping work if the prerequisites are met.

On-set practice is crucial: the camera must be on a tripod, lighting constant, background static. You need exactly two takes—one with the character/prop, one without. Even minimal camera movement, flickering lights, or wind in trees will ruin the calculation. I've often seen productions forget these take variations; then you're stuck in editing later. Best practice: mark the second take with a slate so it's clear what the difference material is. The interval between the two shots should be minimal—shoot them as close together as possible so that changes in light or shadows don't interfere.

In compositing, the difference matte is calculated via simple subtraction or over operations. Some compositors prefer correlation-based matchers that compensate for small shifts. Noise in the camera sensor then becomes a problem—the higher the ISO, the less clean the resulting matte. In such cases, a subtle blur on the matte itself helps to smooth out artifacts, or threshold values are used to capture only significant differences. This method works better with a green background (greenscreen) because the difference is greater and there is less susceptibility to noise.

Typical use case: isolating a character against a static background with a precise edge, without having to redraw hair or clothing pixel by pixel. Also for VFX shots where tracking markers have been overlaid or lighting references are needed—the difference matte helps to isolate these cleanly. However, the method is unsuitable for complex, moving scenes with variable lighting. In such cases, keying techniques (like primary or secondary keying) are the better choice.

More in the lexikon

Related terms

Report an error
From the Filmfarm ecosystem

Understand visual language, budget productions, connect crew.

The Lexikon is part of the Filmfarm ecosystem — alongside budgeting (FilmBalance), an industry magazine (FilmCircus) and crew networking (FilmCall, CrewMesh). One shared vocabulary for the whole production.

FilmFarm FilmRadarComing soonFilmPulseComing soonFilmNumbersComing soonFilmCapitalComing soonFilmLabComing soonFilmBalanceComing soonFilmCircusComing soon