Combine Metallic + Roughness to MR
Metallic + roughness into one MR image
- metallic
- roughness
- mr
Of the four nodes in the ComfyUI-rgbx pack, this is the one that does no diffusion at all - no model load, no VRAM spike, no seed, nothing to wait on. It's a pure tensor utility with one job: take a metallic map and a roughness map and glue them into a single image where red = metallic and green = roughness (blue is zeroed). That packing is the "MR" convention used by Hunyuan 3D 2.1, which is why the author built it: the outputs of RGB2X aren't in the format Hy3DBakeMultiViews expects, so this node is the adapter between the pack's "RGB -> X" decomposition and a 3D bake workflow.
Think of it as a data-format shim. You run RGB2X once for metallic and once for roughness (remember, that node does one channel per run), feed both single-channel results in here, and out comes one image with the channels already packed for whatever Hunyuan-3D-adjacent node you're feeding.
The inputs and output
Just two inputs, both IMAGE tensors:
- metallic - the metallic map (from RGB2X's
metallicAOV, or anywhere else). - roughness - the roughness map.
The node takes the first channel of each if your input happens to be an RGB image (so a grayscale-ish map with three identical channels is fine), then concatenates them into the output, mr, with B=0. That's the entire mechanism - three lines of tensor math.
One rule to respect
The two inputs must be the same resolution. It's a torch.cat along the channel axis under the hood, so if one map is 1024x1024 and the other is 768x768, the node will throw a shape-mismatch error. Both RGB2X outputs are upscaled back to the original photo resolution, so if you extract both from the same source image they'll match automatically. If you're pulling maps from different sources, resize them to a common size first.
Install and gotchas
Same install as the rest of the pack - ComfyUI Manager (search "RGB-X") or git clone https://github.com/leob03/ComfyUI-rgbx.git into custom_nodes/, then restart. The one caveat worth mentioning: this node exists to match Hunyuan 3D 2.1's channel convention, so if you're feeding a consumer that expects R=roughness, G=metallic (some engines flip them, OpenGL-style vs DirectX-style thinking applies to more than just normals), you'll get swapped channels and won't notice until the render looks wrong. When in doubt, check the channel order of whatever you're wiring into, not this node.
That's it. It's the kind of node you install as part of a pack and never think about again - which is exactly what a good utility node should be.
Inputs (2)
| Name | Type | Default | Description |
|---|---|---|---|
| metallic | IMAGE | — | |
| roughness | IMAGE | — |
Outputs (1)
| Name | Type | Description |
|---|---|---|
| mr | IMAGE | — |