Skeleton Vertex Clusters (backend)
The fast-and-rough route to a medial axis
- trimesh
- skeleton
Extracting a curve skeleton doesn't have to be clever. Skeleton Vertex Clusters takes the simplest possible route: group the mesh's vertices into clusters by proximity, then connect the cluster centers into a line. That's the whole trick. It's fast, it's forgiving of noisy meshes, and it gives you a coarse skeleton you can actually use - just don't expect surgical fidelity.
It's a backend under Extract Skeleton (select vertex_clusters in the dropdown) or searchable directly as "Skeleton Vertex Clusters (backend)".
How it works
The algorithm clusters vertices whose distance falls within a threshold, treating each cluster as a node along the skeleton. Because it's purely distance-based, it doesn't care much about triangulation quality - hence the noise tolerance. The cluster centers (by default, the median of the cluster) become the skeleton's vertices, and connecting neighbors traces the shape's rough centerline. Where the mesh splits into branches, the clustering naturally splits too, giving you a branching skeleton.
The controls are minimal:
fix_mesh(default true) - repair the input before skeletonizing. Keep it on for anything that isn't pristine.normalize(default false) - rescale the output skeleton into [-1, 1]. Handy for comparing skeletons across differently-sized models.sampling_dist(default 1, 0.1–50) - the maximum distance for clustering. This is the resolution dial: smaller values give finer, more detailed skeletons; larger values merge more into thicker, coarser branches.cluster_pos(default "median") - how each cluster's position is computed. Median is robust against outliers; the other options trade that for different behavior. If you don't have a reason, leave it.
Outputs
One output: skeleton (SKELETON type). It plugs into the pack's skeleton preview nodes and whatever downstream rigging/analysis you're doing - it's not a TRIMESH, so mesh nodes won't take it.
When to use it
Vertex clustering is the skeleton backend to grab when your data is rough and you need an answer fast: a noisy scan, a decimated model, a quick structural overview. If you need a precise medial axis for something important, the teasar backend is more faithful on clean, tubular shapes, and wavefront handles general organic geometry better. This one is the "good enough, right now" pick - which is a legitimate engineering choice, not a cop-out.
Same install as the rest of the pack: ComfyUI Manager search "GeometryPack", or clone into custom_nodes/ and run pip install -r requirements.txt --upgrade + python install.py, then restart. Watch the first-run download from the experimental comfy-env/pixi installer - slow is normal.
Inputs (5)
| Name | Type | Default | Description |
|---|---|---|---|
| trimesh | TRIMESH | — | |
| fix_mesh | BOOLEAN | true | Fix mesh issues before skeletonization |
| normalize | BOOLEAN | false | Normalize skeleton to [-1, 1] range |
| sampling_dist | FLOAT | 1.000.1–50 | Max distance for clustering |
| cluster_pos | COMBO | median | Cluster position method |
Outputs (1)
| Name | Type | Description |
|---|---|---|
| skeleton | SKELETON | — |