3D Mesh
Edge Smoothing
Computer Graphics
Computational Geometry
Mesh Processing

Algorithm for smoothing edges of an open 3D mesh

Master System Design with Codemia

Enhance your system design skills with over 120 practice problems, detailed solutions, and hands-on exercises.

Introduction

In 3D computer graphics, a polygonal mesh consists of vertices, edges, and faces that define the shape of a 3D object. These meshes are used in animation, simulation, and modeling. However, the raw output from 3D scans or rough modeling often has jagged or harsh edges that need to be smoothed for visual or analytical reasons. Edges of an open 3D mesh can be smoothed using different algorithms that combine geometric processing with topological refinement. This article explores three key techniques: Laplacian smoothing, Taubin smoothing, and bilateral mesh smoothing.

Edge Smoothing Algorithms

1. Laplacian Smoothing

Laplacian smoothing is the most widely used algorithm due to its simplicity and effectiveness. The core idea is to move each vertex toward the centroid of its neighbors, iteratively.

How It Works

The new position of a vertex viv_i is computed as the average of its neighboring vertices:

vi=1N(vi)vjN(vi)vjv_i' = \frac{1}{|\mathcal{N}(v_i)|} \sum_{v_j \in \mathcal{N}(v_i)} v_j

Here N(vi)\mathcal{N}(v_i) represents the set of neighboring vertices connected to viv_i by an edge.

Practical Notes

This method works well for eliminating noise but tends to cause shrinkage of the mesh over many iterations. The mesh gradually contracts toward its center of mass. An optional volume-preservation constraint can counteract this side effect by rescaling the mesh after each iteration to maintain its original volume.

2. Taubin Smoothing

To avoid the significant shrinkage caused by pure Laplacian smoothing, Taubin smoothing applies alternating positive and negative Laplacian steps.

How It Works

Taubin smoothing alternates between a shrinking step (with factor λ\lambda) and an inflating step (with factor μ\mu):

vi(1)=vi+λL(vi)v_i^{(1)} = v_i + \lambda \cdot L(v_i) vi(2)=vi(1)+μL(vi(1))v_i^{(2)} = v_i^{(1)} + \mu \cdot L(v_i^{(1)})

where L(vi)L(v_i) is the Laplacian operator at vertex viv_i, and λ\lambda and μ\mu are positive scalar parameters satisfying 0<λ<μ0 < \lambda < \mu. The first step shrinks, and the second step inflates just enough to cancel the volume loss. Typical values are λ=0.5\lambda = 0.5 and μ=0.53\mu = -0.53 (note μ\mu is applied as a negative factor internally to produce inflation).

3. Bilateral Mesh Smoothing

This technique extends the bilateral filter from image processing to 3D meshes. It applies local smoothing while preserving sharp geometric features like creases and corners.

How It Works

The new vertex position is a weighted average where the weights depend on both spatial distance and normal similarity:

vi=vjN(vi)Gc(vivj)Gs((ni(vjvi))2)vjvjN(vi)Gc(vivj)Gs((ni(vjvi))2)v_i' = \frac{\sum_{v_j \in \mathcal{N}(v_i)} G_c(\|v_i - v_j\|) \cdot G_s((n_i \cdot (v_j - v_i))^2) \cdot v_j}{\sum_{v_j \in \mathcal{N}(v_i)} G_c(\|v_i - v_j\|) \cdot G_s((n_i \cdot (v_j - v_i))^2)}

Here GcG_c and GsG_s are Gaussian weighting functions. GcG_c accounts for spatial proximity (closer neighbors have more influence), while GsG_s accounts for normal similarity (neighbors whose displacement aligns with the surface normal are penalized, preserving sharp features).

Implementation Considerations

Boundary Conditions

When applying smoothing on an open mesh, boundary vertices require careful handling. Common strategies include:

  • Fixing boundary vertices in place (no smoothing applied)
  • Smoothing boundary vertices only along the boundary curve
  • Using reduced weight for boundary neighbors

Special rules should maintain geometric continuity along the edges without losing boundary detail.

Iteration and Stability

  • Number of Iterations: The amount of smoothing is controlled by how many times the process repeats. Too many iterations distort the mesh, while too few leave noise.
  • Stability: Taubin smoothing provides better stability by canceling shrinkage at each iteration pair. Laplacian smoothing requires external volume correction to remain stable over many passes.

Quality Measures

After applying any smoothing algorithm, mesh quality can be evaluated by:

  • Vertex Degree Uniformity: Check whether vertex connectivity stays close to the ideal (6 for triangular meshes).
  • Area and Volume Conservation: Measure how well the surface area or enclosed volume was preserved.
  • Feature Preservation: Verify that intended sharp edges or corners remain intact.

Comparison Table

AlgorithmKey FeatureBenefitsDrawbacks
Laplacian SmoothingSimple neighbor averagingEasy to implement, reduces noiseCauses significant mesh shrinkage
Taubin SmoothingAlternating shrink/inflate stepsPreserves volume, avoids shrinkageRequires parameter tuning
Bilateral Mesh SmoothingFeature-preserving Gaussian weightsRetains sharp edges, no shrinkageComputationally more expensive

Conclusion

Edge smoothing of open 3D meshes is a crucial step for improving visual quality and utility in 3D modeling applications. Laplacian smoothing offers the simplest approach but suffers from shrinkage. Taubin smoothing addresses that limitation with alternating steps. Bilateral mesh smoothing goes further by preserving sharp geometric features. Choosing the right method depends on the specific needs of the application: whether volume preservation, feature retention, or computation speed is the highest priority.


Course illustration
Course illustration

All Rights Reserved.