RGBStraight In-depth

Prev Next

Understanding RGBStraight in Composer: When and Why It Matters

The Problem: Dark Halos in Reusable Keyer Scenes

When you create a dedicated keying scene (containing your HSV Keyer) and reuse it as a source in multiple branding scenes, you may notice dark edges or "halos" around your keyed foreground. This happens because of how alpha blending works by default.

Pre-multiplied vs. Straight Alpha

Most blend modes in Composer (including Normal) produce pre-multiplied alpha output. This means the RGB color values are multiplied by the alpha value before the scene is output.

Pre-multiplied formula:

Output_RGB = Source_RGB × Alpha

When your keyer scene has a black background (RGB 0,0,0) and the keyed foreground has soft, semi-transparent edges (typical around hair, motion blur, or feathered areas), those edge pixels get blended toward black. A pixel that's 50% transparent doesn't just become semi-transparent—its color also shifts toward the black background.

When this pre-multiplied output is then composited over a new background in another scene, those darkened edge pixels create the characteristic dark halo.

How RGBStraight Solves This

RGBStraight keeps RGB values independent of the alpha channel. The RGB data passes through unchanged, while alpha is handled separately.

RGBStraight formula:

Output_RGB = Source_RGB  (unchanged)
Output_Alpha = Computed_Alpha

This means your keyed foreground retains its original colors all the way to the edge, and the alpha channel purely describes transparency. The downstream scene (where you composite over your branded background) can then perform the multiplication correctly, blending against the actual intended background color rather than black.

When to Use RGBStraight

Use RGBStraight on the layer containing your keyed source in any scene where:

  1. The scene output will be reused in other scenes
  2. The current scene's background is black (or any color you don't want baked into edges)
  3. You want clean, halo-free edges regardless of what background is used downstream

Typical workflow:

  • Keyer Scene: Contains HSV Keyer operator, outputs the isolated foreground. Set the layer blend mode to RGBStraight.
  • Branding Scene A: Uses Keyer Scene as source, adds Background A
  • Branding Scene B: Uses Keyer Scene as source, adds Background B

Both branding scenes receive clean, uncontaminated foreground data and can composite it correctly over their respective backgrounds.

When RGBStraight Is Not Needed

If your keyer scene is the final output (not reused elsewhere), or if you're compositing directly over the intended background within the same scene, then Normal blend mode works fine—the pre-multiplication happens against the correct background.