Nodes/ComfyUI-TextureAlchemy/Channel Packer (RGB)
ComfyUI Node

Channel Packer (RGB)

The VRAM and draw-call saver

By amtarr·Created 9 months ago·Updated 4 months ago· 58
Channel Packer (RGB)
  • red_channel
  • green_channel
  • blue_channel
  • packed
presetcustom

Every game engine on earth is hungry for fewer textures. Packing three grayscale maps into the R, G, and B channels of a single RGB image is the standard trick - one texture, three maps, less VRAM and fewer draw calls. Channel Packer (RGB) is the node that does the packing, and it's the workhorse of the pack's channel tools.

If you've extracted a roughness, metallic, and AO map with the rest of TextureAlchemy, this is how you turn three files into the one ORM texture your engine actually wants to load. The pack's own README pitches it as exactly that: "save VRAM" is literally one of its bullet points.

How it works

Each input image is converted to a single grayscale channel - if you feed it a full-color image it takes the luminance, if it's already single-channel it passes through - then the three channels are concatenated into one RGB tensor. Sizes get auto-resized to match the first (red) input, so slightly mismatched maps won't blow up the pack.

The preset dropdown is the part worth understanding. Pick orm_unity, orm_unreal, or rma and the node still just packs what you give it, but the preset tells you which map goes in which slot - the tooltips map it out: ORM is AO in R, roughness in G, metallic in B; RMA is roughness in R, metallic in G, AO in B. The custom default leaves the layout entirely up to how you wire the inputs.

The inputs

  • red_channel - required; also sets the output size.
  • green_channel, blue_channel - optional. Here's the gotcha: leave one unconnected and that channel is filled with solid white (ones), not black. If you only wire two maps you get a white third channel, which is usually not what you meant. Wire all three, or use a preset and stay deliberate.

Output: packed - a single RGB IMAGE.

Why you'll actually use it

The realistic flow is: roughness, metallic, and AO out of your extractors → Channel Packer with the orm_unity preset → save one _ORM.png. That's the texture your engine imports. The cost of getting the layout wrong is a material that looks wrong in a way that's genuinely confusing to debug (metallic data sitting in the AO slot just reads as weird shading), so keep the preset and the wiring in agreement. And remember the unpacking side exists too - the pack has unpackers for when you receive a packed texture and need the maps back for editing.

Installation

Ships in amtarr/ComfyUI-TextureAlchemy under Add Node → Texture Alchemist → Channel. Install via ComfyUI Manager (search "TextureAlchemy") or:

cd ComfyUI/custom_nodes
git clone https://github.com/amtarr/ComfyUI-TextureAlchemy

Restart ComfyUI. No dependencies - channel math on the GPU, nothing to download.

CategoryTexture Alchemist/Channel

Inputs (4)

NameTypeDefaultDescription
red_channelIMAGE
green_channeloptIMAGE
blue_channeloptIMAGE
presetoptCOMBOcustomPreset channel layouts: ORM (AO/Roughness/Metallic), RMA (Roughness/Metallic/AO)

Outputs (1)

NameTypeDescription
packedIMAGE