3D Printing with Kinect
I’ve been working with 3d scanning for over two years now, building my own 3d scanners and writing code to work with commercial scanners like the Kinect. When I started my artist residency at MakerBot, I knew I had to combine 3d scanning and 3d printing. One of the first ideas we had was to set up a 3d photo booth at MakerBot to scan visitors. So I wrote an app called KinectToStl which first launched at the MakerBot NY user group. I modified it a bit based on feedback from that event, and it’s since been fired up for the 3rd Ward Make-A-Thon and Maker Faire Bay Area 2011. Other artists and hackers are exploring the app, like 4nchor5 la6.
I’ve been maintaining a GitHub repository of all the code I write while at MakerBot, and the source is available for download there. If you don’t want to deal with compiling it, there’s also an OSX app available. The project has a few external dependencies that make it slightly difficult to compile right now, primarily because openFrameworks is nearing a release and hasn’t stabilized yet. The source would be most useful for someone interested in recreating this in Processing or another environment.
Once you’ve downloaded the app, plug in your Kinect and start the app, you’ll see three tabs and four sliders.
The first tab is where the relevant options are:
- zCutoff controls how far away your cutoff plane is, in centimeters. Anything farther than this will disappear into the “background” (flat area).
- fovWidth and fovHeight control the field of view (or angle of view) multiplier in each axis. This acts like a “zoom” function, and lets you zoom into the center of the scan.
- stlSize controls the width of the STL file, in millimeters. I generally stick between 60 and 80 mm.
- useRandomExport is an experimental export option that only works when fovWidth and fovHeight are set to 1. It will attempt to do a more natural triangulation of the model.
Once you’ve framed the subject and have your settings right, click on “exportStl”. This will save an STL file to the /data folder next to the .app. They’re named like screenshots, “Kinect Export 2011-05-25 at 18.21.13.stl” These files are ready to be 3D printed. They’re scaled properly, and sitting flat on the bed. Because they have a high triangle count, they can take anywhere from 10-20 minutes to run through Skeinforge.
The second tab (click in the the second rectangle) is for lighting options if you’re having trouble seeing the live preview. The third tab is for more advanced options. I’ll mention a few:
- temporalBlur is what causes the 3d model to fade over time, and helps with the accuracy of the scan. It’s like the “exposure time” setting on a camera: shorter exposure is noisier, longer is more sensitive to motion but less noisy.
- smoothingAmount controls the level of blurring on the model. This can make a visually more appealing or better skeined model at the expense of loss of detail.
- backOffset controls the size of the backing plane. If you want more layers of backing, turn this up.
I’ve found that the best parameters for printing these models are with 3-4 shells and almost 0 infill. They’ll print quickly like this, and should be fairly structurally sound.
I also recommend playing with the “OSX Kinect Application” posted by CidVilas to Thingiverse, it has a lot more options and a prettier interface.
If you’re interested in scanning an object in a more complete way, I recommend taking multiple STL exports from KinectToStl and doing boolean joins on them after cutting off the backing plane with an intersection operator. If someone tries this out, I’d love to see the results!
All the scans we (myself and MakerBot) have been taking with this app are being posted to the 3dphotobooth Thingiverse account. So if you’ve been to any of the recent events mentioned above, check it out!