Detail Map
Channel-packing for PBR — Detail Map packs albedo, normal, and smoothness into one texture
- albedo
- normal
- smoothness
- detail_map
If you've ever exported a PBR material set and then spent an hour in a game engine's texture importer hand-mapping channels, you know why this node exists. Detail Map takes three of your material maps - albedo, normal, and smoothness - and packs them into a single RGBA texture following Unity's standard detail-map channel layout. One output texture instead of three loose maps, ready to drop into a material graph.
This is a niche node, and I'll say it plainly: it's only useful if you're doing PBR material work in ComfyUI - generating textures for game assets, product renders, that kind of thing. For plain image generation you'll never touch it. But if you're in the texture-pipeline crowd, the channel packing is the whole game, and this node does the fiddly part for you.
The mechanism is visible in the source and it's exact. For each frame it:
- Desaturates the albedo to grayscale and puts it in the R channel.
- Takes the G channel of the normal map and puts it in the G channel.
- Takes the R channel of the smoothness map and puts it in the B channel.
- Takes the R channel of the normal map and puts it in the A channel.
That RGBA merge is Image.merge("RGBA", ...) at the end - no guessing, no magic. If you've seen a Unity detail map before, the layout will look familiar: detail maps traditionally carry surface variation data packed into channels, and this node's mapping is the standard one.
The inputs are all images, and all three are required:
- albedo - the base color map; only its luminance is used.
- normal - the normal map; its R and G channels go into the output.
- smoothness - the smoothness map; its R channel feeds the output's blue.
The single output:
- detail_map - the packed RGBA texture, ready for export or further processing.
Where it sits in the wider ecosystem: the FairLab pack ships a small PBR-oriented cluster alongside this - Mask Map packs metallic/occlusion/detail/smoothness into a mask map, and Roughness To Smoothness inverts roughness - so if you're building material workflows, they're clearly designed to be used together. Think of Detail Map as the texture-pipeline counterpart to the pack's more general image tools.
Honest caveats from the source: all three inputs must share the same dimensions, because they're merged pixel-for-pixel - feed mismatched maps and you'll get an error or a garbage result. And the pack leans on PIL for all its image math, so there are no GPU requirements and no model files here; it's pure pixel shuffling.
Install is the standard FairLab path: ComfyUI Manager → search ComfyUI-FairLab → install → restart:
cd ComfyUI/custom_nodes
git clone https://github.com/yanhuifair/ComfyUI-FairLab.git
cd ComfyUI-FairLab
pip install -r requirements.txt
Restart and search "Detail Map" or "unity detail map". No extra downloads - the pack's dependencies are already covered by the install, and this node itself is pure Pillow.
Inputs (3)
| Name | Type | Default | Description |
|---|---|---|---|
| albedo | IMAGE | — | |
| normal | IMAGE | — | |
| smoothness | IMAGE | — |
Outputs (1)
| Name | Type | Description |
|---|---|---|
| detail_map | IMAGE | — |