Nodes/ComfyUI libigl/Sharpen Mesh
ComfyUI Node

Sharpen Mesh

A ComfyUI node in geompack/smoothing with 15 inputs and 2 outputs.

By PozzettiAndrea·Created 9 months ago·Updated 27 days ago· 209
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)

NameTypeDefaultDescription
trimeshTRIMESH
backendCOMBOSharpening 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_stepsoptINT31–50Number of two-step smoothing passes. More steps = stronger sharpening effect.
backend.normal_thresholdoptFLOAT60.00–180Dihedral 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.weightoptFLOAT0.500.01–5How much detail to add back. 0.5 = subtle sharpening, 1.0 = double the detail, 2.0+ = aggressive.
backend.iterationsoptINT101–50Number of L0 optimization iterations. The algorithm gradually increases the threshold, snapping more normals flat each step.
backend.alphaoptFLOAT0.00100.0001–0.1Initial 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.betaoptFLOAT2.01.1–10Growth 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_iterationsoptINT201–500Iterations for normal filtering. More iterations produce stronger flattening of near-flat regions.
backend.vertex_iterationsoptINT501–500Iterations for vertex position update from filtered normals. Boundary vertices are kept fixed.
backend.sigma_soptFLOAT1.00.1–10Spatial 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_roptFLOAT0.350.01–1Normal 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_ToptFLOAT0.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.
backend.sigma_foptFLOAT1.00.001–10Spatial 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_goptFLOAT1.00.001–10Influence 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)

NameTypeDescription
sharpened_meshTRIMESH
infoSTRING