This page covers:

  • What is "Mask Mode"?
  • How Mask Mode works
  • Some trivia

This page does not cover how to implement Mask Mode, see this guide for that.

What is "Mask Mode"?

Mask Mode exists to solve the challenge of adding an opacity channel to Keysight, which is otherwise a fully opaque standard program. It is an approach is intended to integrate with OBS for live-streaming. The following image overlays the default Quicksilver preset onto a piano spiral image using Mask Mode:

Mask mode comparison

How Mask Mode works

The toggle for Mask Mode can be found under (Advanced) Scene > Semi-transparency (or the keyboard shortcut M). When enabled, you will notice that colours become strangely altered and either very blue, or slightly yellow:

Mask mode colour

Internally, Keysight is rendering a binary stencil from the opaque geometry visible in the scene:

Stencil

The entire scene has its blue channel colour multiplied down by 0.5, and then any pixels that are white in this stencil have 0.5 added to the blue channel. In this way, the binary stencil image becomes encoded onto the blue channel for later extraction by detecting whether the blue channel is above 0.5.

A filter is then applied to the Keysight source in OBS that corrects the colours back, and then uses the extracted stencil to assign transparency.

Note

It's not quite 0.5 for the blue channel offset values. There's a tiny bit of wiggle room and the blue channel is actually multiplied by 0.495, for example. But 0.5 is the conceptual amount!

Configuration

The toggles found under (Advanced) Scene > Semi-transparency allow control over which geometry Keysight will mask out. Note that masking can only function on opaque materials (as these allow pixels to have an accurate depth value), so even if Note objects are enabled as a masked object, they will not appear in the stencil if using Transparent material mode.

Controls

Trivia

This approach to semi-transpency has evolved substantially over time. Originally, the only option for transparency was the traditional approach of chroma-keying and making the Keysight Backdrop green. The guide for this actually still exists on Steam here➚, but this approach was very undesirable due to things like bloom and fine particles creating a lot of artifacting.

The first "Mask Mode" in Keysight was released with version 1.2.0 in December 2020, and looked wildly different. The approach was to display both the stencil and raw image "splitscreen", and then use StreamFX's dynamic masking to apply one half of the scene as a mask to the other half. It was an enormous amount of work on the part of the user, and functionally removed 50% of your vertical pixels, and it cost a substantial amount of performance:

Legacy

The modern approach does also have some compromises. Any non-3D-rendered elements (like the menu) look horrifically broken when passing them through mask mode, along with requiring pixel-to-pixel accuracy between the render and OBS, and some other assorted issues covered in more detail in the guide. But there's almost zero performance impact, and far less work required in OBS to get it to work. I have some thoughts on how to improve this in Keysight 2, but the overall approach will likely remain similar!