Mesh Smoothing Function

Mesh smoothing refers to a group of algorithms, some iterative and some none-iterative, designed to reposition vertices in a 3D model to reduce noise and improve surface quality. While smoothing adjusts vertex locations, it preserves the overall object topology. That is, no new faces are added or removed. The goal is to achieve a smooth mesh that better reflects the intended shape, without sharp noise artifacts or irregularities.

Mesh smoothing plays a crucial role in various technical fields:

  • 3D processing. A smooth mesh is often the first step in preparing scanned data or raw geometry for further operations;
  • Computational geometry. Various geometric algorithms, especially those involving curvature estimation, re-meshing, or collision detection, require a well-distributed vertex layout.
  • Computer graphics. Visual artifacts like shading bands or jagged silhouettes often result from uneven geometry.

 

It makes sense to smooth a mesh in many fields, including:

  • 3D modeling. Smoothing is often used after sculpting, retopology, or reconstruction to clean up small defects and improve the appearance of geometry before subdivision or Boolean operations.
  • Simulation. Finite element and fluid simulations depend on quality. A smooth mesh leads to better-conditioned solvers and fewer numerical instabilities.
  • Additive manufacturing. Slicing engines perform better with both clean and smooth surfaces. Mesh smoothing helps eliminate jagged edges and tiny distortions. Otherwise, these could affect print quality.
  • Scientific visualization. In such domains as bio imaging or geology, smoothing noisy scan data makes anatomical or structural patterns easier to observe and interpret.

Mesh Smoothing Algorithms & Techniques

Speaking of various mesh smoothing methods, the following ones on the table certainly deserve our attention:

Hole Filling Parameters

This one moves every vertex toward the centroid of its one‑ring neighbors. Such a step averages positions and knocks out high‑frequency noise. Simple and fast, however, it might shrink the model, unless you employ cotangent or scale‑dependent weights.

Taubin

As for this one, it runs one positive Laplacian step followed by a slightly larger negative step, which cancels the volume loss while still damping noise. Think of it as two quick pushes, first out, then in, that leave the object the same size but much smoother. Though more stable than plain Laplacian, it scales poorly on extremely dense meshes.

HC Laplacian

Here, we add an edge‑length ‘feedback’ pass after the Laplacian move, pulling vertices back toward their original edges. The result keeps crisp boundaries and overall volume better. It balances smoothing with shape retention better than standard Laplacian, but takes more time per iteration and may leave surface irregularities.

Bilateral and feature‑preserving filters

One weights each neighbor by both spatial distance and normal similarity, so diffusion happens only within nearly coplanar regions. This smooths broad areas yet respects sharp creases, ridges, and folds. These are excellent at preserving features while cleaning noise across large surfaces. However, they are slower.

Implicit fairing

We evolve the surface by its mean curvature via a backward‑Euler solver. Large time steps erase heavy noise while remaining numerically stable. Imagine the object melting uniformly like warm wax. It is ideal for removing severe noise while keeping numerical stability. Concurrently, it tends to shrink the surface.

Curvature‑adaptive approach

This one solves an edge‑aware diffusion equation that diffuses along the surface much more than across high‑curvature directions. Boundaries and corners stay intact while flat areas even out. It performs well and handles irregular meshes with ease thanks to per-vertex diffusion control. On the downside, it requires accurate curvature estimation and careful parameter tuning.

Having overviewed what exists in our professional domain, let’s now focus on MeshLib’s smooth mesh functions. All in all, what we do is offer basically Laplacian functions that sample smaller neighborhoods and add a built-in volume bias, so that massive meshes smooth interactively without shrinking.

How to Make 3D Meshes Smoother

Whenever you need to smooth meshes, between others, our MeshRelax algorithm is your first stop. All options keep topology intact and run in a few iterative passes, yet, each targets a slightly different pain point:

