PBR Normal Processor (Lotus)
Make Lotus Normals Actually Work in Your Engine
- normal_map
- normal
The best normal map in the world is useless if it's in the wrong handedness - and Lotus normal outputs routinely arrive in a format that your game engine silently inverts, making every bump look like a hole. PBR Normal Processor is the two-toggle fix: it flips the green channel for the DirectX/OpenGL difference and re-normalizes the vectors, so the normals you get from Lotus actually look right wherever you render them.
It sits in the Materials category of amtarr/ComfyUI-TextureAlchemy, and it's the companion to the pack's Lotus-based depth/normal pipeline. In practice it's a normal-format insurance policy: cheap to run, and it saves you an afternoon of "why do my bumps look inverted?" debugging.
How it works
Two independent operations on the input normal map:
- flip_green (default on) - normal maps store the Y axis in the green channel, and OpenGL vs DirectX disagree about which way Y points. Flipping green (
1 - green) converts between them. The pack defaults to on, which lands you in the OpenGL convention most engines and tools use. - normalize (default on) - maps the 0–1 image values into −1…1 vector space, divides each pixel by its length so all normals are unit length, then maps back to 0–1. This cleans up the slight mangling that happens when a normal map is stored as 8-bit or gets resampled.
Input is normal_map (an IMAGE); output is normal, an IMAGE ready to save or feed downstream. Note that Lotus itself is the source - this node processes its output, it doesn't generate normals from scratch.
Where it slots in
The standard chain in this pack: photo → LotusSampler (from kijai's ComfyUI-Lotus, loading lotus-normal-d-v1-0.safetensors) → PBR Normal Processor → combine or save. Because flip_green defaults to on, it's a "just put it in the chain and forget it" node - and it's the thing to blame-check when a normal map looks inverted in your engine: flip_green was off.
Installing it
Two installs, since this node expects Lotus output:
cd ComfyUI/custom_nodes
git clone https://github.com/amtarr/ComfyUI-TextureAlchemy
git clone https://github.com/kijai/ComfyUI-Lotus
restart, load the Lotus normal model, and wire it in. The pack itself adds no pip dependencies; ComfyUI-Lotus is the separate install with its own model files.
Gotchas
The flip_green default being on is the subtle bit - if you feed it a normal map that's already OpenGL-flipped, running this node flips it again. If you're just cleaning up an existing map rather than processing fresh Lotus output, consider setting flip_green off. Also, this node assumes a normal map in the first place: feeding it an arbitrary image just shuffles its channels around, which is a great way to turn a perfectly good texture into noise. And normalize is generally safe to leave on, but if you're feeding an EXR/high-bit-depth normal and the values look flattened after, toggle it and compare.
Inputs (3)
| Name | Type | Default | Description |
|---|---|---|---|
| normal_map | IMAGE | — | |
| flip_green | BOOLEAN | true | Flip green channel (DirectX vs OpenGL) |
| normalize | BOOLEAN | true | Normalize to -1 to 1 range |
Outputs (1)
| Name | Type | Description |
|---|---|---|
| normal | IMAGE | — |