Sharpen Mesh
The one dropdown that picks your 3D sharpening backend
- trimesh
- sharpened_mesh
- info
Mesh sharpening is the geometry cousin of image unsharp masking: your scan or generative model came out a little mushy, and you want the crisp creases back without wrecking the flat bits. In ComfyUI's growing 3D asset pipeline - generate a mesh, repair it, then prep it for texturing or printing - this node is the gateway to all of the GeometryPack's sharpening algorithms. Drop it in, pick a backend, and let it do the math.
What makes Sharpen Mesh different from its siblings is that it's the front node. Under the hood it uses ComfyUI's GraphBuilder to dispatch to hidden backend-specific nodes, so you get one UI with a backend dropdown instead of a wall of nearly-identical nodes. The tradeoff: the individual backends still exist and you can add them directly to a graph if you want, but for day-to-day work this is the one you reach for.
The backend dropdown
The backend input is a dynamic combo with seven choices, and each one has a different personality:
- two_step - bilateral normal filtering. The README's own recommendation for CAD-like edges. This is the default for a reason.
- unsharp_mask - geometric unsharp masking from pymeshlab. Familiar if you've done image sharpening; fast.
- libigl_unsharp - cotangent-weighted unsharp. Geometry-aware, nice middle ground.
- l0_minimize - piecewise-flat L0 optimization. Aggressive, for CAD prep where you want true flats.
- guided_normal - guided normal filtering with a min-range metric. The most controllable.
- fast_effective - thresholded cosine-weight normal filtering. The speed option.
- non_iterative - mollified normal, single-pass bilateral. Cheap and quick.
The optional inputs that appear depend on which backend you selected - they're prefixed like backend.weight and only apply to the matching algorithm. Set backend=two_step and you get backend.smooth_steps and backend.normal_threshold; switch to libigl_unsharp and you get backend.weight and backend.iterations. Confusing at first, but it keeps the node from being a thirty-slider monster.
Inputs that matter
The trimesh input is your mesh - this pack's nodes all speak its TRIMESH type, so it'll come from a GeometryPack loader or generator node. After that, the backend dropdown is the only thing you must touch. Two settings you'll actually want to know:
backend.smooth_steps(default 3) - number of two-step smoothing passes. More steps = stronger sharpening.backend.normal_threshold(default 60) - dihedral angle in degrees. Edges sharper than this get preserved as creases. Lower it to treat more edges as features; 60 is a good starting point for most CAD models.
Outputs
sharpened_mesh (TRIMESH) is what you wire forward - into a viewer, a save/export node, or the next processing step. info (STRING) carries diagnostics from the backend so you can sanity-check what actually ran.
Install and gotchas
Install via ComfyUI Manager (search "GeometryPack"), or the manual route: git clone https://github.com/PozzettiAndrea/ComfyUI-GeometryPack into custom_nodes/, then pip install -r requirements.txt --upgrade and python install.py. Heads up: the installer uses the experimental comfy-env package with the pixi package manager to set up an isolated environment, and some backends drag in heavy GPL dependencies (pymeshlab, Blender, CGAL). The pack itself is GPL-3.0-or-later, so check your own distribution plans before you ship modified copies.
Real-world trap: pick unsharp_mask and you need pymeshlab available; pick a Blender-dependent path and you need Blender configured. If a backend errors with a missing-module message, that's the first thing to check. The author ships this as work-in-progress and is genuinely responsive on GitHub Discussions and the Comfy3D Discord, so an odd error is worth reporting rather than fighting alone.
Inputs (2)
| Name | Type | Default | Description |
|---|---|---|---|
| trimesh | TRIMESH | — | |
| backend | COMBO | Sharpening algorithm. two_step=bilateral normal filtering (recommended for CAD-like edges), unsharp_mask=geometric unsharp masking (pymeshlab), libigl_unsharp=cotangent-weighted unsharp (geometry-aware), l0_minimize=piecewise-flat L0 optimization (aggressive CAD prep), guided_normal=guided normal filtering with min-range-metric (controllable), fast_effective=thresholded cosine weight normal filtering (fast), non_iterative=mollified normal single-pass bilateral (non-iterative) |
Outputs (2)
| Name | Type | Description |
|---|---|---|
| sharpened_mesh | TRIMESH | — |
| info | STRING | — |