ComfyUI Node
Normal map check and repack
Check that an image is a tangent normal map in the stated layout, renormalise it, flip green between OpenGL and DirectX, rebuild Z, and report what was found. Raises past the invalid limit.
Normal map check and repack
- image
- mask
- ui_widget
- image
- report
- image_list
◄layoutxyz_rgb►
◄green_inopengl►
◄green_outopengl►
◄z_moderebuild_z►
◄max_invalid_share0.010►
Category✨ LF Nodes/Texture
Inputs (8)
| Name | Type | Default | Description |
|---|---|---|---|
| image | IMAGE | Tangent-space normal map(s), stored values (not colour-managed). | |
| layout | COMBO | xyz_rgb | xyz_rgb: X red, Y green, Z blue. xy_ag: X alpha, Y green, no Z (swizzled two-channel maps). |
| green_in | COMBO | opengl | The map's green convention: opengl (Y up the image) or directx (Y down). |
| green_out | COMBO | opengl | The convention to write; green is flipped when it differs from green_in. |
| z_mode | COMBO | rebuild_z | rebuild_z: keep X,Y and rebuild Z on the forward hemisphere. normalize_xyz: scale the stored vector to unit length, keeping Z's sign. |
| max_invalid_share | FLOAT | 0.0100–1 | Largest share of checked pixels that may be invalid; above it the node raises. |
| maskopt | MASK | Pixels to validate (above 0.5), such as UV coverage. Defaults to all; every pixel is repacked. | |
| ui_widgetopt | LF_COMPARE | [object Object] | — |
Outputs (3)
| Name | Type | Description |
|---|---|---|
| image | IMAGE | Repacked normal map batch: unit vectors as RGB in green_out's convention (alpha kept for xyz_rgb). |
| report | JSON | lf.normal-map-repack.v1: shares of invalid, out-of-disc, facing-away, vanishing and renormalised pixels. |
| image_list | IMAGE | The same normal maps as an authoritative list. |