🥣 spillSoup — User Guide
Version: 1.2 • Author: Theo Grez
Platform: Nuke gizmo
UI overview (from the gizmo code)


Target color
Detection (header: THRESHOLD)
Threshold (0 → 2; default 1) – scales the reference used to detect spill. Higher values = stronger extraction.
Influence (-1 → +1; default 0) – biases the detection towards another color channel.

Spill controls (header: SPILL CONTROL)
These shape the new_spill that is added back after despill:
Brightness (Grade multiply; default 0) – gain on the reinserted component. 0
= pure despill.
Saturation (Saturation1) – saturation of the reinserted component. At 1.0
the image will look the same if the Brightness
is set at 1.0
as well : you're re-injecting the same thing you removed. 0
= white spill.
Gamma (Grade gamma; default 1) – tones the reinserted component (push into shadows/mids/highs).
Hue (HueShift hue_rotation; default 0°) – shifts the hue of the reinserted component.

Output / viewing
Show: Result
(input with spill removed) or Isolated Color
(view the extracted spill matte/isolated channel).
Output in alpha: replaces output alpha with the isolated spill (useful for key/matte work).
Mix: overall blend (Dissolve) between the original and processed result (1.0 = full effect).
How it works (a bit of math)
The gizmo extracts a spill component from the chosen target channel and lets you reinsert a modified version of it:
output = (input - original_spill) + new_spill
The per‑channel extraction (for the selected target) is computed with a weighted average of the two non‑target channels and a scale factor (Threshold):
Target Blue: spill_b = b - ((r*(1+Influence) + g*(1-Influence)) / 2) / Threshold
Target Green: spill_g = g - ((r*(1-Influence) + b*(1+Influence)) / 2) / Threshold
Target Red: spill_r = r - ((g*(1+Influence) + b*(1-Influence)) / 2) / Threshold
new_spill
is the original_spill
with a bunch of operations done to it. Namely : Brightness, Saturation, Gamma, and optional Hue adjustments.
Typical workflows
1) Clean despill for keying
Pick Blue or Green to match your screen.
Start with Threshold = 1, Influence = 0.
Leave Brightness = 0 for a pure despill.
If it feels flat, nudge Brightness up and keep Saturation low; use Gamma to bias tones.
2) Fine‑tune detection with Influence
View Isolated Color via Show.
Sweep Influence toward the channel that best matches your subject until edge hits disappear.
Adjust Threshold to balance coverage vs. edges.
3) Spill‑based matte / alpha
Set Show → Isolated Color to validate the matte.
(Optional) Connect mask input to limit where spill is considered.
Enable Output in alpha to pipe the matte downstream.
Tips for minimum edge artifacts
Use Influence to steer away from problem edges (e.g., a red wardrobe next to a green screen → bias toward Red when targeting Green).
Inspect Isolated Color; to help vizualize what you are extracting and see if anything shouldn't be removed (the spill of clothes for example). You can then play with the Threshold to.
Keep Brightness modest; try driving Brightness + Saturation together.
Work pre‑multiplied correctly and in linear; watch for clamped values.
Created by Theo Grez