Channel Packer (RMAA)
Packing RMA plus alpha without losing your mind
- roughness
- metallic
- ao
- alpha
- rmaa_packed
Channel packing is one of those game-dev habits that feels weird the first time you see it and indispensable after. Instead of shipping roughness, metallic, and ambient occlusion as three separate PNGs, you jam them into the R, G, and B channels of one image. The texture stays RGB, the engine reads each channel as its own map, and you've saved two texture slots and a chunk of VRAM. This node is the RMA variant with a bonus: an alpha channel, so you get four maps in one RGBA file.
The name spells out the layout. R is roughness, M is metallic, A is ambient occlusion, and the second A is alpha - the transparency or mask you need for foliage, fences, decals, anything with cutout. That's the whole trick, and it's why this one exists alongside the plain RMA packer: if your material needs a mask, this is the version you reach for.
Mechanically it's dead simple under the hood. Each input map is reduced to a single channel (if you feed it an RGB image it converts using Rec. 709 luminance weights, so a colored albedo won't silently corrupt your roughness), then all four are stacked into one [B, H, W, 4] tensor. If your maps don't match resolution, it resizes the smaller ones to fit the roughness map with bilinear interpolation, which is a nice touch - you can dump a 2048 roughness next to a 1024 AO and it just works. Leave alpha disconnected and it writes a fully opaque alpha channel, so the output is still a valid RGBA image you can save or preview anywhere.
The inputs that matter:
roughness,metallic,ao- required, any grayscale or RGB mapalpha- optional; wire in a mask map (white = visible) or skip it
The one output is rmaa_packed. Feed it straight to a Save Image node, or into the unpacker side of the pack when you need the maps back.
Watch the channel order, because this is where people get burned. Unity-style ORM puts AO in red and roughness in green; RMA (this node) puts roughness in red and AO in blue. If your engine's docs say "RMA" you're golden - that's exactly this layout. If they say ORM, you want the pack's ORMA packer instead. Getting it backwards gives you a material that's shiny where it should be dusty and dusty where it should be shiny, and it's baffling to debug if you don't remember which node you used.
Installing it is the whole pack, which lives in the Texture Alchemist category in ComfyUI's node library. Easiest: ComfyUI Manager → search "Texture Alchemy" → install. Or by hand:
cd ComfyUI/custom_nodes
git clone https://github.com/amtarr/ComfyUI-TextureAlchemy
Restart ComfyUI, then right-click → Add Node → Texture Alchemist/Channel. There's no requirements.txt and no model download - it's plain PyTorch/PIL, so the pack installs cleanly even on a fresh ComfyUI. One gotcha: the README still tells you to copy a folder named ComfyUI_PBR_MaterialProcessor (the pack's old name); ignore that, the repo clones as ComfyUI-TextureAlchemy. If Manager refuses a Git-URL install, that's ComfyUI's security level blocking remote downloads - clone manually instead of lowering security.
Inputs (4)
| Name | Type | Default | Description |
|---|---|---|---|
| roughness | IMAGE | — | |
| metallic | IMAGE | — | |
| ao | IMAGE | — | |
| alphaopt | IMAGE | — |
Outputs (1)
| Name | Type | Description |
|---|---|---|
| rmaa_packed | IMAGE | — |