Home · Lab · Case Files: real comp problems

CF2 Case 2: a light rim round the key, though the matte didn’t change

Before touching the matte, check the colour at the edge

Case Files: real comp problems · ~6 min · Free

1 The idea

Symptom: the green-screen robot has a thin light outline round its legs and shoulders, and a faint light band appears along the floor seam. Most people reach for an erode or a tighter matte. But view the a channel and compare the Premult node with the Grade: alpha is identical in every pixel, because this Grade doesn’t touch alpha. What changed is the colour.

This Grade raises the gamma so the robot looks as hazy as the plate. Gamma is not a pure multiply. On premultiplied colour an edge pixel, already multiplied by alpha, is treated as "a dark colour" and lifted far too much, so both the edges and the small leftover alpha along the floor seam light up.

on a premult edge: (c·a)^(1/γ) ≠ c^(1/γ)·a

2 Hands-on in the mini compositor

Task: fix the light rim without touching the matte or the gamma value

Look in the Grade’s Properties for the option that does unpremult → grade → premult inside the node

SkyVFX mini compositor · CF2640×360 · float · 1001

3 Deep dive

Tell them apart: an alpha problem or a colour problem

A bad edge has two separate causes. If the alpha is wrong, the edge is too wide or too thin: background leaks through or hair gets eaten. If the colour is wrong, the edge shape is right but the edge pixels have the wrong brightness or hue.

The fastest test is to compare the a channel between nodes. If alpha doesn’t change but the edge does, it’s a colour problem, and eroding or tightening the matte only eats detail.

A rim that appears with no alpha change: check the colour grade before the matte

The numbers at the edge

Say an edge pixel has a true colour of 0.3 and alpha 0.5, so the premultiplied image holds 0.15. A 1.6 gamma straight on 0.15 gives about 0.31. Unpremultiplied first: 0.3 through the gamma is about 0.47, times alpha about 0.24. The wrong edge is roughly 30% too bright.

OperationStraight on premultWhy
gain / multiplySafeA multiply commutes with premult
gammaNot safeEdges go too bright or dark
lift / offsetNot safeAdds to low-alpha pixels too
saturationSafe (scales around luma)Rec.709 luma is linear

Leftover alpha, amplified

A gamma above 1 pushes small values up hard. Very low-alpha pixels along the floor seam, normally invisible, light up into a band. Graded unpremultiplied, their colour is multiplied back by that small alpha, so they fade away again.

4 In real work

In Nuke

  1. Grade: tick "(un)premult by" with rgba.alpha whenever you use gamma, lift or offset on a premultiplied image
  2. Or as a chain: Unpremult → Grade/ColorCorrect → Premult
  3. Press A in the Viewer to see alpha, then flip between the nodes before and after
  4. Inspect edges at gain ×4 and high saturation so rims jump out

Common mistakes → the fix

  • ✗ Eroding the moment an edge looks wrong✓ Compare the alpha first; if it didn’t change, the colour is wrong.
  • ✗ Putting a gamma or lift straight on a premultiplied image✓ Unpremult first, or use "(un)premult by" in the Grade.
  • ✗ Measuring the edge only at the key’s output✓ Measure on the final comp too; grades in between change the edge.

Before you send the shot

  • Edge alpha and edge colour checked separately
  • Every gamma, lift or offset on premult colour is done unpremultiplied
  • Edges viewed at gain ×4 over both bright and dark backgrounds
  • No leftover alpha lighting up along the floor seam

5 Check yourself

One question to check yourself

Alpha is the same before and after the Grade, yet the edge got lighter. What do you suspect first?

What you learned

🔒 Answer the question above and this card opens

More questions

1. Which is safe on a premultiplied image without spoiling edges?

2. Alpha is identical before and after a node, but the edge changed. What does it mean?

Where the numbers come from: A case from a real production problem, retold without naming the job and rebuilt with our own Blender images. Computed in your browser: Merge, Grade, Premult, Keymix, Invert and Clamp match Nuke 17.0v2 (checked); Toe, Defocus, Sharpen, Grain, the Keyer and Despill are teaching versions, not identical to Nuke’s nodes.