Cleaning up a 3D Scan in Blender

Back to overview

Recent smartphone-based 3D scanning apps have made it easier than ever to capture 3D scans. However, many of these apps process data in the cloud giving you no way to edit your scan before publishing, or don’t offer a complete suite of editing and cleanup tools for the 3D models that they produce. This tutorial will show you how you can use free 3D editing tools to clean up your scans and re-upload them to Sketchfab.

Before we begin, you will need to do two things:

  • Download and install Blender (we’ll be using Blender 3.1.2 here). If you’re completely new to Blender, check out their introductory tutorials here.
  • Create a 3D scan and upload it to Sketchfab. I’ll be using the model below that was captured with RealityScan. Feel free to download my model if you’re looking for something to practice with.

 

We’ll cover the following techniques in this article—you may not need to use all of them for each scan you create but together they form a handy toolkit for quick fixes. You don’t need to work through these stages in sequence, just pick the ones that will resolve the issues in your 3D model. N.B. I’ll be using Blender in ‘left click to select’ mode for all instructions below.

Download your 3D scan

You have two options here: download via sketchfab.com or import your model directly into the Blender app using the Sketchfab plugin.

Download via sketchfab.com

  1. Make your model downloadable and publish it either privately or publicly.
  2. Head over to your model’s page on Sketchfab and download it. (If you are a Pro or Premium subscriber or seller on the Sketchfab Store, you can download your models without making them publicly downloadable.)
  3. Unzip the downloaded file and any additional subfiles that contain your 3D files.
  4. Inside Blender, go to File > Import, select your file type, and navigate to your downloaded file to import it.

Download directly into the Blender app using the Sketchfab plugin

  1. Download and install the Sketchfab plugin for Blender.
  2. Open Blender’s tools panel by hitting the N key, select the Sketchfab tab and click the ‘Activate add-on’ button. Next, input your Sketchfab login details.
  3. Now you have a couple of options:
    1. If your model is either public or private:
      1. Check the ‘Import from url’ check box, paste in your model URL, and click Import model.
    2. If your model is public:
      1. Use the ‘Search’ section to search for your model’s exact title, select the correct result, click Import model. (If you are a Sketchfab Pro or Premium subscriber, you can use the dropdown menu to restrict the search to just your own models.)

Merge your scan’s geometry

After importing your 3D scan, you may find that when you try to manipulate it in Blender, the scan is split into several parts, which can make applying changes and editing the model tricky. Let’s fix that before we proceed.

  1. In Object Mode and with your mouse over the main window of the layout view, press the A key to select all the geometries.
  2. Shift + Left-click one of the geometries (it will be highlighted in a different orange from the other parts of the mesh).
  3. Hit Ctrl+J (Cmd+J on Mac) to Join the geometries together.
    1. With our combined geometries selected, add and apply a Weld Modifier (this will unify any overlapping or very close vertices):
    2. Navigate to the Modifiers panel.
    3. Open the ‘Add Modifier’ dropdown.
    4. Find and click the ‘Weld’ modifier near the bottom of the ‘Generate’ column (you may need to scroll down a bit).
    5. Apply the Weld modifier (default settings should be OK).
  4. Done! Now we have a unified mesh to work with.

Center and orient your scan

You may find that your imported scan does not sit at the center of the 3D workspace, which can make it difficult to navigate your scene. Here’s how to make sure everything is centered.

  1. Make sure your 3D Cursor is in the center of the workspace:
    1. In Object Mode, in the 3D viewport menu, navigate to Object > Snap > Cursor to World Origin (or hit F3 to bring up the search menu and start typing “Cursor to World Origin”).
  2. Now let’s center our geometry too:
    1. In the 3D viewport and with our scan geometry selected, navigate to Object > Set Origin > Origin to 3D Cursor.
    2. Next, navigate to Object > Set Origin > Geometry to Origin.

