Laplacian Mesh Smoothing by Throwing Vertices
Published on: 2025-06-11 05:30:19
Date Sun 09 March 2025 Tags Programming
In this blog post, I’ll talk about smoothing and blurring 3D meshes using Laplacian mesh smoothing. A good example of where this is useful is Adobe Substance 3D Modeler’s smooth tool which I implemented using Laplacian mesh smoothing. Laplacian mesh smoothing works by iteratively shifting each vertex towards the average position of that vertex’s neighbors. The math formula for this is:
$$v_i = \frac{1}{N} \sum_{j=1}^{N} v_j$$
which we can implement in code as:
for ( const Vertex & vertex : mesh . vertices ) { vec3 avrgPosition = vec3 ( 0 ); for ( const Vertex & vertexNeighbor : neighbors ( vertex )) { avrgPosition += vertexNeighbor ; } avrgPosition /= numNeighbors ( vertex ); }
Run that a few times, and the mesh smooths out like magic. It’s important to note that this process only changes the vertex data of the mesh; the connectivity (triangle indices) are unchanged.
The above is straightforward except that we need the neighbors() and numNe
... Read full article.