Nodes/ComfyUI libigl/Skeleton Teasar (backend)
ComfyUI Node

Skeleton Teasar (backend)

The skeleton algorithm that loves trees and veins

By PozzettiAndrea·Created 10 months ago·Updated 4 days ago· 218
Skeleton Teasar (backend)
  • trimesh
  • skeleton
fix_meshtrue
normalizefalse
inv_dist10.00
min_length0.00

If you've ever needed a skeleton of a tree, a root system, a blood vessel, or a pipe network, you've met the problem that TEASAR exists to solve. TEASAR - Tree-structure Extraction Algorithm for Skeletonization from Accumulated Radii - is the workhorse of curve-skeleton extraction for tubular, branching geometry, and Skeleton Teasar is the GeometryPack backend that wraps it. It's the node you reach for when the thing you're skeletonizing is basically a collection of tubes.

It's a backend under Extract Skeleton (pick teasar in the dropdown) or searchable directly as "Skeleton Teasar (backend)".

How it works

The idea behind TEASAR is elegant and worth understanding because it explains the dials. The algorithm estimates a "radius" at every point inside the mesh (distance to the nearest surface - that's the accumulated radii part), then grows the skeleton from a root along the widest paths first, like tracing the main trunk before the twigs. After each traced branch, it invalidates a region around it so the next pass finds the next structurally distinct branch rather than re-tracing the same centerline. That invalidation radius is your primary knob.

  • fix_mesh (default true) - repair the mesh before skeletonizing. Leave on.
  • normalize (default false) - rescale the output to [-1, 1]. Useful for comparisons across models.
  • inv_dist (default 10, 1–100) - the invalidation distance. This is the detail dial: lower = tighter invalidation = more fine branches recovered; higher = more aggressive pruning = a cleaner, simpler skeleton. For a leafy tree you'll want this low; for a structural overview, higher.
  • min_length (default 0, 0–100) - the minimum branch length to keep. Twigs shorter than this get dropped. Raise it to kill off spurious micro-branches that TEASAR loves to produce on noisy geometry.

Outputs

One output: skeleton (SKELETON type), which feeds the pack's skeleton preview/viewer nodes. It's not a mesh, so don't try to wire it into mesh-processing nodes.

When to use it

Teasar is the strongest of the three skeleton backends for genuinely tubular branching structure - plants, vasculature, cables, trees - and it comes straight from the trimesh library, so it's battle-tested in the Python geometry world. For general organic shapes, wavefront is a better all-rounder; for rough-and-fast results on noisy data, vertex_clusters. The classic complaint with TEASAR is branch soup on noisy scans, and that's exactly what min_length and a slightly higher inv_dist are for.

Install is pack-standard: ComfyUI Manager search "GeometryPack", or git clone https://github.com/PozzettiAndrea/ComfyUI-GeometryPack into custom_nodes/ plus pip install -r requirements.txt --upgrade and python install.py, then restart. First run with the experimental comfy-env/pixi installer is slow; the author is actively hunting bugs, so report weirdness on GitHub.

Categorygeompack/skeleton

Inputs (5)

NameTypeDefaultDescription
trimeshTRIMESH
fix_meshBOOLEANtrueFix mesh issues before skeletonization
normalizeBOOLEANfalseNormalize skeleton to [-1, 1] range
inv_distFLOAT10.001–100Invalidation distance (lower = more detail)
min_lengthFLOAT0.000–100Minimum branch length to keep

Outputs (1)

NameTypeDescription
skeletonSKELETON