Automated scan cleanup tools

1,001 views
Skip to first unread message

jherrm

unread,
Sep 11, 2012, 2:52:24 PM9/11/12
to recons...@googlegroups.com
I was wondering if anyone knows about any automated scan cleanup tools to prep scans for 3D printing.  I'll be scanning dozens of people at an upcoming event and would love to do batch processing so the models can eventually be printed.

I've seen Tony Buser's screencast on cleaning scans up but I'm looking for speed over quality.

Thanks,
Jeremy

Christoph Heindl

unread,
Sep 12, 2012, 6:18:37 AM9/12/12
to recons...@googlegroups.com


Am Dienstag, 11. September 2012 20:52:24 UTC+2 schrieb jherrm:
I was wondering if anyone knows about any automated scan cleanup tools to prep scans for 3D printing.  I'll be scanning dozens of people at an upcoming event and would love to do batch processing so the models can eventually be printed.

+1 also interested in this.
 

I've seen Tony Buser's screencast on cleaning scans up but I'm looking for speed over quality.

I think we could tackle this on the long run in ReMe.

Ian S.

unread,
Sep 12, 2012, 8:49:38 AM9/12/12
to recons...@googlegroups.com
The difficulty is is that every mesh is different, so automated tools may not give you the results you want. At least with reconstructme meshes are generally of the same sort of size and quality, so an automated approach can potentially work.

In Meshlab you can save a number of filter choices together as a script, under Filters > Show current filter script. What I do is select the largest continuous mesh (or multiple meshes, as required), with a very small selection just on the edge, with the continuous (rather than individual) vertices selection tool. I then have a script that inverts the selection, deletes the selection (usually all the stray bits of the mesh), then runs clean up choices of Remove duplicated faces, Remove duplicated vertex, Remove unreferenced vertex, Remove zero area faces, Select non-Manifold edges, Delete selection, Select non-manifold vertices, Delete selection.
Depending on how well this does - it may crash Meshlab, or delete too much of the mesh! - I then run a filter to select overly-large vertices using Select faces with edges longer than... which needs to be tuned to the mesh to select the right size. There is the option of using Z-brush painting to clean up any remaining areas that are part of the mesh that are still not great, or just selecting areas to delete.
Lastly, I run a Surface Reconstruction: Poisson on the mesh. Again, the values that can be used depend on the final result you are after. Generally, set the Octree depth between 6 and 11 (usually won't go much higher than this without crashing), and the Solver divide to Octree depth -1. This *should* give you a manifold mesh. I tend to import these into Netfabb Studio Basic (free) to check, rotate, scale and cut a flat bottom on the mesh, ready for printing.
Tony Buser's video shows an additional couple of tidying up steps you can do with other programs.
Meshlab has no undo, so saving regularly helps! I found following these videos by (I think) the creator of Meshlab very useful: http://www.youtube.com/user/MrPMeshLabTutorials?feature=watch

Hope that helps!

Christoph Heindl

unread,
Sep 12, 2012, 9:40:50 AM9/12/12
to recons...@googlegroups.com


Am Mittwoch, 12. September 2012 14:49:38 UTC+2 schrieb Ian S.:
The difficulty is is that every mesh is different, so automated tools may not give you the results you want. At least with reconstructme meshes are generally of the same sort of size and quality, so an automated approach can potentially work.

In Meshlab you can save a number of filter choices together as a script, under Filters > Show current filter script. What I do is select the largest continuous mesh (or multiple meshes, as required), with a very small selection just on the edge, with the continuous (rather than individual) vertices selection tool. I then have a script that inverts the selection, deletes the selection (usually all the stray bits of the mesh), then runs clean up choices of Remove duplicated faces, Remove duplicated vertex, Remove unreferenced vertex, Remove zero area faces, Select non-Manifold edges, Delete selection, Select non-manifold vertices, Delete selection.
Depending on how well this does - it may crash Meshlab, or delete too much of the mesh! - I then run a filter to select overly-large vertices using Select faces with edges longer than... which needs to be tuned to the mesh to select the right size. There is the option of using Z-brush painting to clean up any remaining areas that are part of the mesh that are still not great, or just selecting areas to delete.
Lastly, I run a Surface Reconstruction: Poisson on the mesh. Again, the values that can be used depend on the final result you are after. Generally, set the Octree depth between 6 and 11 (usually won't go much higher than this without crashing), and the Solver divide to Octree depth -1. This *should* give you a manifold mesh. I tend to import these into Netfabb Studio Basic (free) to check, rotate, scale and cut a flat bottom on the mesh, ready for printing.

Thanks for your input. Will have a look.

exi...@gmail.com

unread,
Sep 16, 2012, 4:10:04 PM9/16/12
to recons...@googlegroups.com
possible too use meshmixer and this gui too http://curriculum.makerbot.com/2012/capturing_images.html#

Juergen

unread,
Sep 17, 2012, 8:06:23 PM9/17/12
to recons...@googlegroups.com, exi...@gmail.com
We do cleanup with MeshLab using the command line tool.

On a 64Bit OSX with 16G of memory we can finally run it without crashing on
the large full body scans:

Here are the details, the original description came from
http://www.andrewhazelden.com/blog/2012/04/automate-your-meshlab-workflow-with-mlx-filter-scripts/

First, change the working directory to the meshlab frameworks folder to fix the Mac based QT framework issue
# On MAC OSX run meshlabserver from the current working directory
cd /Applications/meshlab.app/Contents/Frameworks
/Applications/meshlab.app/Contents/MacOS/meshlabserver  -i ~/example.obj -o ~/example_poisson_9_8.obj -s ~/ReductionFilter.mlx -om vn

The ReductionFilter.mlx file contains the following, basically a Poisson_9_8 filter. It turned out to be
the best smoothing and still keeps the details, also it closes up holes.

<!DOCTYPE FilterScript>
<FilterScript>
 <filter name="Surface Reconstruction: Poisson">
  <Param type="RichInt" value="9" name="OctDepth"/>
  <Param type="RichInt" value="8" name="SolverDivide"/>
  <Param type="RichFloat" value="1" name="SamplesPerNode"/>
  <Param type="RichFloat" value="1" name="Offset"/>
 </filter>
</FilterScript>

This works pretty well, unfortunately not good enough for Blender to
apply a "decimate object modifier". We run it through NetFabb repair
when we need it.

I'd appreciate it if others come up with more and better filter combinations
for MeshLab.

Here is a beautiful full body scan with free download of the Blender file:
http://www.3dscanart.com/download.php
Use this key to access the file: 134386182855077


Cheers
Juergen

jherrm

unread,
Sep 19, 2012, 10:22:37 AM9/19/12
to recons...@googlegroups.com, exi...@gmail.com

Thanks for posting your workflow Juergen!

I tried it out on a quick one sided scan and it worked pretty well and was pretty fast.  The best part about this process is that you can specify a different file extension (like .stl or .obj) for the output file and meshlab will recognize and export appropriately. That is helpful for getting the scan into the right format for netfabb (obj) or replicatorg (stl).

In my scan, I had small artifacts that needed to be removed, so I used "Selection -> Small component selection" and deleted the selected faces and vertices. I'll figure out how to automate that and include it in the script.

The only thing that needed to be done manually is creating a flat base for the print in netfabb and running it through their automatic scan cleanup tool.  The automatic cleanup runs a ton faster on a mesh already ran through the Poisson filter.

Thanks!
Jeremy

Reply all
Reply to author
Forward
0 new messages