Nodes/ComfyUI libigl/Decimate Vertex Clustering (backend)
ComfyUI Node

Decimate Vertex Clustering (backend)

The brutal decimation option — and the one that survives broken meshes

By PozzettiAndrea·Created 10 months ago·Updated 4 days ago· 218
Decimate Vertex Clustering (backend)
  • trimesh
  • decimated_mesh
  • info
cluster_threshold1.0

The third backend in GeometryPack's Decimate Mesh family is the sledgehammer. Where edge-collapse decimation carefully removes one edge at a time, vertex clustering drops a grid over your mesh and collapses every vertex inside each grid cell to a single point. The result is brutal but fast, and - the reason you'd actually choose it - it works even on meshes that are so broken that edge-collapse methods refuse to run.

That robustness is the real story here. Edge-collapse decimators assume a fairly sane mesh: manifold, no cracks, no wild degeneracy. A scan with holes, duplicate faces, or self-intersections will make CGAL's solver throw a fit or just stop. Vertex clustering doesn't care about any of that - it's a pure spatial operation on vertex positions. If you need to get a nasty, broken mesh down to something workable before you even attempt repair, this is the node that gets you there.

The one dial that matters

  • cluster_threshold - the size of the clustering cell, expressed as a percentage of the mesh's bounding-box diagonal (default 1.0, range 0.1–10). Bigger threshold = bigger cells = more aggressive reduction. Small values barely change anything; values around 1–2% give a strong cut on most models.

Outputs: decimated_mesh (the TRIMESH result) and info (a STRING with the stats). Standard TRIMESH in, same as the rest of the pack.

Installing it

One pack install covers every node here:

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

Restart ComfyUI. ComfyUI Manager also works (search "GeometryPack" or install via Git URL with https://github.com/PozzettiAndrea/ComfyUI-GeometryPack.git). The one-click installer is experimental and pulls in pixi via comfy-env; the README's manual route is the reliable one.

Where people get burned

Vertex clustering destroys detail in a way that's easy to underestimate. Because whole clusters of vertices collapse to one point, fine features - rivets, engraved text, organic curvature - just vanish, and the output can get a blocky, faceted look even at modest thresholds. Two tips: start with the smallest threshold that gets your triangle count into range, and treat the output as a coarse proxy, not a finished model. For quality-first work on clean meshes, use CGAL Edge Collapse instead; for a fast fraction cut, Fast Simplification. And don't skip the info string - it'll tell you the actual output count, which is the number you care about when a threshold feels like a guessing game. It's a young, fast-moving pack, so if the node errors on load, update it or re-run install.py before debugging your workflow.

Categorygeompack/decimation

Inputs (2)

NameTypeDefaultDescription
trimeshTRIMESH
cluster_thresholdFLOAT1.00.1–10Clustering cell size as percentage of bounding box diagonal. Larger = more aggressive reduction.

Outputs (2)

NameTypeDescription
decimated_meshTRIMESH
infoSTRING