Nodes/ComfyUI-TextureAlchemy/PBR Extractor (FrankenMap)
ComfyUI Node

PBR Extractor (FrankenMap)

Pulling three maps out of one RGB

By amtarr·Created 9 months ago·Updated 4 months ago· 58
PBR Extractor (FrankenMap)
  • frankenmap
  • grayscale
  • height
  • roughness
  • original_image
  • pbr_pipe
albedo_gamma1.00
height_gamma1.00
roughness_gamma1.00
albedo_brightness1.00
height_contrast1.00
roughness_brightness1.00
invert_heightfalse
invert_roughnessfalse

Some shader setups don't bother with four separate textures - they cram several grayscale maps into one RGB image and let the shader read them out of individual channels. Those are the "FrankenMaps," and this node is the un-stitcher: it takes one RGB image and splits it into the maps it was built from, with the gamma, contrast, and invert controls you need to make each channel actually usable.

The channel layout is fixed and the naming is what gives the format its name. Red = grayscale/albedo, Green = height, Blue = roughness. It's a specific convention, not a standard - you'll see variations of this "packed grayscale" trick in different engines and shaders - so the first thing to do with any FrankenMap is confirm the channel order. The source even prints the value ranges of each channel to the console on every run, which makes verifying that trivial: if the green channel looks like a height map but your engine says green is something else, now you know.

Each channel gets its own set of shaping controls, which is the real value here:

  • albedo_gamma and albedo_brightness for the grayscale (red)
  • height_gamma, height_contrast, and invert_height for height (green)
  • roughness_gamma, roughness_brightness, and invert_roughness for roughness (blue)

That's thoughtful because height and roughness almost always need sign fixes or a tonal push after extraction. invert_height flips bumps to indents and back; invert_roughness swaps rough/smooth. If your extracted height looks inverted, that one toggle is the fix.

The outputs: grayscale, height, roughness (all as RGB-for-display), plus original_image (a passthrough) and - the interesting one - a pbr_pipe. That pipe is the pack's bundle format, so you can feed this extractor straight into the pack's PBR Saver or Pipeline Adjuster and treat the FrankenMap as a complete material source without wiring individual maps. That's the "extractors feed the pipeline" philosophy of the pack in one output.

When would you actually use this? You've got a shader's packed texture from an old game, or a FrankenMap your own tooling produced, and you want to work on the maps individually - clean up the height, rebalance the roughness, then either save them separately or push the pipe through the pack's processing. If you don't have a FrankenMap and just want to unpack a normal ORM or RMA texture, use the dedicated channel unpackers instead; those are named per-map and don't have a fixed grayscale-in-red assumption.

Install: Manager → search "Texture Alchemy", or:

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

Restart, then Texture Alchemist/Extractors → PBR Extractor (FrankenMap). No dependencies, no models. The usual pack gotchas apply: the README's manual-copy step references the old folder name, and a blocked Git-URL install is the security level, not a broken repo - clone by hand.

CategoryTexture Alchemist/Extractors

Inputs (9)

NameTypeDefaultDescription
frankenmapIMAGE
albedo_gammaFLOAT1.000.1–3Gamma correction for grayscale (from red channel)
height_gammaFLOAT1.000.1–3Gamma correction for height (from green channel)
roughness_gammaFLOAT1.000.1–3Gamma correction for roughness (from blue channel)
albedo_brightnessFLOAT1.000–3Grayscale brightness multiplier
height_contrastFLOAT1.000–3Height contrast multiplier
roughness_brightnessFLOAT1.000–3Roughness brightness multiplier
invert_heightBOOLEANfalseInvert height values (bumps become indents)
invert_roughnessBOOLEANfalseInvert roughness values (rough becomes smooth)

Outputs (5)

NameTypeDescription
grayscaleIMAGE
heightIMAGE
roughnessIMAGE
original_imageIMAGE
pbr_pipePBR_PIPE