Mesh Dissolve Degenerate
Cleans up the near-duplicate geometry a remesh step leaves behind
- BPY_OBJ
- BPY_OBJ
Generated or algorithmically-processed meshes - the output of a remesh, a boolean, or (relevant to this pack) a mesh built from a segmented image region - sometimes carry geometry that's technically there but functionally broken: zero-area faces, edges with no real length, vertices sitting almost but not quite on top of each other. Mesh_DissolveDegenerate wraps Blender's bpy.ops.mesh.dissolve_degenerate operator, and it exists specifically to find and remove that.
How it works
Unlike most of this pack's dissolve nodes, this one doesn't need a selection to work with - it scans the whole mesh for geometry within a distance threshold of being degenerate and merges or removes it: near-coincident vertices get merged, faces with essentially zero area disappear, edges with essentially zero length collapse. It's a robustness pass, not a stylistic simplification tool. You run it to keep later operators (subdivisions, booleans, exports) from choking on geometry that's mathematically almost-broken even if it looks fine at a glance.
The inputs and outputs that matter
BPY_OBJ(optional) - the mesh to clean.threshold- how close is "close enough" to count as degenerate, defaulting to a very small value (~0.0001) and capped at50. Leave it near the default for normal cleanup; a threshold pushed up toward the higher end starts merging things that are genuinely distinct, not just numerically noisy, so treat a large value as a much more aggressive simplification, not a bigger safety margin.
Output is a single BPY_OBJ, with degenerate geometry removed.
How to install it
Search Avatar Graph in ComfyUI Manager, or clone manually:
cd ComfyUI/custom_nodes
git clone https://github.com/avatechai/avatar-graph-comfyui
cd avatar-graph-comfyui
python -m pip install -r requirements.txt
then restart. bpy==3.6.0 needs Python 3.10.x - the README's prebuilt Python-3.10 zip on Windows, a dedicated conda environment (conda create --name comfyui python=3.10) on Mac/Linux. opencv-python, mediapipe, and segment-anything also install.
Common issues & troubleshooting
Nothing visibly changes. Expected on a clean, well-formed mesh - this only touches geometry that's already essentially degenerate, so a healthy mesh runs through untouched. It's a safety pass, not a simplification tool; don't expect it to reduce poly count on normal geometry.
A later step (subdivide, boolean, export) is erroring or producing garbage. That's a strong signal to add this node before the failing step rather than after - degenerate geometry tends to cause exactly the kind of downstream failures that are hard to trace back to their real cause, since the offending faces are often too small to notice by eye.
Real geometry got merged away. If you're seeing legitimate small-but-intentional detail disappear, threshold is set too high for the scale of your mesh - bring it back down toward the default and re-run; this operator has no sense of "intentional vs. accidental," it purely compares against the distance you give it.
Inputs (2)
| Name | Type | Default | Description |
|---|---|---|---|
| BPY_OBJopt | BPY_OBJ | — | |
| thresholdopt | FLOAT | 0.009.999999974752427e-7–50 | — |
Outputs (1)
| Name | Type | Description |
|---|---|---|
| BPY_OBJ | BPY_OBJ | — |