1 The idea
Sharpen adds no real detail. It just pushes the bright side of an edge brighter and the dark side darker, creating halos and negative values. If the plate is sharper than the CG, fix the cause (render filtering or defocus) first.
If you must sharpen, keep the amount and size small, and check the edges with viewer gain.
out = x + amount · (x − blur(x))2 Hands-on in the mini compositor
3 Deep dive
What the formula really does
x − blur(x) is an “edge layer”: zero on flat areas, positive on the bright side of an edge and negative on the dark side. Sharpen multiplies that layer by amount and adds it back. No new detail appears; only the edge contrast is pushed.
Example: a dark edge (0.1) against a bright sky (0.8), amount 1.5. A sky pixel by the edge that blurs to 0.6 becomes 0.8 + 1.5 × 0.2 = 1.1, brighter than the real sky. A dark pixel by the edge that blurs to 0.3 becomes 0.1 − 1.5 × 0.2 = −0.2, negative.
- 1x
- 2blur(x)
- 3x − blur(x) = edges
- 4× amount
- 5+ x = result
Two knobs and what you see
Amount sets how hard the edge is pushed; size sets how wide the edge band is. A small size touches only a thin line; a big size draws a thick bright ring around the robot that you can see from across the room. Our lab uses this formula as is; same idea as Nuke’s Sharpen.
| Knob | What it does | Too much looks like |
|---|---|---|
| amount | How hard edges are pushed | White and black rims, negative values |
| size | How wide the edge band is | Thick halo rings, an old-video look |
Why it’s usually the wrong fix
Usually CG is sharper than the plate, not softer. The plate went through a real lens, which is always a little soft even in focus. So the right move is usually to soften the CG by a pixel or two to match, not to sharpen the plate.
If the CG really is softer, find the cause first: render filtering, too low a resolution, too much defocus or motion blur. Sharpen also boosts grain and noise, so the image turns crunchy, and the negative edge values cause trouble later in divides, log conversions and keys.
When sharpening is fair: some plates come with sharpening baked in by the camera or an earlier step, visible as a thin bright line along edges. To make CG match, sharpen the CG just enough that its edges have the same character, and always before the grain.
Checking for halos properly
Halos hide well at normal exposure. Push the viewer gain up to see the dark side, down to see the bright side, then sample a pixel on the dark side of the edge. A negative number means you pushed too hard.
- 1Viewer gain up
- 2Viewer gain down
- 3Sample the dark side
- 4Wipe against the plate
Zoom to 200% and wipe against a real edge in the plate; the CG edge should look the same
4 In real work
In Nuke
- Sharpen: start with a low amount and small size, then raise slowly.
- To see each piece: Blur → Merge minus (A = source, B = blur) = edge layer → Multiply (or a Grade with black clamp off) to scale it → Merge plus onto the source. The edge layer is negative on the dark side, and a default Grade has black clamp on, which sets those values to 0: edges would only brighten, never darken.
- CG sharper than the plate: a small Blur on the CG before the merge, instead of sharpening the plate.
- Sharpen always goes before Grain, or the grain turns harsh and crunchy.
Common mistakes → the fix
- ✗ Sharpening the whole comp after the grain✓ Grain is always last; sharpen before it, if at all.
- ✗ Using sharpen to fix CG that looks soft✓ Find the cause: render filtering, resolution, defocus or motion blur.
- ✗ Sharpening a soft key edge to make it look crisp✓ It draws a halo around the matte. Fix the key or the edge treatment instead.
- ✗ Ignoring the negative values at edges✓ Lower amount or size until nothing goes negative. Clamping afterwards only hides it.
Before you send the shot
- No halo rings around objects with the viewer gain up and down
- No negative values on the dark side of edges
- CG sharpness matches the plate when wiped at 200%
- Any sharpen sits before the grain
5 Check yourself
Does sharpening add real detail?
🔒 Answer the question above and this card opens
1. After a sharpen, a pixel on the dark side of that edge reads −0.2. What should you do?
2. The CG robot looks sharper than the desert plate. What should you try first?
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).