Nodes/ComfyUI-TextureAlchemy/PBR Height Processor (Lotus)
ComfyUI Node

PBR Height Processor (Lotus)

Cleaning Up Lotus Depth Output Into a Usable Height Map

By amtarr·Created 9 months ago·Updated 4 months ago· 58
PBR Height Processor (Lotus)
  • depth_map
  • height
invertfalse
normalizetrue

Depth models are great at producing depth, and terrible at producing depth you can actually use. Raw depth output comes out in whatever range the model felt like, possibly inverted, possibly still carrying color noise from a preprocessing step. PBR Height Processor is the small cleanup node that turns raw depth output - the "Lotus" in the name is a nod to kijai's Lotus depth/normal model, but any depth map works - into a proper height map for a PBR pipeline.

It does exactly three things, and that's the whole appeal: converts to grayscale, normalizes the range to 0-1, and lets you flip it. No cleverness, no surprises, three toggles.

How it works

  • Normalize (default on) remaps the map so the darkest pixel is 0 and the brightest is 1. Without this, a depth map that happens to sit in a narrow range like 0.4-0.7 will look flat and will displace weakly in a renderer. This is the step that makes your height map actually read as height.
  • Invert (default off) flips it with 1 − value. Depth and height are not the same sign convention everywhere - one model's "white is close" is another's "white is high." When your displacement bumps look like craters instead of mounds, this is the toggle that fixes it.
  • Grayscale conversion happens automatically (Rec. 709-style luminance weights) so a colored depth output can't sneak channel artifacts into your displacement.

The output height is a clean 3-channel grayscale image, ready for the height slot of a PBR Combiner, a displacement node, or a saver.

Where it sits

The README's pipeline puts it right after Lotus: Lotus depth → PBRHeightProcessor → height → PBR Combiner. That's the canonical flow. Because it takes a plain IMAGE input, you can also run it on any depth map from any source - MiDaS, Depth Anything, a photo of a grayscale heightmap, whatever - which is a nice escape hatch when you don't have Lotus installed. (Lotus itself is a separate kijai pack with its own model downloads; this node only needs the output image, so it carries no model weight of its own.)

Installing it

It ships in TextureAlchemy:

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

or via ComfyUI Manager (search "TextureAlchemy"), then restart. You'll find it under Texture Alchemist → Materials. No extra dependencies.

Gotchas

The one real trap: normalize on by default means every depth map gets stretched to full range, which is usually what you want but will amplify noise in flat regions - noisy depth becomes noisy height. If your displacement looks sandpaper-y, consider running a blur before this node or feeding it a cleaner depth pass. And remember the invert toggle exists; roughly half the "why is my displacement inverted" questions on Earth are answered by flipping it.

CategoryTexture Alchemist/Materials

Inputs (3)

NameTypeDefaultDescription
depth_mapIMAGE
invertBOOLEANfalseInvert height values
normalizeBOOLEANtrueRemap to 0-1 range

Outputs (1)

NameTypeDescription
heightIMAGE