Fix Normals IGL Winding (backend)
The winding-number hammer
- trimesh
- fixed_mesh
- info
The trimesh normals fix works by making neighboring faces agree with each other. That's great when the mesh is connected and mostly sane - but it can get confused on a mesh with holes, gaps, or disconnected pieces, where "agree with your neighbors" doesn't give you a clear global answer. This node is the heavy-hitter alternative: the IGL Winding backend of the Fix Normals family, which uses libigl's winding number to decide which side of every triangle is "outside."
Winding numbers are the trick behind it: for a watertight-ish surface, you can compute, at any point in space, how many times the surface winds around that point. Points with a winding number of 1 are inside the shape; 0 is outside. Orient each triangle so its normal points toward the outside, and you've fixed the whole mesh consistently - globally, rather than by local neighbor agreement. That's the real difference from the trimesh variant, and it's why this node is the right tool for meshes that the gentle fix can't sort out.
There's exactly one required input - trimesh - and no optional parameters. It returns fixed_mesh plus an info string.
When to reach for it
Run the trimesh fix first; if normals still look wrong - parts facing inward, the "flipped pocket" look, inconsistencies across disconnected regions - escalate to this one. It's more robust precisely because it doesn't depend on connectivity. The honest caveat: winding numbers are at their most reliable on meshes that are nearly watertight. A mesh with big gaping holes can still trip it up, because the winding-number field gets murky around open boundaries. The professional sequence in this pack is: fill holes → fix normals → if still broken, this node with the mesh as watertight as you can make it.
Install
Part of the pack; install once, get all nodes:
cd ComfyUI/custom_nodes
git clone https://github.com/PozzettiAndrea/ComfyUI-GeometryPack.git
cd ComfyUI-GeometryPack
pip install -r requirements.txt --upgrade
python install.py
Or ComfyUI Manager → GeometryPack. README caveats as usual: experimental comfy-env/pixi install with a big first download (this backend needs the bundled libigl environment), and a fast-moving repo where the author wants reports in Discussions.
The bottom line
This is the node you pull out when the easy fix didn't stick - a second opinion that reasons about the whole surface instead of the local neighborhood. It's not a magic bullet for a mesh that's structurally wrecked, and it won't close holes (that's the Fill Holes family's job). But for the classic "I've fixed normals twice and it's still wrong" problem, the winding-number approach is exactly the escalation you want.
Inputs (1)
| Name | Type | Default | Description |
|---|---|---|---|
| trimesh | TRIMESH | — |
Outputs (2)
| Name | Type | Description |
|---|---|---|
| fixed_mesh | TRIMESH | — |
| info | STRING | — |