3d_modeling:blender:clean_up_occipital_3d_scan

Clean up a 3D scan made with the Occipital Structure scanner

The 3D files from the Structure scanner often have holes and unwanted geometry. After following this guide you'll get a watertight model that is ready for (colour) 3D printing. A basic understanding of mesh manipulation in Blender is necessary. This guide uses Blender, but here is a guide that describes this process for Meshmixer.

The structure scanner delivers the 3D object in 3 parts:

  • Model.obj is the 3D object
  • Model.jpg is the texture file
  • Model.mtl is a file that links the object to the texture.

You only have to open the .obj file. The program will find the other files on its own:

  • File > Import > Wavefront (obj). Choose the .obj file
  1. Make the mesh active (yellow contour lines instead of orange) left mouse click
  2. Right click on the mesh and select Set Origin > Geometry to origin.
  3. Scale the object to a reasonable scale to work on. Avoid zooming in to a mesh that's super tiny or zoom out to one that's crazy big.
  4. Rotate until the object is upright.

The scan data coming from the Occipital Structure sensor isn't yet joined in a single mesh. It consists of multiple sections that overlap on the edges. To test this, hover the cursor over the object and go to Select > Select Linked > Linked (Shortcut: l) (lower caps L). This selects all vertices that are linked. As you can see, only a single section is selected.

  1. Select all: Select > All (shortcut: a).
  2. Mesh > Clean Up > Merge by Distance. The default distance should do.
  3. Reset normal vectors: Mesh > Normals > Reset Vectors

  • To see if there are any holes in the mesh, go in Edit mode and go to Select > Select All by Trait > Non manifold. This will select all vertexes on the edges of holes:

  • Apply a remesh modifier to the object and tune the parameters until the object is defined properly:
  • Try selecting the non-manifold vertexes again. If there are still some selected, repeat the above process, or export the object to Meshmixer to remesh it there.

The 3D print add-on for Blender is helpful in preparing your object for 3D printing: enable the add-on 3D-Print Toolbox in the Blender preferences.

Cut away unwanted parts, like the surface the model was standing on.

  1. Add a cube. Scale and position so it overlaps with the unwanted geometry.
  2. Select the 3D scan mesh.
  3. Add Boolean modifier and leave the operation as Difference.
  4. Select the cube as the mesh to use for the boolean.
  5. Apply the modifier.

Delete loose parts

  1. Deselect all: Select > None (shortcut: alt + a).
  2. Hover the cursor over the mesh you want to keep and press l (lower caps L).
  3. Invert the selection: Select > Invert (shortcut: cmd + i)
  4. Delete the selected vertices Mesh > Delete > Vertices (shortcut: x > Delete Vertices)

The 3D scanner generates a mesh with messy topology. There are areas with very large faces, and others where there are lots of vertices crammed together. This creates visible stress points in the mesh. The relax function moves the vertices away from densely populated areas in order to be more equally distributed. Having the mesh relaxed will prevent a series of problems later on. This will change the shape of the mesh a little bit though.

  1. Select all vertices a
  2. Relax Vertices: Vertex > Relax. A single iteration will do.

Tiny Holes

Fill tiny holes by merging vertices together. This way the texture will stay visible.

  1. Select the first vertex. left mouse button
  2. Add the second vertex to the selection. shift + left mouse button
  3. Merge them together: Vertex > Merge Vertices > At Last (shortcut: alt + m > Merge At Last).

Medium Holes

Clean up the edge
  1. Manually clean up the edges of the holes. The scanner tends to leave the edges of larger holes curved inward. Select and delete the connecting vertices. Then the excess surface is floating and can be deleted by hovering over it with the cursor and then pressing l (lower caps L) to select and then delete all linked vertices.
  2. Merge together irregularities like outward or inward triangles. Try to make the edge of the hole somewhat smooth.
  3. Looking from the side, pull out the edge vertices so they follow the curve of the skin around the edge.

Fill in the gap

- fill: Face > Fill (shortcut: alt + f)

New faces added to the mesh appear black or show random colours. They are referencing meaningless parts of the texture. Let's project the selected vertices to the texture and clone the surrounding texture onto that area.

  1. In the UV Editing workspace, unwrap the current selection. UV > Unwrap (shortcut: u > Unwrap).
  2. Scale down the selection in the UV editor and position it over a not yet textured area.
  3. Switch to the Texture Paint workspace, Select the clone brush and set the source for the brush Ctrl + left mouse click (the 3D cursor will indicate the position). Now you're ready to draw.
  4. After drawing save the texture image(!). Otherwise you'll have to redo the work.

When the holes are big, closing them with Vertex > New Edge/Face from Vertices (shortcut: f) results in a flat surface that interrupts the flow of the shape. Here are two ways to reconstruct the natural curve of the object. Clean up the edge of the hole as described above.

Using Grid Fill

  1. Make sure there are an even number of vertices on the edge of the hole. If not, merge two vertices together. On the bottom status bar the selection count is displayed. Using grid fill with an uneven number results in a 'Select two edge loops' warning.
  2. Try one of these selection modes:
    1. Select two opposing edge loops
    2. Select all the vertices of the edge of the hole. No selected faces are allowed.

  1. Fill using the 'grid fill' method. Face > Grid Fill.
  2. Play with the Grid Fill options until a proper fit.
    1. Span makes different connection patterns.
    2. Offset rotates the connection pattern with the edge vertices.
    3. Simple Blending tries to curve the new surface according to the edge vertices. It doesn't take the existing geometry in account. Meshmixer does a better job with smooth hole filling.


Both versions aren't perfect. Mesh stress areas are marked with the red circles.

Clean up dark spots by resetting the normal vectors:

  1. Go to Edit Mode
  2. Select all vertices
  3. Mesh > Normals > Reset vectors
  4. Go back to object mode

Clean up visible edges with the smoothing brush in the Sculpting workspace.

Fill a big hole the manual way

This is more tedious, but it allows for better control over the shape .

  1. With the edge vertices selected, go to Vertex > New Edge/Face from vertices. (shortcut: f) to fill the gap with a single n-gon.
  2. Shape the n-gon step by step by selecting opposing vertices and joining them: Vertex > Connect Vertex Path (Shortcut: j). This will not create overlapping faces, but instead divides the current n-gon in half. The new vertex path will include any edge it runs through. This method allows you to define the new surface in steps, going from a rough definition to fine surface details.


Gradually defining the shape

Tips:

  1. Move vertices along the edges they're connected to: Vertex > Slide Vertices (Shortcut: shift + v or double tap g)
  2. Get a smoother result with proportional editing enabled
  3. If you need to delete elements (vertices, edges or faces), dissolve rather than delete them. Mesh > Delete > Dissolve … (shortcut: ctlr + x) This way you keep the existing faces intact instead of making a hole.

Retexturing is the same as described above.

  1. Go to edit mode and select all vertices
  2. Recalculate normals: Mesh > Normals > Recalculate Outside (Shortcut: shift + n).
  3. If the visualisation lines are pointing inwards, select all vertices, Mesh > Normals > Flip.


Show the face normals for a visual check. In Edit mode: Overlays > Enable face normals.

  • 3d_modeling/blender/clean_up_occipital_3d_scan.txt
  • Last modified: 2021/10/13 03:07
  • by formlab