Nodes/ComfyUI-Leputen-Utils/DeepBump Normal to Height
ComfyUI Node

DeepBump Normal to Height

Get a height map back from your normals — for parallax and tessellation

By lilquail·Created 9 months ago·Updated 9 months ago· 1
DeepBump Normal to Height
  • image
  • IMAGE
seamlessfalse

Height maps are the awkward member of the PBR family. Everyone bakes them alongside the others and then half the team quietly ignores them - until parallax occlusion mapping or tessellation needs one and the original height field is gone. If all you have is the normal map, DeepBump Normal to Height reconstructs a grayscale height/displacement map from it with the DeepBump AI model.

It's the reverse of the more common color→normal direction, and it's the one node in the DeepBump family that solves a problem you can't really solve by hand. Converting a normal map back to height analytically is under-determined (the Z channel is lost), which is exactly why this is an AI job.

How it works

The node feeds the normal map through DeepBump-dml's normals→height model under ONNX Runtime, again in 256px tiles. Windows users get DirectML GPU acceleration if they've installed onnxruntime-directml; everyone else gets CPU.

The single meaningful input beyond the image:

  • seamless (default off) - enable it for tileable textures so the height map's edges wrap cleanly. If your texture tiles and you leave this off, you'll get visible seams at the borders when it repeats in-engine.

Output is a single grayscale IMAGE - white is high, black is low, same resolution as the input. Wire it to the pack's Height Map Adjust to set black/white points and offset, then to a DDS Saver (BC4_UNORM is the classic height-map format) if it's heading into a game engine.

Inputs and outputs

  • image - the normal map (DirectX or OpenGL, both accepted).
  • seamless - on for tiling textures.

One IMAGE output.

Install

cd ComfyUI/custom_nodes
git clone https://github.com/lilquail/ComfyUI-Leputen-Utils

The pack clones DeepBump-dml into vendor/DeepBump and installs onnxruntime on first startup. For Windows GPU: pip install onnxruntime-directml, then restart. Node is under Leputen-Utils → DeepBump.

Troubleshooting

  • "DeepBump modules not found" - vendor clone failed (git not installed/PATH, or interrupted first run). Manual fix: cd custom_nodes/ComfyUI-Leputen-Utils && git clone https://github.com/lilquail/DeepBump-dml.git vendor/DeepBump.
  • Seams on a tiling texture - you forgot seamless. It's default-off, which is the one footgun this node has.
  • Height values look wrong after save - height maps are usually saved in a specific range; run the result through Height Map Adjust (or check your engine's expected black/white point) before compressing to BC4.
  • Slow on CPU - expected. Confirm the provider log at startup, and on Windows install the DirectML package.

Honest note: reconstructed height is never as good as the original baked height field - the AI is doing its best from a normal map that already discarded information. But for the "I need a displacement map and all I have is this normal" situation, it's far better than the alternative of hand-drawing one.

CategoryLeputen-Utils/DeepBump

Inputs (2)

NameTypeDefaultDescription
imageIMAGEThe input normal map (DirectX or OpenGL format).
seamlessBOOLEANfalseEnable for tileable textures to ensure seamless height map edges.

Outputs (1)

NameTypeDescription
IMAGEIMAGE