At this stage you may also want to rotate your model a little, which will prove helpful when using other editing tools. My favorite way to do this is:

  1. Move the scene view to a predefined ortho-view, e.g., front, side, top.
    1. To do this just hit the 1, 3, 7, or 9 keys on your number pad (if you’re using a keyboard without a number pad, you’ll need to enable ‘Emulate Numpad’ in Edit > Preferences > Input to use your regular number keys).
  2. Hit R to enable the Rotation tool and move your cursor to rotate the model. You can also lock rotation to a specific axis by hitting X, Y, or Z keys.
  3. Left-click to confirm the rotation or hit Esc to cancel the changes.

Delete floating geometry

After creating a 3D scan, you may notice that you end up with lots of little bits of 3D geometry floating around your subject—this is especially true if you scanned a subject that was near foliage or shiny objects. If you wish to remove this additional geometry, what follows is the quickest method.

  1. Select your scan geometry in the 3D viewport and hit Tab to switch into Edit Mode.
  2. The default select mode is ‘Vertex’, so go ahead and select a single vertex on your main scan subject.
    1. If your main subject is composed of multiple parts, use Shift + Left-click to select a vertex on each part before the next step.
  3. Press Ctrl+L (Cmd+L on a Mac) to ‘Select Linked’ (this should select all of our main geometry thanks to our earlier ‘weld’ trick).
  4. Press Ctrl+I (Cmd+I) to invert your selection. All your floating geometry should now be selected.
  5. Hit X to bring up the Delete menu, and select ‘Vertices’.
  6. Done! Your scan should be a little less blobby now.

You can also use a version of this technique (Select Vertex > ‘Select Linked’ > Delete) to remove larger bits of geometry.

Crop using the Bisect tool

The Bisect Tool allows you to draw a straight line across your 3D model and remove all geometry from either side of this line. Here’s how:

  1. For simplicity, switch to a predefined orthographic view using 1, 3, 7, or 9 on your number pad (if you’re using a keyboard without a number pad, you’ll need to enable ‘Emulate Numpad’ in Edit > Preferences > Input to use your regular number keys).
  2. Tab to switch into Edit Mode.
  3. Hit A to select all vertices.
  4. Select the Bisect Tool from the top menu Mesh > Bisect.
  5. Left-click and drag a line across your model, release to set the bisect line. Use the background grid to help keep your line level.
  6. Expand the Bisect panel that now appears in the bottom left corner of the viewport.
  7. Check ‘Clear Inner’ or ‘Clear Outer’ to remove geometry from either side of the bisect line; check ‘Fill’ if you would like to automatically create faces across the newly created edge loops.
  8. Click anywhere else to confirm your selection.
  9. Repeat from different viewing angles on your model as necessary.

Crop using the Boolean Modifier

The Boolean Modifier lets us crop our 3D model in a variety of shapes using a secondary mesh, e.g., a cylinder or cuboid. We achieve the new cropped shape by overlapping our scan and the secondary mesh; all parts of our scan mesh that fall outside of the secondary mesh will be deleted.

  1. For simplicity, switch to a predefined orthographic view using 1, 3, 7, or 9 on your number pad (if you’re using a keyboard without a number pad, you’ll need to enable ‘Emulate Numpad’ in Edit > Preferences > Input to use your regular number keys).
  2. Switch the Viewport Shading to Wireframe (top left of the 3D viewport).
  3. In Object Mode and with your mouse over the 3D viewport, hit Ctrl+A and select Mesh > choose your desired secondary mesh shape. We’ll use a cylinder in this demo.
  4. With your new mesh selected, use the S key to scale it, the R key to rotate it and the G key to grab and move it around in 3D. Transform it so that every part of your 3D scan mesh that you wish to keep is inside the secondary mesh.
  5. Now Left-click select your scan mesh.
  6. Open the Modifier panel and then the Add Modifier dropdown, select Boolean.
  7. In the Boolean Modifier options that appear:
    1. Switch to the Intersect mode
    2. Click the empty space next to Object and select your secondary mesh.
      NOTE: The more complex your scan mesh is, e.g., millions of polygons, the longer the boolean operation will take to compute.
  8. Apply the modifier.
  9. Left-click your secondary mesh and hit X to delete it.
  10. Switch the viewport rendering to Material Preview; you will likely notice that parts of the resulting mesh appear with random textures. Let’s fix that.
  11. With your cropped scan mesh selected, Tab into Edit Mode, hit A to select all of your mesh, then Ctrl+T to triangulate all of the newly added faces of your mesh.
  12. If necessary, use the G key to move the model to the center of your scene again. Use the X, Y, and Z keys to lock your movements to the corresponding axes.
  13. Alt+A to deselect all vertices and switch the viewport rendering to Wireframe again.
  14. Change the Select Mode to Face.
  15. Use the Circle Select tool (C) and/or Box Select tool (B) to select all of the newly added triangles. You may find that switching to a predefined orthographic view using 1, 3, 7, or 9 on your number pad makes this easier.
  16. Navigate to the Material Properties pane and add a material slot. Add a new material to this slot, rename it (by double-clicking on the existing name, e.g., ‘Material.001’) and set the Base Color to your preference.
  17. Select the newly added faces of your mesh and the new material, and click Assign.
  18. Switch the viewport rendering back to Material Preview and Tab back into Object Mode.
  19. Your cropped model is now ready to be exported.

