Nodes/ComfyUI libigl/Mesh Quality
ComfyUI Node

Mesh Quality

A numeric quality score you can actually wire into logic

By PozzettiAndrea·Created 10 months ago·Updated 4 days ago· 218
Mesh Quality
  • trimesh
  • min_quality
  • mean_quality
  • info
include_face_qualitytrue
include_edge_statstrue

Most "quality" checks in this space just show you a report and leave the judgment to you. Mesh Quality does that too, but it also hands back two actual numbers - min_quality and mean_quality - that you can feed into a compare node or a switch and make the graph decide. "If this mesh's mean face quality is below 0.5, route it to the remesh branch" is a real workflow, and this is the node that gives it its input.

It's part of ComfyUI-GeometryPack ("ComfyUI libigl") by Andrea Pozzetti. The metric it computes is face quality by aspect ratio: how far each triangle is from equilateral, on a 0–1 scale. A perfect triangle scores 1.0; long skinny slivers - the classic enemies of remeshing, UV unwrapping, and simulation - score near zero.

How it works

The node walks the mesh's faces and computes an aspect-ratio-based quality for each, then rolls those up. You get a report with min/max/mean/median, a count of "poor" faces (quality under 0.3) and "good" faces (0.6 and up), plus topology basics (watertight, winding, vertex/face/edge counts) and edge-length statistics if enabled. The info string is the full story; the two float outputs are the headline numbers.

The floats are the part other nodes can't give you. min_quality is your worst-case worst face - a tiny sliver dragging it toward zero means the mesh has problem geometry somewhere. mean_quality is the general health of the mesh. Neither is a pure gate; on real-world scans you'll see low means from organic shapes that are perfectly fine for some purposes. Use the numbers as tripwires, not verdicts.

Inputs and outputs

  • trimesh - the mesh to score.
  • include_face_quality - default true; turn off to skip the per-face pass (it's the expensive part on big meshes).
  • include_edge_stats - default true; toggles the edge-length min/max/mean section of the report.

Outputs:

  • min_quality - FLOAT, the worst face quality.
  • mean_quality - FLOAT, the average across all faces.
  • info - STRING, the full report including poor/good face percentages and topology.

Where you'd actually use it

  • Gate a repair or remesh branch - score, compare, route. Decimation on a mesh that's already full of slivers just makes them worse; catch it first.
  • Post-remesh validation - remesh, then re-score. A jump in mean_quality is the objective "this is better now" that screenshots can't prove.
  • Batch triage - run it across the list from Load Mesh Batch and use mean_quality to pick which of forty meshes need attention.

Install and the usual friction

Pack standard: search "GeometryPack" in ComfyUI Manager, or:

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 after. The pack installs through the experimental comfy-env package (which pulls in pixi and a heavy isolated environment - Blender, CGAL, libigl, VTK), so first launch is slow and dependency weight is real.

Two things to keep in mind. First, on a point cloud (no faces) the face-quality numbers are meaningless - the node needs actual triangles. Second, aspect-ratio quality says nothing about where bad faces are; for that, follow up with Open Edges or Preview Mesh (Analysis) to see problem areas. The pack is WIP with fast releases, so if the metric math changes between versions, that's the author iterating - the numbers are still comparable within one version.

Categorygeompack/analysis

Inputs (3)

NameTypeDefaultDescription
trimeshTRIMESH
include_face_qualityoptBOOLEANtrue
include_edge_statsoptBOOLEANtrue

Outputs (3)

NameTypeDescription
min_qualityFLOAT
mean_qualityFLOAT
infoSTRING