Core smoothing operators

  • relax (or simple Relax) is our fastest noise killer. It pulls each vertex toward the centroid of its 1‑ring neighbors. Use iterations for a quick polish but expect some global shrinkage.
  • relaxKeepVolume features same idea, however, ads a corrective term that tries to maintain overall volume. It is ideal for scanned parts or print‑ready geometry where size matters.
  • relaxApprox will fit a local plane or quadric patch around each vertex, then will project the vertex onto that surface. As such, it reeps subtle curvature better than centroid moves. Note that quadric mode is slower but more faithful.
  • equalizeTriAreas iteratively shifts vertices so neighboring triangles converge toward a uniform area, boosting element quality for FEM / CFD. Remember, that it does not smooth the surface itself. So finish with a Delaune-based topology improvement round for cleaner geometry if the output looks strange.

In addition to that, there are quality boosters at your disposal:

  • removeSpikes runs Relax only on vertices whose dihedral angle is above a threshold, flattening isolated spikes.
  • smoothRegionBoundary straightens the outline of a selected face set without touching its interior.
  • hardSmoothTetrahedrons snaps ‘central’ vertices of tetra‑shaped artifacts into the surrounding face plane. As such, it is rarely needed for typical pipelines.
  • positionVertsSmoothly repositions selected vertices to create a smooth surface both inside the region and along its boundary. This method supports custom weights.

We also offer advanced denoising via meshDenoiseViaNormals.

  • It runs a Mumford–Shah–style two‑stage solver. First, we smooth per‑vertex normals, then re‑position vertices so the object follows those normals. The result wipes micro‑noise but locks sharp edges, giving you a visibly smooth model without rounded corners.
  • meshDenoiseViaNormals works well after a quick relaxation pass when ordinary smoothing has already removed the worst spikes.
  • Core knobs (all in DenoiseViaNormalsSettings):
    • beta stands for edge sensitivity.
    • gamma is for overall smoothing strength.
    • normalIters, pointIters: here, more iterations mean cleaner result but longer run time.
    • guideWeight > 0 pins vertices toward their originals to fight global shrink.
    • fastIndicatorComputation. Here, true makes the edge‑indicator phase approximate but 3‑4× faster.
    • limitNearInitial + maxInitialDist clamp how far any vertex may wander.
    • outCreases is an optional thing that returns where the algorithm thinks the sharp edges are.

 

Who Should Try Our SDK for Right Away?

  • Product design and 3D printing
  • Visual effects
  • Cultural‑heritage preservation and archaeology

Python & C++ Code to Smooth Mesh

				
					from meshlib import mrmeshpy as mm
# Load mesh
mesh = mm.loadMesh("mesh.stl")
# Create parameters for adding noise
nSettings = mm.NoiseSettings()
nSettings.sigma = mesh.computeBoundingBox().diagonal()*0.0001
# Add noise to mesh
mm.addNoise(mesh.points,mesh.topology.getValidVerts(),nSettings)
# Save noised mesh
mm.saveMesh(mesh,"noised_mesh.stl")
# Denoise mesh with sharpening for sharp edges
# see the article "Mesh Denoising via a Novel Mumford-Shah Framework"
mm.meshDenoiseViaNormals( mesh )
# Save denoised mesh
mm.saveMesh(mesh,"denoised_mesh.stl")
				
			
Before
Noisy 3D mesh before smoothing – surface irregularities visible
After
3D mesh after smoothing – clean surface with reduced noise

Step-by-Step Surface Mesh Smoothing Workflow

  • Step 1. Open your model. Load any 3D file.
  • Step 2. Add some noise. To test how smoothing works, add small random bumps to the surface, just enough to see the difference.
  • Step 3. Save the noisy version. This lets you compare before and after. You’ll see a slightly messy objects with micro‑artifacts.
  • Step 4. Denoise. Run meshDenoiseViaNormals() function. It smooths flat areas but protects sharp edges and corners.
  • Step 5. Save the clean result. Now you have two files. First, the noisy object and, second, the cleaned and smooth mesh, which is totally ready for printing, rendering, or further editing.

MeshLib Library for Mesh Smoothing

Whenever you need to smooth meshes, between others, our MeshRelax algorithm is your first stop. All options keep topology intact and run in a few iterative passes, yet, each targets a slightly different pain point:

Setup Guides

