Nodes/ComfyUI libigl/Sharpen Fast Effective (backend)
ComfyUI Node

Sharpen Fast Effective (backend)

Sharpen Fast Effective — the cheap, fast way to crisp up a blobby mesh

By PozzettiAndrea·Created 10 months ago·Updated 4 days ago· 218
Sharpen Fast Effective (backend)
  • trimesh
  • sharpened_mesh
  • info
threshold_T0.50
normal_iterations20
vertex_iterations50

If your mesh looks like it got left in the sun - corners rounded, edges melted, everything slightly bloated - sharpening is the fix, and this is the fast, unpretentious option in GeometryPack's sharpen family. "Fast Effective" does thresholded cosine-weight normal filtering: it flattens the near-flat regions, keeps the genuinely sharp edges, and repositions vertices to match. It's the sharpen you reach for when you want a crisp result without babysitting a pile of parameters.

It's the fast_effective backend of the Sharpen Mesh dispatcher node, dev-only in the schema like the other backends - pick it from the dropdown.

How it works

The algorithm comes from Sun et al.'s "An Efficient 3D Mesh Sharpening Method" (IEEE TVCG 2007). The core idea: for each face, look at its neighbors and average only the normals that are similar enough to its own. "Similar enough" is decided by a cosine threshold threshold_T: neighbors whose normal dot product is above T contribute to the average with weight (dot − T)², and neighbors below T contribute nothing. Run that over normal_iterations passes and the flat regions relax toward one shared normal while the sharp edges stay sharp because dissimilar normals never got averaged in. Then vertex_iterations of position updates move the actual vertices to match the filtered normals. It's a genuinely cheap algorithm - hence the name - and it doesn't need a sparse solver or an external backend beyond numpy.

Inputs and outputs

  • trimesh (TRIMESH) - the mesh to sharpen.
  • threshold_T (default 0.5) - the cosine similarity threshold. This is the one to tune. Lower T (toward 0) averages more normals together → smoother, more aggressive. Higher T (toward 1) only averages very similar normals → sharper edges preserved, subtler effect. 0.5 is a genuinely good default; think of it as "how strict am I about what counts as the same surface."
  • normal_iterations (default 20) - passes of normal filtering. More = flatter flat regions, crisper separation.
  • vertex_iterations (default 50) - passes of vertex-position updates to match the filtered normals. Boundary vertices stay fixed, so your mesh outline doesn't crawl.

Outputs: sharpened_mesh (TRIMESH) and info (STRING) with counts.

Installing

ComfyUI Manager → GeometryPack, 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. This backend runs in the pack's base environment - no Blender, no CGAL, no GPU env. One of the lighter nodes in the pack to get running.

Troubleshooting

  • Effect too subtle - raise normal_iterations, or lower threshold_T so more neighbors get averaged.
  • Edges getting blurry - threshold_T too low; you're averaging across the crease. Raise it toward 0.6–0.7.
  • Slow on big meshes - 50 vertex iterations adds up on hundreds of thousands of vertices. Drop vertex_iterations to ~20 first; it's usually the cheaper knob.
  • Input already looks fine - sharpening can't add detail that isn't there; it only crisps what exists. If the mesh is genuinely blobby from bad reconstruction, remesh rather than sharpen.
  • Stale-workflow validation errors are the pack-wide gotcha - if the Sharpen Mesh dispatcher throws on a saved graph, delete and re-add it, re-pick fast_effective.

The honest take: in the sharpen family, "fast_effective" is the everyday choice, "two_step" is the one to reach for when you need CAD-grade edge quality, and the L0 options are when you're willing to pay for aggressive flattening. Start here.

Categorygeompack/smoothing

Inputs (4)

NameTypeDefaultDescription
trimeshTRIMESH
threshold_TFLOAT0.501e-10–1Cosine similarity threshold (Sun et al. TVCG 2007). Normals with dot(ni,nj) > T contribute with weight (dot-T)^2; below T they contribute nothing. Lower = more normals averaged (smoother), higher = only very similar normals averaged (sharper). 0.5 is a good default.
normal_iterationsINT201–500Iterations for normal filtering. More iterations produce stronger flattening of near-flat regions.
vertex_iterationsINT501–500Iterations for vertex position update from filtered normals. Boundary vertices are kept fixed.

Outputs (2)

NameTypeDescription
sharpened_meshTRIMESH
infoSTRING