1 The idea
Float images can hold negative numbers. Nodes that push edges, like sharpen or image subtraction, create values below 0 around edges. They look black on screen, but merge or grade them further and the negatives cause odd dark rims or colour shifts.
Clamp cuts values below the minimum and above the maximum. Use it to remove negatives, but don’t clip above 1 if those are HDR highlights you need.
2 Hands-on in the mini compositor
Task: enable the Clamp so it removes only negatives (minimum 0) and keeps values above 1 (maximum 10)
3 Deep dive
Where negatives come from
Float images in Nuke can hold values below 0, and many nodes create them without warning. The screen shows them as plain black, so they are almost invisible to the eye. Besides the causes in the table, some despill set-ups and regrain can also push dark pixels below 0.
| Cause | Where it shows |
|---|---|
| Sharpen | The dark side of edges next to bright areas |
| Merge minus / from | Wherever one image is lower than the other (difference returns the absolute value, so it stays positive) |
| Saturation above 1 | Already-strong colours like LEDs or sparks |
| Converting from a wider gamut | Saturated colours outside the target gamut |
| Sharp filters in a Transform | Dark rings around bright detail (ringing) |
Why they hurt
A negative sitting still is harmless. The trouble is the next node: a blur spreads it into a dark rim, a multiply by a negative flips direction, and gamma or a conversion to log copes badly with negatives. You get black specks or odd colours that are hard to trace.
Example: sharpen the CG robot standing in front of HDR sparks. The robot’s edge next to the sparks goes negative. Add a defocus or blur after it and the negatives spread into a dark outline around the robot that was never in the render. (A threshold glow is barely affected, because it only blurs what is above its threshold.)
Integer files (8/16-bit) cut negatives to 0 on their own, but an EXR keeps them, so whatever slips through turns up in the grading suite.
- 1Sharpen
- 2Negative edge
- 3Defocus / Blur
- 4Dark outline
Find them before you fix them
Probe the dark side of sharpened edges and the rims around bright things. To scan the whole frame, an Expression with alpha = r<0 || g<0 || b<0 and a look at the a channel shows every negative pixel in white.
Once found, ask which node made them; fixing the cause beats clamping at the end
Pick the fix that fits the cause
A Clamp that cuts only the bottom at 0 and leaves the top open suits negatives from sharpen or saturation. Don’t set maximum = 1: the HDR light that glow and defocus need would go too.
Some negatives are meant to be there, such as a difference between plate and CG that you will add back later; clamp it in between and the add-back won’t restore the image. For Transform ringing, do the transform in log or choose a softer filter.
| Cause | Fix |
|---|---|
| Sharpen / Saturation | Clamp bottom 0, top open |
| A difference to be added back | No clamp; keep float |
| Transform ringing | Transform in log or a softer filter |
4 In real work
In Nuke
- Clamp: minimum 0 with maximum disabled (or set high enough) to remove only negatives
- Expression: alpha = r<0 || g<0 || b<0, then view the a channel to find negatives anywhere
- Log2Lin (lin2log) → Transform → Log2Lin (log2lin) when a sharp filter causes ringing
- Merge from / minus that will be added back later: no Clamp in between
Common mistakes → the fix
- ✗ Clamping the whole frame to 0–1 at the end “to be safe”✓ Clamp only the bottom, and close to the cause; values above 1 are light you need
- ✗ Looking at the screen and assuming there are no negatives because it just looks black✓ Probe the edges or build a check alpha with an Expression
- ✗ Clamping a plate-minus-CG difference before adding it back✓ Those negatives are intended; keep float until the add-back is done
- ✗ Thinking Merge difference makes negatives✓ difference returns an absolute value; minus and from are the ones that go negative
Before you send the shot
- Scan the whole frame for negatives at least once before delivery
- Every Clamp has a reason and doesn’t cut values above 1 by accident
- Sharpened edges show no dark outline after defocus or blur
- Intended negatives (differences to be added back) are not clamped
5 Check yourself
To remove negatives without losing HDR light, how do you set Clamp?
🔒 Answer the question above and this card opens
1. The robot in front of HDR sparks was sharpened and shows a dark outline after the defocus. Which Clamp, and where?
2. Which Merge operation can produce negatives?
Where the numbers come from: Computed in your browser. Saturation, Multiply, Clamp, Invert, Keymix, Copy and Grade match Nuke 17.0v2 (checked). Blur, Defocus, Glow, Sharpen, ChromaticAberration, Vignette, LensDistort, Grain, Erode, Toe, the Keyer and Despill are teaching versions, not identical to Nuke’s nodes. Transform here is also a teaching version: bilinear filtering, no concatenation, cropped at the frame edge. Images are our own Blender renders (the green screen is fully code-built; the desert scene uses Gaea 2.3 hills, a Poly Haven CC0 HDRI sky, Poly Haven CC0 rocks and grass, Quixel sand and cliff textures and a Mixamo rig for the robot, with Quixel and Mixamo used in the renders only).