Nodes/ComfyUI libigl/Sharpen Libigl Unsharp (backend)
ComfyUI Node

Sharpen Libigl Unsharp (backend)

Unsharp masking, except the image is a mesh

By PozzettiAndrea·Created 10 months ago·Updated 4 days ago· 218
Sharpen Libigl Unsharp (backend)
  • trimesh
  • sharpened_mesh
  • info
weight0.50
iterations3

You know unsharp masking from photo editing: blur a copy of the image, subtract it from the original, and the difference - the detail - gets amplified. Sharpen Libigl Unsharp ports exactly that idea to a 3D mesh, with the math replaced by a cotangent-weighted Laplacian so the operation respects the actual geometry of your triangles instead of a rectangular grid of pixels.

If that description made sense to you, you already know how to use this node. It's the gentlest, most familiar-feeling member of the GeometryPack sharpen family, and for a beginner it's probably the easiest one to tune without understanding a single equation.

How it works

Three steps, conceptually: the node smooths a copy of your mesh (iterations controls how smooth that reference becomes), computes the difference between your original and the reference, then adds that difference back to the original scaled by weight. The smooth-and-subtract trick means the low-frequency shape stays put while high-frequency detail - edges, creases, surface texture - gets boosted. Cotangent weighting is what makes it "geometry-aware": each vertex's neighborhood is weighted by the angles of its incident triangles, so irregular triangulations don't bias the result.

The two inputs map to two intuitions:

  • weight (default 0.5, 0.01–5) - how much detail to add back. 0.5 is a subtle lift; 1.0 doubles the detail; 2.0+ is aggressive and will start to look crunchy. Start low and creep up.
  • iterations (default 3, 1–50) - how many smoothing passes build the reference mesh. More iterations = a smoother reference = the difference is measured against a flatter baseline = broader features get sharpened. Fewer iterations keep the reference close to the original, so only fine detail pops.

Inputs and outputs

Just trimesh plus those two knobs. Outputs are sharpened_mesh (TRIMESH) - wire it to a viewer or save node - and info (STRING) with backend diagnostics.

Where it fits

This is the backend you pick when you don't know which backend to pick. two_step is better for true CAD creases, l0_minimize for flattening, but Libigl Unsharp is the middle path: it sharpens without inventing flat regions, and it won't punish organic geometry the way L0 will. The only trap is over-sharpening - if your edges get halo-like ridges or ringing, back weight down before you touch anything else.

Same install as the rest of the pack: ComfyUI Manager search "GeometryPack", or the manual clone into custom_nodes/ plus pip install -r requirements.txt --upgrade and python install.py. The experimental comfy-env/pixi installer handles dependencies; it's slow on first run, so be patient. The pack is GPL-3.0-or-later and WIP by the author's own admission, so expect the occasional sharp edge in the code too.

Categorygeompack/smoothing

Inputs (3)

NameTypeDefaultDescription
trimeshTRIMESH
weightFLOAT0.500.01–5How much detail to add back. 0.5 = subtle sharpening, 1.0 = double the detail, 2.0+ = aggressive.
iterationsINT31–50Smoothing iterations for the reference mesh. More iterations = smoother reference = sharpens broader features. Fewer iterations = sharpens fine detail.

Outputs (2)

NameTypeDescription
sharpened_meshTRIMESH
infoSTRING