Mesh Repair

Scanned meshes often have complicated topology, holes, poorly shaped triangles. This makes it difficult to use them in geometry processing. This tutorial shows how to use Graphite to fix such meshes.

1) Load a model in Graphite

For instance, you can use this one (courtesy of Eurographics, see this page for credits and terms of use).

You can see some red dots on the model, they correspond to non-manifold vertices that were detected by Graphite. This was fixed already by Graphite's file import. Let us see now what remains to be fixed.

2) Visualize the model

   In the Shader pane (right)
      border style->on 

The yellow lines correspond to borders, i.e. holes that need to be filled.

   Mesh->display mesh topology

In the status bar, we see that this object has 20 parts and 110 borders.

3) Repair the model

   Mesh->global->auto repair
     min component size: 10000  (parts with less than 10000 triangles will be removed)
     max hole size: 10000 (holes with less than 10000 edges will be filled)
     relax border width: 3 (Laplacian smoothing will be applied to 3 rings of neighbors around the holes)

   Mesh->display mesh topology

Now our mesh has a single part, without any border, and is topologically equivalent to a sphere. This is much better, but still not perfect (see below).

4) Manual improvement

Near the tail, there is an artifact.

One of the holes has a complex shape, that the automatic algorithm does not manage to fill-in appropriately. Let us fix it.

   Tools pane (right)
      Select the Anchors tool
      Click on the unwanted shape several times (see image below)
      Seletec the Hand tool
   Mesh->lock/unlock->grow locks
      nb iter: 20

You can adjust the size of the region to process, by using grow locks / shrink locks with 1 iter.

   Mesh->lock/unlock->invert locks
   Shader pane
      mesh style: on
   Mesh->optimizer->optimize geometry

5) Global remesh

   Mesh->remesh->remesh
      target edge length: -200 (use -100 for larger triangles)

The result can be downloaded here.