3D scanning, on the cheap

I have this friend, Mr. Bot, he always has some cool magic trick up his sleeve.  Sometimes, it's sabering the tops off of wine bottles with a wine glass.  Sometimes, it's a mobile pool in the back of his Toyota truck.  This time, it was a brand new Microsoft Kinect. 

"What's that for?" I asked him. 

"3D selfies" 

My curiosity had been piqued. 

After a half hour of downloading, installing, and fiddling around on the shop computer, the system was finally set up properly.  Some troublesome googling yielded the correct Kinect SDK, and the black box Kinect was now ready to grok all the 3D information put in front of it. 

Showing me how to use the system, Bot poked around at some scan settings, sat down in front of the sensor on a swiveling chair, and spun himself around slowly so Skanect could build a 3D model.  This is accomplished by sampling many single sided depth maps and stitching the result together (which is why it's important to set preferences in the beginning, determining the depth of field to scan).

Before configuring the system thoroughly, Skanect was able to sample at 3-5 frames per second, requiring us to swivel on the chair at about 1 RPM.  This low sample rate is due to a few variables, primarily having a misconfigured graphics card.  I'm using a nice PowerColor ATI card (thanks CharlieX), but it seems that Skanect prefers the Nvidia family of cards to take advantage of their CUDA drivers.  My machine ran fine without the precisely specified card.   I've heard of Skanect running on a real flame-throwing computer at nearly 30 FPS, allowing the system to record detailed depth information in nearly real-time, and also mapped in full color!

Regardless of a little bit of lag, the Skanect software performed admirably.  One challenge with 3D models (and the resulting STL file) is continuity of surfaces.  Since STLs (and the raw data coming in from Skanect) consists soley of a very large point cloud, you can imagine that there's a few vertices which are malformed or unconnected.  Unconnected vertices pose a problem for 3D slicing programs, when the program is tracing the perimeter of a slice and suddenly sees a small but disconnected vertex, the slicing program usually vomits all over itself and forces you to tweak your model ever so slightly, which is usually a big pain when you have a million-plus vertices to inspect.  Not with Skanect, though.

Skanect has a few tools built into the software to prepare the model for printing.  In addition to unconnected vertex problems on the model, the depth of the resulting surface is also an important consideration.  3D modeling programs are quite picky about whether your model is either a surface (with no volume), or a solid model (with volume).  Depending on how you move around the scanner (you can also move the scanner around you) will determine whether the resulting model has a continuous surface, or it may miss some geometry at the top of your head, leaving you with a big gaping hole at the top of the model.  The "hole in the head" jokes get tiresome quickly, so be prepared.

Here's those "disconnected vertices" that can cause hell for your slicing program.  Luckily, Skanect contains some handy tools to solve those problems for you.  There's a "Watertight" command available which auto-magically fills in any gaps on the model, eliminating some of those missing, floating, enigmatic vertices. 

If you're using the demoware version of the software, you're limited to outputting models with 5000 faces.  That may be enough resolution for you, and it also keeps the files down to a manageable size.  Should you decide to spring for the paid version ($150) of the software, you can now save a much more complex model, sometimes surpassing a million vertices.

5000 polygons
1 Million Polygons

Striking resemblance, no?

It's hard to see in the image, but the sensor was even able to detect the fuzzy texture of my sweater that day.  The brown you see is undissolved support material (I was in a hurry to see this, and didn't wait around for the cleaning tank to finish).  The above model was well over a million vertices, and the file ended up being about 100 MB.  I never cease to be impressed with the fine rendering of organic curves by my Stratasys 3D printer.

Depending on how much of a graphics oriented computer you're using, and how well developed the slicing software is, that can put an unruly load on your computer.  Skanect also allows you to simplify the model to any number of target vertices you specify.  There's definitely a fine balance to be struck between resolution and file size.  One useful target is <25,000 faces, under which you can easily import the shapes into Solidworks, for more powerful 3D manipulation. 

For those of us on a budget, there's always MeshLab

An interesting command to know in MeshLab to change the face count of your model is "Quadratic Edge Collapse Decimation".  This command allows you to simplify your mesh to a target number of faces.  You lose some resolution in this process, but also may lose the unwieldiness of a humongous file.  This allows you to reduce the resolution on a model to the point that you end up looking like Max Headroom, glitches and all.

MeshLab also has some limitations for opening unwieldy files, so keep that in mind when you initially export the model from Skanect.  I've found it's easier to reduce the size of the file when initially processing the scan, rather than upon exporting the STL. 

Come by the shop sometime for a 3D printed selfie.  In the meantime, stay tuned to part 2 when we test the dimensional accuracy of the scanner against known references.

Bonus: if you're an LA / OC local, the Long Beach Public Library has a free 3D printing studio open during the week.  I HIGHLY recommend that you swing by and check it out, that's where I made the green print above.  The entire process from scan to print to walking out the door took about an hour.  They also have a seat of Solidworks on a public computer there (!), as well as some other powerful photo and video editing software.  It's a great way to get started with the scanning / printing process without spending a single dollar. 

1 comment:

  1. I would also recommend you to pay attention to data room providers topic. I think it might be really interesting for you