Nodes/ComfyUI-TextureAlchemy/Normal Format Validator (OGL vs DX)
ComfyUI Node

Normal Format Validator (OGL vs DX)

Why does this normal map look inverted? Here's your answer

By amtarr·Created 9 months ago·Updated 4 months ago· 58
Normal Format Validator (OGL vs DX)
  • normal_map
  • visualization
  • detected_format

The most frustrating sentence in texture work is "my normal map looks wrong" - because it's usually not the map, it's the format, and you can't tell by staring at it. Normal Format Validator is the diagnostic node built for exactly that moment. You feed it any normal map and it tells you, with confidence scoring, whether it's OpenGL or DirectX - and shows you its work in a four-panel visualization so you can see why it reached that conclusion. It's the pack's answer to "is this map even sane, or did I break it somewhere?"

It lives in TextureAlchemy's Texture Alchemist/Normal group, it's marked as an output node (built to sit at the end of a branch and show results), and it's the natural first stop whenever a normal map misbehaves. The README pitches it as QA and educational tooling, and that's exactly right.

How it works

The detector's core insight is the green channel. OpenGL normals have up-facing surfaces encoded as green above 0.5; DirectX encodes them below 0.5. So the node extracts the green channel and measures how much of the map sits above the 0.5 neutral line versus below it. A strong skew up → OpenGL, strong skew down → DirectX. The bigger the bias, the higher the confidence:

  • High - bias over 20%: no question.
  • Medium - 10–20%: probably right.
  • Low - 5–10%: uncertain.
  • Ambiguous - under 5%: flat map or balanced normals, undecidable.

The visualization output is the four-panel report: the original map, the isolated green channel, a threshold map (white = up-facing, black = down), and a format indicator panel (green = OGL, red = DX). Combined with a detected_format STRING, you get both the verdict and the evidence. It also dumps a detailed analysis to the console with the actual pixel percentages - the kind of output you screenshot for a bug report.

The inputs that matter

  • normal_map - the only input. Feed it a normal map and read the verdict.

Where it fits

The killer workflow: unknown map from the internet or a texture pack → Validator → it says "OpenGL, high confidence" → feed to Normal Format Auto-Converter targeting your engine's format → done. It's also the debugger for "why does my material look inverted" - run the map through this and you'll know within seconds whether format is the culprit or you should be looking elsewhere (red channel flips, strength, or your engine's settings).

Installing it

Ships with ComfyUI-TextureAlchemy. ComfyUI Manager → search "TextureAlchemy" → install → restart, or:

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

Restart, find it under Texture Alchemist → Normal. No extra dependencies, no model downloads - it's a histogram, not a neural net.

Common issues

  • "It says AMBIGUOUS." That's a flat map or one with balanced normals - there genuinely isn't enough signal. The README warns about this too; don't treat it as a bug.
  • "Confidence is low and I need certainty." Low-confidence verdicts are the risky ones. If the map matters, look at the visualization and make the call manually, or test it in your target engine.
  • "The green channel panel looks empty." If your input is grayscale, there's no real green channel to analyze - the node will flag non-RGB input as "UNKNOWN" rather than guess.
  • "It's an output node, where do I hook it?" It's terminal by design - wire normal_map in, read the visualization and string, done. Don't try to route it onward.

It won't fix your map, but it will stop you from fixing the wrong thing. Half of material debugging is eliminating format from the suspect list, and this node does that in one run.

CategoryTexture Alchemist/Normal

Inputs (1)

NameTypeDefaultDescription
normal_mapIMAGE

Outputs (2)

NameTypeDescription
visualizationIMAGE
detected_formatSTRING