Skip to content
Photogrammetry & 3D Heritage

Cleaning a 3D mesh means stripping out the junk a photogrammetry or scanning pipeline leaves behind — floating fragments, duplicate vertices, holes, and impossible non-manifold edges — to leave one tidy, watertight surface. Decimating then reduces the triangle count while preserving that shape, so a five-million-triangle scan becomes a few hundred thousand that load instantly. The golden rule for beginners: clean first, decimate second, and always work on a copy while keeping your full-resolution master untouched.

What is actually wrong with a raw mesh?

Straight out of Metashape, Meshroom, or a scanner, a mesh is rarely clean. Typical problems:

  • Floating islands — little blobs of geometry created from background clutter or noise.
  • Holes — gaps where the surface had no coverage (the underside of an object, dark crevices).
  • Duplicate and unreferenced vertices — redundant points that bloat the file.
  • Non-manifold edges — edges shared by more than two faces, which no real surface has.
  • Far too many triangles — millions, when a few hundred thousand would look identical.

Cleaning fixes the first four; decimation fixes the last.

Why clean before you decimate?

Decimation algorithms try to spend their triangle budget on detail that matters. If the mesh still contains floating islands and noise, the algorithm wastes triangles preserving rubbish and may even weld real geometry to a stray fragment. Clean first and the simplifier works from a sound surface, so the reduced mesh keeps the carving and loses nothing of value. Reversing the order produces a small, tidy-looking mesh that is subtly wrong.

A small worked example in MeshLab

Here is a from-scratch sequence on a single object scan. Each step maps to a menu filter in MeshLab; you do not need to script anything.

text
1. Import the .obj/.ply.                         File > Import Mesh
2. Remove floating bits:                         Filters > Cleaning and Repairing
     "Remove Isolated pieces (wrt Diameter)"   -> set to e.g. 25% of bbox
3. Remove duplicate vertices and faces:          same menu
     "Remove Duplicate Vertices", "Remove Duplicate Faces"
4. Repair non-manifold edges:                    same menu
     "Repair non Manifold Edges"
5. Close small holes:                            Filters > Remeshing...
     "Close Holes"  -> max size e.g. 100 edges
6. Decimate:                                     Filters > Remeshing...
     "Simplification: Quadric Edge Collapse Decimation"
     -> target faces = 200000, tick "Preserve Normal" + "Preserve Boundary"
7. Export a copy:                                File > Export Mesh As...

The key filter is Quadric Edge Collapse Decimation: it collapses the least important edges first, so flat areas lose triangles while curved, detailed areas keep them.

How many triangles do I actually need?

Match the target to the job rather than guessing:

UseRough triangle targetNotes
Archival masterFull resolutionNever decimate this; keep it
Study / measurement~1M–3MDetail for close inspection
Web delivery100k–300kPair with compressed textures
Mobile / AR50k–150kAggressive, plus baked normal map

If decimation loses surface detail you cared about, recover it by baking a normal map from the high-resolution mesh onto the low one — the silhouette is simpler but the surface still looks carved.

What is a non-manifold edge, and why fix it?

A manifold surface is one where every edge borders exactly two faces, like real-world material. A non-manifold edge — shared by three or more faces, or a vertex pinching two surfaces together — is geometrically impossible and breaks downstream operations: hole-filling, smoothing, and especially 3D printing all choke on it. MeshLab's Repair non Manifold Edges filter splits or removes the offending geometry so the rest of your processing behaves.

How do I avoid ruining detail by over-decimating?

Three habits keep beginners safe:

  1. Always copy. Decimate a duplicate; keep the master at full resolution.
  2. Decimate in steps if going very low — 5M to 1M to 300k — checking the silhouette each time rather than jumping straight to 100k.
  3. Tick Preserve Boundary and Preserve Normal so edges and shading survive the collapse.

Inspect after each step with flat shading on, which exposes triangle artefacts that smooth shading politely hides.

Key Takeaways

  • Cleaning removes floating bits, duplicates, holes, and non-manifold edges; decimation reduces triangle count.
  • Always clean first, then decimate — order matters for quality.
  • MeshLab is the free, no-scripting starting point; Quadric Edge Collapse is the core decimation filter.
  • Match triangle targets to use: full-res master, ~1M study, 100k–300k web.
  • Bake a normal map from the high-res mesh to keep apparent detail after heavy decimation.
  • Fix non-manifold edges early or hole-filling, smoothing, and printing will fail.
  • Work on a copy and keep the full-resolution archival master untouched.

Frequently Asked Questions

What does it mean to clean a 3D mesh?

Cleaning removes the junk a scanner or photogrammetry pipeline leaves behind: floating fragments, duplicate vertices, holes, and non-manifold edges. The goal is a single, watertight surface with no stray geometry.

What does decimating a mesh do?

Decimation reduces the triangle count while keeping the shape, replacing dense areas of triangles with fewer, larger ones. A 5-million-triangle scan can drop to 200k with little visible loss, making it usable on the web or in print.

Should I clean or decimate first?

Clean first, then decimate. Removing floating bits and filling holes before decimation gives the simplification algorithm a sound surface to work from, so it spends triangles on real detail rather than artefacts.

What free tool should a beginner use?

MeshLab is the standard free, open-source choice. It has dedicated filters for removing isolated pieces, closing holes, and quadric edge-collapse decimation, all without scripting.

How many triangles should my final mesh have?

It depends on use: 100k to 300k triangles suits web delivery, a few hundred thousand to a few million suits study, and you keep the full-resolution mesh as an archival master. Decimate copies for delivery, never your master.

What is a non-manifold edge and why does it matter?

A non-manifold edge is shared by more than two faces, which is geometrically impossible for a real surface. It breaks hole-filling, smoothing, and 3D printing, so MeshLab's repair filters remove these before further processing.