Nodes/ComfyUI-Texture-Simple/Pack PBR Channels
ComfyUI Node

Pack PBR Channels

Pack ORM, RMA, or Unity HDRP channels without leaving ComfyUI

By gokayfem·Created 2 years ago·Updated about a month ago· 58
Pack PBR Channels
  • red_or_ao
  • green_or_roughness
  • blue_or_metalness
  • alpha_or_smoothness
  • packed_rgba
  • manifest
preset
red_fill1.00
green_fill1.00
blue_fill0.00
alpha_fill1.00

Game engines don't want five separate grayscale maps for a material - they want one texture with occlusion, roughness, and metalness squeezed into the red, green, and blue channels. TextureChannelPack ("Pack PBR Channels" in the menu) does exactly that inside your graph: feed it your grayscale maps, pick a preset, and it hands back a single packed RGBA image plus a manifest that says what went where.

It's part of ComfyUI-Texture-Simple, Gökay Aydoğan's offline PBR toolkit - a pack built around the fact that you shouldn't need an external texture tool to get a material into a renderer. The whole thing is CPU NumPy/Pillow; no models, no GPU, nothing to download besides the node itself.

The presets are the point

The preset dropdown encodes the three layouts you'll actually meet:

  • ORM (glTF) - occlusion, roughness, metalness. This is the one to reach for if you're exporting to glTF/GLB or any WebGL viewer.
  • RMA - roughness, metalness, AO. The older, also-common Unity/Unreal arrangement.
  • MSA (Unity HDRP) - metallic, occlusion, detail mask, smoothness. Note the order isn't the same as ORM. HDRP wants its channels arranged differently, and the preset handles that mapping for you.
  • Custom RGBA - free-form; whatever you wire goes in whatever slot you wire it to.

Pick a preset and the manifest output (STRING, JSON) records the exact channel order, so you never have to guess which channel is which three weeks later.

Inputs and how they behave

The four optional image inputs are red_or_ao, green_or_roughness, blue_or_metalness, alpha_or_smoothness. The key behavior: anything you don't connect becomes the matching fill value - red_fill, green_fill, blue_fill, alpha_fill (defaults 1, 1, 0, 1). So a metalness map you haven't made yet just becomes a solid black or white channel instead of breaking the graph. Every connected image gets flattened to luminance and resized to match the largest input, so you can throw differently-sized maps at it and it normalizes them. The packed_rgba output is always a 4-channel image, and it comes with a manifest describing the mapping.

Install

ComfyUI Manager, 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. Node lives under texture/PBR. Only numpy and Pillow are required.

Where people get burned

The trap isn't the node, it's the convention mismatch. A texture packed for ORM (glTF) plugged into a Unity HDRP material will look wrong - roughness where metallic should be, and so on - and it won't obviously error, it'll just render subtly off. That's precisely why the manifest output exists: wire it into a text node, keep it in your workflow, and your future self will thank you. Also remember the fill defaults are white-heavy (1, 1, 0, 1), so an unconnected red_or_ao gives you a pure-white occlusion channel - fine for metallic reads, but if your ORM texture looks like it has no AO, check that you actually connected something to that slot.

Categorytexture/PBR toolkit

Inputs (9)

NameTypeDefaultDescription
presetCOMBO4 options: Custom RGBA, ORM (glTF), RMA, MSA (Unity HDRP)
red_fillFLOAT1.000–1
green_fillFLOAT1.000–1
blue_fillFLOAT0.000–1
alpha_fillFLOAT1.000–1
red_or_aooptIMAGE
green_or_roughnessoptIMAGE
blue_or_metalnessoptIMAGE
alpha_or_smoothnessoptIMAGE

Outputs (2)

NameTypeDescription
packed_rgbaIMAGE
manifestSTRING