Nodes/ComfyUI libigl/Decimate Mesh
ComfyUI Node

Decimate Mesh

Five ways to shrink a mesh's polygon count

By PozzettiAndrea·Created 10 months ago·Updated 4 days ago· 218
Decimate Mesh
  • trimesh
  • decimated_mesh
  • info
backend

A scanned or reconstructed mesh shows up with a million triangles and your slicer or game engine chokes. Decimate Mesh is the pack's answer: one front node, five simplification backends, and a pile of quality knobs so you can trade polygons for detail on your own terms. If you've ever retopo'd by hand you'll appreciate just how much work this saves.

The backends, straight up

  • quadric_edge_collapse (default) - the quality pick. Collapses edges by quadric error, which means the highest-detail regions keep their detail longest. This is the "best quality" the tooltip promises.
  • fast_simplification - the speed pick. Fewer heuristics, much faster, slightly rougher results. For throwaway proxies or tight deadlines.
  • vertex_clustering - the aggressive pick. Voxelizes vertices into clusters and merges each cluster. Great when you want massive reduction and don't care about topology.
  • cgal_edge_collapse - CGAL's take on edge collapse, robust on difficult meshes.
  • decimate_pro - topology-preserving, the cautious option when you can't afford holes or genus changes.

The inputs that matter

Two ways to aim: backend.target_face_count (default 5000) - "give me this many faces" - or backend.target_reduction (0.01–0.99, default 0.5) - "remove this fraction." 0.5 halves, 0.9 nukes down to 10%. Pick one; they fight each other if you set both.

Then the quality guards: quality_threshold (default 0.3, higher = more conservative, better triangles), preserve_boundary and preserve_normal (both default on, both worth leaving on), preserve_topology (default on), planar_quadric (helps keep flat regions flat), aggressiveness (default 7, for the fast backend), cluster_threshold (cell size for vertex clustering), and feature_angle (degrees; edges steeper than this get preserved as features). For a beginner: set the count or reduction, leave the rest alone until a result offends you.

Outputs: decimated_mesh (TRIMESH) and info with the before/after counts.

Installing it

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 → Install, restart. The CGAL backend needs the pack's isolated CGAL environment to have built (pixi/conda-forge, big download on first run), but the default quadric path runs in the main env.

Where people get burned

The classic mistake is asking for too much too fast: a 90% reduction with default quality on a textured mesh turns into a blobby mess, and then you're smoothing it back toward the shape you just deleted. Reduce in steps and inspect with Preview Mesh. And the documented community pain point - saved workflows failing validation with "value not in list" or float-conversion errors - happens most with multi-backend nodes like this one, because old combo values stop matching new schemas. Re-pick the backend in the node and re-save, or update the pack.

Categorygeompack/decimation

Inputs (2)

NameTypeDefaultDescription
trimeshTRIMESH
backendCOMBODecimation algorithm. quadric_edge_collapse=best quality, fast_simplification=fastest, vertex_clustering=aggressive, decimate_pro=topology-preserving

Outputs (2)

NameTypeDescription
decimated_meshTRIMESH
infoSTRING