Extract Texture Channel
Pull one channel out of a packed texture — and get a mask for free
- packed_texture
- channel_image
- channel_mask
So you packed an ORM texture - occlusion in red, roughness in green, metalness in blue - and now you want the roughness map back as its own image. Or you loaded someone's packed texture and need to see what's actually hiding in the alpha. TextureChannelExtract is the un-pack: it pulls one channel out of any RGBA image and hands it to you twice, as both an image and a mask.
It ships in ComfyUI-Texture-Simple, Gökay Aydoğan's offline PBR toolkit, and it's the natural inverse of its sibling TextureChannelPack - pack channels in, extract them out, no external image editor required. All of it runs on CPU with just NumPy under the hood.
How it works
Pick a channel from the dropdown and the node reads that plane out of your image: red, green, blue, or alpha by index, or luminance for the standard weighted grayscale (0.2126 red + 0.7152 green + 0.0722 blue). The same data comes out of both ports:
- channel_image - an IMAGE (RGB, so it previews normally and wires into any image input)
- channel_mask - a MASK, same values, ready for anything that expects a mask
That second port is the sleeper feature. A roughness map is a mask numerically - it's just grayscale data - so you can feed it straight into masking nodes, inpainting, or a ControlNet-style conditioning input without a conversion node in between.
The one gotcha
If you ask for alpha on a three-channel image, there is no alpha, so the node returns a constant white plane rather than erroring out. The README hints at max and average options too, but the shipped node exposes exactly five channels: red, green, blue, alpha, luminance. Don't go hunting for a channel that isn't in the dropdown - if it's not listed, it's not there.
Install
ComfyUI Manager (search "ComfyUI Texture Simple"), or:
cd ComfyUI/custom_nodes
git clone https://github.com/gokayfem/ComfyUI-Texture-Simple.git
python -m pip install -r ComfyUI-Texture-Simple/requirements.txt
Restart ComfyUI; find the node under texture/PBR. Dependencies are only numpy and Pillow, no models, no network.
When you'd actually use it
Debugging is the big one. If a packed texture looks wrong in a viewer, extract each channel and look at them individually - nine times out of ten you'll spot that the metalness and roughness got swapped, or that someone packed AO where roughness should be. It's also handy for re-arranging: extract the roughness, run it through an adjustment, and re-pack with a different layout. Two nodes, and you've got a full channel-editing round trip that stays inside the graph.
Inputs (2)
| Name | Type | Default | Description |
|---|---|---|---|
| packed_texture | IMAGE | — | |
| channel | COMBO | 5 options: red, green, blue, alpha, luminance |
Outputs (2)
| Name | Type | Description |
|---|---|---|
| channel_image | IMAGE | — |
| channel_mask | MASK | — |