Exporting alpha channels from the Color page in DaVinci Resolve

Blackmagic Design introduced the “Magic Mask” tool in Resolve version 17, and while I was initially excited to use it as a more precise alternative to pulling qualifier keys or awkward rotoscoping of elements using PowerCurve windows, I still find myself rarely using it due to the high volatility of its caching mechanism.

Far too often, grades will appear to randomly break because the tiniest modification of an upstream node will still cause a downstream Magic Mask node to completely invalidate itself. Whenever this happens, you need to recalculate the mask by manually invoking one of the “Regenerate Object Mask” sub-menu commands (neither of which have mappable keyboard shortcuts, to add insult to injury!)

Regenerate Object Mask sub-menu

Many forum users will defend this behavior of Magic Mask by advising that you should only put Magic Mask nodes at the very beginning of your node trees, and then enable node-caching on those Magic Mask nodes. While true, this adds a lot of unnecessary friction and limitations to your grading process, makes for messier node trees, and also complicates workflows that use Resolve 19’s new Node Stacks feature.

These workarounds also don’t work if you do anything within Resolve’s image-processing Order of Operations that changes the state of the clip before it hits the Color page. This means modifying even a single pixel within the Fusion page, nudging a Camera Raw parameter, or even the simple act of creating a new Grade Version will invalidate the Mask calculation in the Color page!

At the time of this writing (Resolve 19 beta 5), the Magic Mask tool does not have a built-in way to save a persistent, pre-rendered cache of the actual mask calculation to disk, similar to the “Freeze” function of After Effects’ Roto Brush tool. As a user of the Roto Brush tool for going on 15 years, the lack of a similar function in Magic Mask is extremely frustrating and feels like a major flaw in the implementation of an otherwise excellent intelligent masking tool. So on larger projects, I prefer to pull mattes first in After Effects using the Roto Brush tool (which also has several advantages over Magic Mask in terms of the accuracy of matte generation), and then render the mattes out to disk as multi-channel EXR sequences that can be re-imported into Resolve for use as External Matte clips. This is a much more bullet-proof way of ensuring that your mattes don’t unexpectedly break your grading workflow.

If you don’t know how to use After Effects, and want to export out calculated Magic Masks to standalone matte clips, you can still do this from the Resolve Color page, albeit with a few extra hoops to jump through. This video explains the process, with new information specific to Resolve 19’s Node Stacks feature: