Normal Format Converter (DX↔GL)
Flip your normal map's green channel, one click
- normal
- normal
"Which way is up" in a normal map is not a philosophical question - it's the green channel. OpenGL convention points Y up, DirectX points Y down, and every engine you'll ever export to picks one. Get it wrong and your material looks lit from underneath, no matter how good the map is. Normal Format Converter is the two-second fix: it flips the green channel to swap between DirectX and OpenGL, and it's the node you'll reach for every single time a normal map "looks wrong" for no apparent reason.
It's one of the handful of normal-format tools in TextureAlchemy's Texture Alchemist/Normal group - the validator tells you which format you have, and this one converts it.
How it works
The mechanism is exactly one operation: green = 1.0 - green. Because OpenGL and DirectX differ only in the sign of the Y axis, converting either direction is the same mathematical flip - that's why the node's own tooltip says "both flip green channel." The conversion dropdown (DirectX_to_OpenGL, OpenGL_to_DirectX, auto_detect) nominally lets you declare intent, but here's the honest catch from reading the source: the function ignores the dropdown and flips green unconditionally. Both named directions are the same flip, and "auto_detect" is also just a flip. So the dropdown is documentation, not logic.
That means the real workflow discipline is on you: know what you have before you flip. If you don't know, run the pack's Normal Format Validator first. Flip a DirectX map that was already DirectX and you've made it wrong - the node won't catch that for you.
The single output is normal, the converted map, same dimensions and channel count as the input. (If the input has fewer than two channels - a grayscale image masquerading as a normal map - it warns and passes through.)
The inputs that matter
- normal - the map to convert. Must be RGB-ish (≥2 channels) to mean anything.
- conversion - as noted, the default
auto_detectis a bit of a misnomer; it flips like the rest. Pick the named direction for clarity in the graph, but don't expect different behavior.
Where it fits
The canonical flow: extract a normal map (from Lotus, from a height map, from a texture site) → run Normal Format Validator to learn its format → convert here if your engine needs the other one. Unity and Blender want OpenGL; Unreal and Maya want DirectX. If your material previews inverted in one engine and fine in another, it's not your material - it's this exact convention, and this node is the fix.
Installing it
Part of 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 pip packages or model downloads.
Common issues
- "I converted and now it's wrong!" You flipped a map that was already in the format you wanted. This node doesn't detect - despite the dropdown label, it always flips. Validate first.
- "The lighting is inverted on only one axis." Then the problem isn't just the green channel; a flipped red (X) channel is a different bug and this node won't touch it.
- "Grayscale in, weird out." It's not a real normal map, so a flip is meaningless. The node warns and passes through - go generate a real normal map instead.
It's the simplest node in the normal family, and being simple is its job. The trap is assuming "auto_detect" means what it says. It doesn't. Validate, then flip.
Inputs (2)
| Name | Type | Default | Description |
|---|---|---|---|
| normal | IMAGE | — | |
| conversion | COMBO | auto_detect | Conversion direction (both flip green channel) |
Outputs (1)
| Name | Type | Description |
|---|---|---|
| normal | IMAGE | — |