Nodes/ComfyUI libigl/Skeleton Edge Collapse (backend)
ComfyUI Node

Skeleton Edge Collapse (backend)

Extracting a curve skeleton

By PozzettiAndrea·Created 10 months ago·Updated 4 days ago· 218
Skeleton Edge Collapse (backend)
  • trimesh
  • skeleton
fix_meshtrue
normalizefalse
shape_weight1.00
sample_weight0.10

Take a mesh of a humanoid or an animal and collapse its shape down to the centerline, and you get a curve skeleton - the topological spine that tells you "this is a torso, then an arm, then a hand." That's the whole business of this node: Skeleton Edge Collapse (backend) reduces a solid mesh to a thin skeletal curve by collapsing edges inward, which is exactly the kind of analysis you want before rigging, animation, or just understanding the structure of a scanned object. It's one of the backend nodes behind the pack's Extract Skeleton family, exposed directly.

You feed it a TRIMESH and it returns a single SKELETON output - a pack-specific type you can't wire into image nodes, so this is an analysis/measure step rather than a "mesh goes in, mesh comes out" transform.

The four inputs shape how the collapse behaves:

  • fix_mesh (default true) - fix mesh issues before skeletonizing. Leave it on. Skeleton extraction is brutally sensitive to holes and bad winding; letting the node repair first is the difference between a skeleton and a mess.
  • normalize (default false) - rescale the skeleton to the [-1, 1] range. Useful if you're comparing skeletons across differently-sized meshes; harmless if you don't need it.
  • shape_weight - how hard the process works to preserve the original shape. Higher = the skeleton clings closer to the geometry.
  • sample_weight - how much the sampling quality matters. This is your smoothing dial for the resulting skeleton: crank it if the skeleton comes out jagged and noisy.

The name of the game is tuning the balance between shape_weight and sample_weight. That's the classic skeleton-extraction tradeoff: collapse hard enough to get a clean, simple curve, but not so hard that the skeleton stops matching the shape. If your skeleton has spurious little branches poking into features you don't care about, lower sample_weight; if it's losing real limbs, raise shape_weight.

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

ComfyUI Manager: search GeometryPack. README caveats as always: experimental comfy-env/pixi install with a big first download, and a repo under fast development where the author wants bug reports in Discussions.

Where it bites

The prerequisite is a clean mesh. Skeletonization is the one node in this pack where "garbage in, garbage out" is an understatement - holes and noise produce extra branches that look like structure but are really artifacts. Run Fix Normals and fill-holes first. Also, don't expect a skeleton to be a rig: it's the analysis/geometry version, not the bone hierarchy with weights. If you're after automatic rigging, that's a different tool entirely - this node gives you the structural skeleton, which is the honest first step.

Categorygeompack/skeleton

Inputs (5)

NameTypeDefaultDescription
trimeshTRIMESH
fix_meshBOOLEANtrueFix mesh issues before skeletonization
normalizeBOOLEANfalseNormalize skeleton to [-1, 1] range
shape_weightFLOAT1.000–10Shape preservation weight
sample_weightFLOAT0.100–10Sampling quality weight

Outputs (1)

NameTypeDescription
skeletonSKELETON