Monday, November 10, 2014

Bride hacks into website, decodes proprietary 3D model format to save wedding!!

First off, welcome back to blogging, me! So glad you/I could join us, can't wait to see what you/I write and share!!

I got married in July to another human of nerdy-technical tendencies. We used a Kinect to make a 3D print of ourselves to go atop our cake.

Aww, there we are, printed in plastic

The Scanning



We used a scanning program from Shapify.me, which walks you through spinning around in front of a Kinect. The program says "Turn 45 degrees!" and then the Kinect nods at you, scanning you from foot to head. Then it pauses for a second to let you turn again. When it's done with you, it fuses all the scans together and make a watertight mesh.

It crashed on the first computer we tried, which was running OSX Mavericks, but worked on Snow Leopard. It was kind of tiring to stand still for so long, also to rotate yourself while holding the same pose.

I guess you're not supposed to see the bride/groom in their wedding getup before the special day, but whatever, this was important! We brought the dress and the suit in to school where the Kinect was and did the scanning in the lab. Luckily, it was a weekend around finals and no one was there. I had to pin up my dress so I could spin around. We could have had more dress-train action if we had had someone wave a Kinect around us while we stood in one position, but Richard "Mr. Kinect Fusion" Newcombe was out of town.

The Printing: Color Sandstone 


One of the nice things about Shapify.me is that it integrates directly with a 3D printing service. We paid $70 to get the model we'd just scanned printed in color.


The problem was that the color of the 3D print was kind of icky, due to the lighting in the capture room. The cream color of the dress turned into a dingy gray, especially where the black of the suit bled into it. Our skin had a greenish tinge. My aesthetic bar for this wedding was not that high, but this model did not meet that bar. More photos below.

I needed (also: wanted) to hack something to fix this. Let the headlines read:
"Bride hacks into website, decodes proprietary 3D model format to save wedding!!" 
(Heck, I'm just going to make this the title of the post.)

The Hacking

Shapify.me suggested it would let you download the models if you paid a lot of money to be a partner, or if you paid a lot of money to run your own scanning station (custom built by the company, not just a Kinect). I probably could have asked/begged for the file since I already paid for the print, but like I said, I wanted to be a badass computer bride instead.

Shapify used a web-based 3D model viewer from this other company, Sculpteo, that appeared to be written in Javascript and load some custom binary model format.  I looked at the network log to spot when the webpage loaded the big binary model file and get its URL. I poked at their viewer code and around in the Javascript browser console until I got a handle on the data after it had been parsed and put into a Javascript object for rendering. I looked in that object for the model's vertices and polygons, and then dumped those to a text file that I was able to turn into a .ply file readable by Meshlab.  My experience with Javascript, Chrome debugging, reading and rendering 3D models, even on the web in Canvas and Actionscript... made all this possible.

The Printing: White Plastic

Once we had our own copy of the 3D mesh, we took it to Metrix Create Space in Seattle. A super helpful staff lady offered to print it for us, and even insisted on fixing up the mesh where Adam had a very skinny and unnatural foot.

Printing on a MakerBot at Metrix

Here's the inside of the print, with the honeycomb scaffolding. I don't know why this particular print run got canceled.

Our feetsies/inside a 3D print

Printing took many hours, so we left and came back the next day. We saw ourselves sitting out on their display shelf, but no, that was not the model for us! That was another copy they'd printed to keep and show off because they thought it was neat.

Color vs. White

Here you can see all the details. The gloomy color, the pinned up dress, Adam's adorable bowtie, Adam's messed up foot (shiny shoes don't reflect Kinect IR beams well), the slightly larger size of the plastic print.

Funky Foot

Dreary Dress

Bodacious Bustle 
So the white topper went on the cake, and the colored topper sat on the side as a neat thing to look at. And then they/we lived happily ever after!

Photo by Jeramie Shoda of ShodaLove


2 comments:

  1. Sorry, skimmed over the part about wanting to hack it to fix the issue!

    ReplyDelete
  2. Any further explanation about how to get a stl file from the shapify me program? Without paying. I want to use it with the 3d printer at school (as a teacher), but it's not affordable to pay for the model for each student.

    ReplyDelete