Create and Use RGB Disco Mattes (mult-layer) in Resolve
If you have ever lost time waiting to re-track a Magic Mask, or wished you had simply rendered your masks out to save processing power, this workflow is for you. Today, we are breaking down a technique known as Disco Mattes (also called multi-layered mattes or RGB mattes).
This is an old-school pro trick that is still used in high-end production today. It enables you to shuffle multiple masks into the RGB color channels of a single file, render them out as a high-quality ProRes file, and then use them as an External Matte on the Color page.
Here is a step-by-step guide to creating and using Disco Mattes in DaVinci Resolve.
Prepare Your Footage for AI Tracking
Before you start generating masks, it is crucial to handle color management. AI tools like Magic Mask depend heavily on display ready images; they are trained on finished images, not flat Log footage.
Apply a Color Space Transform (CST): In Fusion, add a CST node to convert your Log footage to Rec.709.
Quick Tip: In the CST settings, you can click "Output Color Space" and type "R" to instantly jump to Rec.709 without scrolling.
Magic Mask Setup: When using Magic Mask in Fusion, uncheck "Post Multiply Image." This allows you to see the rest of the image while you work, rather than just the selection.
Advanced Manual Rotoscoping
While Magic Mask is great, sometimes you need a manual roto. You can create a "tracking assisted rotoscope" to save time on manual keyframing.
Create a Shape: Use the Polygon tool to draw your shape.
Add a Tracker Modifier: Right-click the "Center" parameter in the Inspector, select Modify With, and choose Tracker Unsteady Position.
Track the Footage: This adds a tracker modifier. Drag the tracker source (your CST node) into the tracker input, position the tracking box over a high-contrast area, and hit track.
Result: Your manual shape will now follow the motion of the polygon shape automatically.
The "Disco" Setup (Fusion Custom Tool)
This is where the magic happens. We will use the Custom Tool in Fusion to combine three separate alpha masks (e.g., a TV, a Game Boy, and a cartridge) into a single RGB image.
Configuring the Custom Tool
Add a Custom Tool node.
Connect your three mask nodes (Magic Masks or Polygon nodes) into the Custom Tool’s inputs:
Input 1 (Yellow): Mask A
Input 2 (Green): Mask B
Input 3 (Pink): Mask C.
Go to the Channels tab in the Custom Tool inspector and set up the following "recipe":
Red Channel: "a1" (Alpha from Input 1).
Green Channel: "a2" (Alpha from Input 2).
Blue Channel: "a3" (Alpha from Input 3).
Alpha Channel: Set this to
1(solid opaque).
Fixing the "Domain of Definition" (DoD)
If you view your Custom Tool and notice parts of your masks are cut off, it is likely a Domain of Definition issue. Fusion uses the bounding box of Input 1 of the custom tool to define the canvas size to save processing power.
The Fix: Add a Set DoD (Set Domain of Definition) node after your manual masks but before the Custom Tool.
In the Inspector for the Set DoD node, click the “Set” tab to expand the domain to the resolution of the background, ensuring all masks are visible regardless of where they are on screen.
Rendering the Mattes
To use these in the Color page, you need to render them out as a video file.
Format: “Individual Clips”, Use ProRes 4444. It provides high quality without chroma subsampling, perfect for crisp mattes.
Resolution: Select Render at Source Resolution to ensure the highest quality.
Essential Advanced Settings:
Enable Flat Pass: Set to "Always On." This ignores any Color page grades, ensuring you get the pure pixel data from Fusion.
Disable Sizing and Blanking Output: Check this box. This ensures a 1:1 pixel match with the original source, ignoring any framing changes made in the Edit page inspector.
Naming: Use the
%Clip Nametoken and append a suffix like_RGB_Matteso you can easily identify the files later.
Using RGB Mattes on the Color Page
Once rendered, import the matte file back into your project. You can simply drag the file from your OS finder directly into the bins.
The Subclip Alignment Trick
External mattes in the Color page align based on the first frame of the clip, not the timecode. If your source clip on the timeline is a cut-down version of a longer file, the matte won't be in sync. The color page does have an offset control to fix this but on very long sources this is tedious - so I prefer this trick.
The Solution:
Select your clip on the timeline and hit Match Frame (F). This opens the original source clip in the viewer with the exact In and Out points.
Drag from the source viewer into your bin to create a Subclip.
Replace the timeline clip with this new Subclip. Now, the duration matches your rendered matte perfectly.
Connecting the EXT Matte Clip
On the Color page, drag your RGB Matte clip from the media pool directly into the node graph.
The matte node has multiple outputs. Ignore the first output (which is a combined luminance channel).
Use the second, third, and fourth outputs—these correspond to the Red, Green, and Blue channels respectively.
Connect these outputs to the blue mask input of any corrector node to isolate your specific objects (TV, Game Boy, Cartridge) for individual color grading.
Why Do This?
By utilizing Disco Mattes, you front-load the heavy processing work. Once rendered, you never have to re-track those objects again. If a colorist or VFX artist has already done the work of masking, ask for a Disco Matte so you can reuse that data without rebuilding it from scratch.