Language Support

  • C++: Full support on all platforms with no restrictions.
  • Python: Works with Python 3.8 to 3.13 across operating systems:
    • Windows: 3.8–3.13
    • macOS: 3.8–3.13 (except 3.8 on Intel Macs)
    • Linux: 3.8–3.13 on any manylinux_2_31+ system

Find the full source code on GitHub

Supported File Formats

Format
Import
Texture Support
Color Support
Export
STL
Yes
No
No
Yes
OBJ
Yes
Yes
Yes
Yes
OFF
Yes
No
No
Yes
DXF
Yes
No
No
Yes
STEP
Yes
No
No
No
STP
Yes
No
Yes
No
CTM
Yes
No
Yes
Yes
3MF
Yes
Yes
Yes
No
MODEL
Yes
No
No
No
PLY
Yes
No
Yes
Yes
GLTF
Yes
Yes
Yes
Yes

What our customers say

Thomas Tong

Founder, Polyga

MeshLib% filename%
When we set out to develop our new Podkit scanning platform, we chose MeshInspector’s MeshLib as the foundation. That partnership let us accelerate development, ship new features faster, and get to market months sooner than we could have on our own. The MeshInspector team has been outstanding — quick answers, deep technical know-how, and genuine enthusiasm for our success. We simply wouldn’t be where we are today without their support.

Gal Cohen

CTO, customed.ai

MeshLib% filename%
“MeshLib has been a game-changer for our company, providing all the essential operations we need to handle meshes and create highly accurate personal surgical instruments (PSIs), which are our primary products. After extensive research and comparison, MeshLib stands out as the best solution on the market. Their team is exceptionally professional and knowledgeable. Collaborating with them has been an absolute pleasure—they respond to any issues we encounter promptly and always deliver effective solutions. Their commitment to customer support and technical excellence is truly unmatched.”

Mariusz Hermansdorfer

Head of Computational Design at Henning Larsen Architechts

MeshLib% filename%
“Over the past year, MeshLib has transformed my approach to design and analysis in landscape architecture and architecture projects. This powerful library excels in critical areas, such as geometry processing, interactive booleans, point cloud manipulation, and curve offsetting. These features enhance design workflows, allowing for dynamic modifications, efficient terrain modeling, stormwater flow analysis, and advanced wind flow visualiiza…..”

HeonJae Cho, DDS, MSD, PhD

Chief Executive Officer, 3DONS INC

MeshLib% filename%
“MeshLib SDK helped us achieve faster and more accurate calculation results and outperformed any other Mesh Processing library that we evaluated. For us in digital dentistry, it was a game-changer. Mesh processing operations, such as inspecting and editing the mesh to create dental devices for the treatment plan, are crucial. MeshInspector support liberated our team from technical constraints so we concentrated on creating exactly what we wanted. I highly recommend incorporating the MeshLib into your software arsenal.”

Ruedger Rubbert

Chief Technology Officer, Brius Technologies Inc

MeshLib% filename%
“With MeshInspector MeshLib we were able to automate many of our workflow processes, thanks to its advanced, modern, and efficient dental and geometry oriented algorithms, covering many of our orthodontic-related tasks: CT and intraoral scan segmentation, voxel and Boolean operations, editing, aligning, visualization, inspection, and import/export of mesh objects. We use the versatile MeshInspector MeshLib API, both in production and R&D for fast prototyping and testing of our ideas.”

Start Your Journey with MeshLib

MeshLib SDK offers multiple ways to dive in — from live technical demos to full application trials and hands-on SDK access. No complicated setups or hidden steps. Just the tools you need to start building smarter, faster, and better.

Journey with MeshLib SDK
Core Developers
MeshLib Team, official authors of MeshInspector App and MeshLib SDK, leverages over 20 years of 3D data-processing and mathematical expertise to deliver high-performance, plug-and-play algorithms that simplify even the most complex mesh workflows.
Leave a review about this post
{{ reviewsTotal }}{{ options.labels.singularReviewCountLabel }}
{{ reviewsTotal }}{{ options.labels.pluralReviewCountLabel }}
{{ options.labels.newReviewButton }}
{{ userData.canReview.message }}
Share this post on social media