Minimize bumps with the Smooth Modifier

Sometimes 3D scans can come out a little lumpy and bumpy for various reasons (poor quality input data, insufficient subject coverage, shiny or reflective surfaces), but we can fix that to some extent using the Smooth Modifier.

  1. In Object Mode, Left-click select your scan mesh.
  2. Open the Modifiers Panel and the Add modifier dropdown menu, select Smooth.
  3. Experiment with adjusting the Factor and Repeat parameters.
  4. Toggle the modifier Realtime setting to switch between modified and unmodified mesh previews.
    1. The effect of this modifier can be quite subtle. Switch between Solid and Material Preview viewport rendering to understand the changes you are making. Note that extreme smoothing can lead to textures looking warped and stretched.
  5. When you are happy with the result, be sure to Apply the modifier.

Fill texture gaps with the Clone tool

If parts of your scan are poorly or improperly textured, you can use the Texture Clone tool to copy texture information from another part of the mesh and paint it onto the poorly textured area.

  1. Switch to Texture Paint Mode.
  2. Switch the Viewport Rendering to Material Preview.
  3. Adjust the viewport view so that you can see the part of your scan that you wish to update, as well as the part you wish to copy texture data from.
  4. Select the Clone tool.
  5. Ctrl+Left-click on the mesh to select the part of the mesh you wish to copy data from.
  6. Left-click drag on the mesh at the point you wish to apply the texture data.
  7. When you are finished, in the Image Editor pane, navigate to Image > Save to save your updated texture.

Export your model to Sketchfab

Once you have made your edits, be sure to save your project as a Blender file.

  1. If you haven’t already, download and install the Sketchfab plugin for Blender.
  2. Open Blender’s tools panel by hitting the N key, select the Sketchfab tab, and click the ‘Activate add-on’ button. Next, input your Sketchfab login details.
  3. Once you have finished activating the plugin, expand the Export section and add a Title, Description, and Tags as desired (these will be displayed on the model’s page on Sketchfab).
  4. Click Upload. The button will then display ‘Uploading…’ and a summary of your project’s file size.
  5. Once uploading is complete, a new button will appear with the text View Model Online. Click this button to visit your model’s page on Sketchfab, and to access 3D display and publish settings. If you’re looking for suggestions on how to make your 3D scan look great on Sketchfab, check out this handy guide.
The final output of the editing process uploaded to Sketchfab with some basic setup in the 3D Editor.

Hopefully this tutorial will prove useful to you as you edit your 3D scans, please feel free to suggest your own tips in the comments.

About the author

Thomas Flynn

Community & Cultural Heritage Lead at Sketchfab.

Expert in 3D scanning, photogrammetry, online publishing & dissemination.



No Comments

    Related articles