1 The idea
Every pixel stores four numbers: r, g, b and a (alpha). Alpha says how much of the pixel is covered: 1 = fully, 0 = empty, anything between is an edge, hair or motion blur.
This CG robot was rendered in Blender with its shadow on the ground. Press "a" on the Viewer and point at pixels: the shadow lives in alpha too, while its colour is 0.
2 Hands-on in the mini compositor
Task: use the Shuffle to send alpha into r, g and b so the matte shows as a black-and-white image
Click the Shuffle node and set out r, g, b to a
3 Deep dive
Four numbers, any value
In Nuke every channel is a floating-point number, not locked to 0–1. A hot light such as a spark core can reach tens, and some steps can even push values below 0.
Alpha is different from the other three. It should normally stay between 0 and 1, because it is the share of the pixel the object covers.
| Where in the image | rgb | alpha | What it means |
|---|---|---|---|
| Middle of the robot | Full colour | 1 | Hides the background fully |
| Robot edge | Part of the colour | 0.5 | Hides half |
| Shadow on the ground | 0 | Between 0–1 | Only darkens the plate |
| Spark core | Far above 1 | 0 | Pure light, hides nothing |
| Empty area | 0 | 0 | Nothing there |
Alpha is coverage, not brightness
The robot’s shadow has colour 0 but alpha above 0. Through Merge over the result is 0 + B·(1−a), so the plate darkens by the alpha and no colour is added.
Example: a shadow with alpha 0.4 over ground at 0.5 gives 0.5 × 0.6 = 0.3. The ground keeps 60% of its light.
To see what an element blocks, look at the a channel before the colour
More than rgba: layers
One EXR file can carry many layers: depth, normals, motion vectors, separate light groups. A layer is a named group of channels, such as rgba.red.
Shuffle moves channels around. Copy is handy for one channel, such as alpha from a second input. Remove drops layers you are done with, so the script stays light.
- 1Read EXR
- 2Shuffle a layer
- 3Use it
- 4Remove (keep rgba)
Reading channels properly
Press R, G, B or A on the Viewer to see one channel at a time. A matte that looks fine at normal exposure can hide small holes that only show with the gain pushed up.
Another quick test: put the element over a white Constant. Holes in the alpha and dirty edges jump out at once.
4 In real work
In Nuke
- Read (EXR) → Viewer: press A for alpha, R/G/B for each colour
- Shuffle: wire a into the r, g and b outputs to see the matte as a black-and-white image
- Copy: bring alpha from a Roto or key branch into the element
- Remove (operation keep, rgba) once the extra layers are used
- Merge over a white Constant to check the alpha for holes
Common mistakes → the fix
- ✗ Painting a shadow black in rgb with alpha 0✓ Over with alpha 0 just adds 0, so nothing changes. The shadow has to live in alpha.
- ✗ Shuffling a light-group layer into rgba and losing the alpha✓ Such layers usually have no alpha of their own; route the original rgba.alpha across too.
- ✗ Combining two mattes with plus until alpha goes above 1✓ Combine mattes with max or screen so the value stays at or below 1.
- ✗ Letting every layer flow through the whole script✓ Add a Remove (keep) once you are done; the script gets faster and easier to read.
Before you send the shot
- Alpha viewed with A and the gain pushed up
- No holes or dirty edges over a white Constant
- Alpha stays within 0–1
- You know whether this element is premultiplied
- Unused layers are removed
5 Check yourself
A pixel on the robot’s edge has alpha = 0.5 in a premultiplied image. What does its colour look like?
🔒 Answer the question above and this card opens
1. The robot’s shadow has rgb 0 and alpha 0.4. Merged over ground at 0.5, what is the result?
2. If an element’s alpha is 1.3, what does Merge over do to the background there?
Where the numbers come from: Merge, Grade, Premult and Unpremult here match Nuke 17.0v2 in all 109 test cases (numbers sampled from real Nuke). Blur and Transform are simplified: close, not identical to Nuke. All images are Blender renders of our own scene: a code-built layout with hills made as Gaea 2.3 terrains (Community edition, built headless), a Poly Haven CC0 HDRI sky, Poly Haven (CC0) rocks and dry grass, Quixel sand and cliff textures, and a robot on a Mixamo rig (Quixel and Mixamo are used in the renders only; no source files ship).