ComfyUI Node
Sharpen Mesh
A ComfyUI node in geompack/smoothing with 15 inputs and 2 outputs.
Sharpen Mesh
- trimesh
- sharpened_mesh
- info
◄backend▾►
◄backend.smooth_steps3►
◄backend.normal_threshold60.0►
◄backend.weight0.50►
◄backend.iterations10►
◄backend.alpha0.0010►
◄backend.beta2.0►
◄backend.normal_iterations20►
◄backend.vertex_iterations50►
◄backend.sigma_s1.0►
◄backend.sigma_r0.35►
◄backend.threshold_T0.50►
◄backend.sigma_f1.0►
◄backend.sigma_g1.0►
Categorygeompack/smoothing
Inputs (15)
| 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) | |
| backend.smooth_stepsopt | INT | 31–50 | Number of two-step smoothing passes. More steps = stronger sharpening effect. |
| backend.normal_thresholdopt | FLOAT | 60.00–180 | Dihedral angle threshold in degrees. Edges sharper than this angle are preserved as features. Lower = more aggressive (more edges treated as creases). 60 is a good default for most CAD models. |
| backend.weightopt | FLOAT | 0.500.01–5 | How much detail to add back. 0.5 = subtle sharpening, 1.0 = double the detail, 2.0+ = aggressive. |
| backend.iterationsopt | INT | 101–50 | Number of L0 optimization iterations. The algorithm gradually increases the threshold, snapping more normals flat each step. |
| backend.alphaopt | FLOAT | 0.00100.0001–0.1 | Initial regularization weight for L0 minimization. Controls the threshold below which normal differences are snapped to zero. Smaller = gentler start, larger = more aggressive initial flattening. |
| backend.betaopt | FLOAT | 2.01.1–10 | Growth rate for alpha each iteration. Alpha is multiplied by beta each step. 2.0 doubles per iteration. Higher = faster convergence to piecewise-flat. |
| backend.normal_iterationsopt | INT | 201–500 | Iterations for normal filtering. More iterations produce stronger flattening of near-flat regions. |
| backend.vertex_iterationsopt | INT | 501–500 | Iterations for vertex position update from filtered normals. Boundary vertices are kept fixed. |
| backend.sigma_sopt | FLOAT | 1.00.1–10 | Spatial weight sigma as a multiple of average edge length. Controls the neighborhood size for normal filtering. Larger = smoother but may blur sharp features. |
| backend.sigma_ropt | FLOAT | 0.350.01–1 | Normal similarity threshold. Controls which normals are averaged together. Smaller = more aggressive edge preservation. 0.35 corresponds to roughly 40 degree dihedral angle threshold. |
| backend.threshold_Topt | FLOAT | 0.501e-10–1 | Cosine 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. |
| backend.sigma_fopt | FLOAT | 1.00.001–10 | Spatial sigma as multiple of average edge length (Jones et al. SIGGRAPH 2003). Controls spatial extent of the bilateral filter. Face neighbors are searched within radius 2*sigma_f. Larger = smoother. |
| backend.sigma_gopt | FLOAT | 1.00.001–10 | Influence sigma as multiple of average edge length. Controls sensitivity to projection distance (how far the vertex moves toward each face plane). Smaller = more feature-preserving. |
Outputs (2)
| Name | Type | Description |
|---|---|---|
| sharpened_mesh | TRIMESH | — |
| info | STRING | — |