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

Sharpen Unsharp Mask (backend)

Sharpen a mesh the way you sharpen an image

By PozzettiAndrea·Created 10 months ago·Updated 4 days ago· 218
Sharpen Unsharp Mask (backend)
  • trimesh
  • sharpened_mesh
  • info
weight0.30
iterations5

Unsharp masking is a photography trick applied to geometry: blur a copy, subtract it from the original, and the difference gets added back as crispness. Sharpen Unsharp Mask does exactly that to a mesh, using PyMeshLab's apply_coord_unsharp_mask filter. It's the unsharp_mask backend of the pack's Sharpen Mesh front node, and it's the tool for when your mesh came out of reconstruction soft and blobby and you want the detail back without re-doing the whole pipeline.

How it works

The algorithm builds a smoothed version of the mesh (that's what the iterations control is for - more iterations = smoother reference = sharpening at a larger scale), then displaces each vertex outward along the difference between the original and the smooth reference, scaled by weight. The inputs:

  • trimesh - the mesh to sharpen.
  • weight (0–3, default 0.3) - how hard to push the detail back. 0.3 is conservative; you'll notice it, but nothing breaks. Crank it and features start popping.
  • iterations (1–50, default 5) - how smooth the reference mesh is. Few iterations = sharpening tiny detail; more = catching larger-scale softness.

Outputs are sharpened_mesh (TRIMESH) and info. The info string is where you'll see whether the filter actually ran or bailed.

Why you'd use it

Reconstruction (Poisson, photogrammetry, or even this pack's own Depth Map to Mesh) tends to sand off fine features. A little geometric unsharp masking restores crispness without re-sampling the whole surface. It's also the natural counterweight to this pack's smoothing nodes - over-smoothed something and can't redo it? Sharpen pulls some definition back. For prints and hard-surface assets where sharp edges read as "quality," this is a genuinely useful finishing step.

Installing it

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

Or ComfyUI Manager → GeometryPack → Install, restart. This backend needs PyMeshLab, which the pack installs - but note the source code checks for a minimum version, so if the node reports the filter isn't available, make sure your PyMeshLab is recent (pip install pymeshlab --upgrade).

Where people get burned

The classic failure is the "unsharp mask filter not available" message - an old PyMeshLab lacking the apply_coord_unsharp_mask filter. Upgrade it. The subtler trap is overshooting: weight at 1+ on a noisy mesh doesn't just sharpen, it amplifies noise, and your "sharp" mesh comes out spiky. Start small (0.3, 5 iterations), inspect in Preview Mesh, and only then push. And as everywhere in this young pack, a workflow saved against an older version can fail validation with combo-value errors - update and re-pick the backend before you assume the filter broke.

Categorygeompack/smoothing

Inputs (3)

NameTypeDefaultDescription
trimeshTRIMESH
weightFLOAT0.300–3Unsharp mask weight controlling sharpening strength. Higher = more pronounced sharpening.
iterationsINT51–50Smoothing iterations for the reference smooth mesh. More iterations = larger-scale sharpening.

Outputs (2)

NameTypeDescription
sharpened_meshTRIMESH
infoSTRING