# Channels and layers

> Layers (channel sets) on a pipe, how Read finds them, and which nodes change them.

A pipe carries an image made of named **layers** (Nuke's channel sets). Each layer has up to four channels: `rgba` is the main image; others hold depth, motion vectors, normals, render passes, IDs and so on.

## Where layers come from

A [Read](/docs/nodes/read) groups a file's channels by name:

| Channels in the file | Layer |
|---|---|
| `R`, `G`, `B`, `A` | `rgba` |
| `diffuse.R`, `diffuse.G`, … | `diffuse` |
| `Z`, `depth.*` | `depth` |
| `Crypto*` | kept bit-exact (see below) |

Parts of a multi-part EXR take the part name. A Read only decodes the layers the comp actually uses, so a heavy multi-layer EXR stays fast when you only look at `rgba`.

## Choosing what a node works on

- Colour and filter nodes have the standard Nuke knobs: **channels** (`rgba`, `rgb`, `alpha`, `all`, `none`, or a layer name), **mask**, **invert**, **(un)premult by** and **mix**.
- [Shuffle](/docs/nodes/shuffle) moves channels between layers; [Copy](/docs/nodes/copy) copies channels from another input; [ChannelMerge](/docs/nodes/channelmerge) and [Remove](/docs/nodes/remove) combine or drop layers.
- Layers a node does not touch pass through from its main input (the B input on a Merge).
- The [Write](/docs/nodes/write) node's **channels** knob writes `rgb`, `rgba` or `all` (every layer, as a multi-layer EXR).

## In the Viewer

The layer menu in the Viewer header shows any layer without adding a Shuffle. **Page Up / Page Down** step through the layers; **R, G, B, A, Y, M** show one channel (press again for RGB).

## ID layers

Cryptomatte and object / material ID layers store hashed values in the float bits. Nodes that resample the image pass these layers through untouched, so the IDs stay exact.

## Merge and transforms

- [Merge](/docs/nodes/merge) has **A channels**, **B channels**, **output** and **also merge** knobs, so it can merge any layer, not only `rgba`. The output layer is replaced; the rest come from B.
- [Transform](/docs/nodes/transform), [Crop](/docs/nodes/crop) and [Blur](/docs/nodes/blur) default to **channels: all**, so every layer moves, crops or blurs together. ID layers are moved or cut without blurring, so the IDs stay exact.


---
Sources: opencomp_core/node_graph/imageset.py, opencomp_core/nodes/io/read.py, opencomp_core/nodes/io/layers.py, opencomp_core/nodes/common.py, opencomp_core/nodes/merge/shuffle.py, docs/notes/data-model.md
