Maker Ant Farm: Minecraft Skin Generation with a Kinect

Since my seemingly fragile 3D printer had never left my desk before and even in prime condition could only print an object every 10 minutes or so, I decided that I needed a backup project for the Bay Area Maker Faire last month.  I conscripted Will to help me out on a purely software Kinect based project.  After downscoping our ideas several times as the Faire weekend approached, we eventually settled on generating Minecraft player skins of visitors.  The printer ended up working fine (and more reliably than the software only project), but the Minecraft “Maker Ant Farm” was more of a crowd pleaser.

A visitor would stand in front of the Kinect and enter fieldgoal/psi calibration pose.  We used OpenNI and NITE to find their pose and segment them out of the background for a preview display.  Using OpenCV, we mapped body parts to the corresponding sections of the Minecraft skin texture.  Since we could only see the fronts and parts of the sides of a person, we just made up what the back would look like based on the front.  This was of course imprecise and resulted heads that often looked like they had massive bald spots.  Rather than trying to write some kind of intelligent texture fill algorithm on a short schedule, we just gave all of the skins yellow hard hats (not blonde hair, contrary to popular opinion).  After generating the skin, we loaded it back onto ShnitzelKiller’s player rig in Panda3D.  I had planned on writing full skeletal tracking for the rig, but ran out of time and settled on just having it follow the position and rotation of the user and perform an animated walk.  After walking around a bit watching a low res version of him or herself, the user could enter in a Twitter handle or email address to keep the skin.  The blocky doppelgänger was then dropped onto a Minecraft server instance we had running as a bot that did simple things like walk around in circles or drown.

Minecraft Skin

Despite some crashiness in NITE and the extremely short timeframe we wrote the project in, it ended up working reasonably well.  Thanks to the low resolution style and implied insistence on imagination in Minecraft, the players avoid looking like the ghastly zombies in Kinect Me.  You can see examples of some of the generated skins on @MakerAntFarm.  I hate not releasing code, but I almost hate releasing this code more.  It is very likely to be the worst I have ever hacked together, and I can’t help but suspect it will be held against me at some point.  Nonetheless, for the greater good, it’s up on github.  There are vague instructions on how one might use it in the README.  Good luck, and I’m sorry.

No Comments on Maker Ant Farm: Minecraft Skin Generation with a Kinect

Deep Sheep: A Global Game Jam Entry

Deep Sheep

I spent last weekend at the Entertainment Technology Center (ETC) for the Global Game Jam, designing and programming a game about sheep.  The process of coming up with a game concept in our team of 7 randomly thrown together geeks (though we ended the weekend with 5 [attrition, not cannibalism {though I did get pretty hungry from all the coding}]), was quite a whirlwind.  Somehow we started at a blob of mercury and ended with a dream in which you control an alarm clock being chased and covered by bouncy sheep.  The premise is that you’ve fallen asleep counting sheep, which follow you into your dream.  The sheep try to keep you in the dream forever by smothering the alarm clock and preventing it from ringing.  To win, you must knock all of the sheep off of the clock by ramming into obstacles or falling from heights, and then quickly roll back to the bed before any sheep catch up and reattach.  It plays a lot like a reverse Katamari Damacy, though that was not necessarily the intent.

This is the second time I’ve done a 3d game, and this one came out far better than Robobear Apocalypse, an entry for the Wild Pockets Game Jam.  The engine this uses is Panda3D, another product of the ETC.  It was actually quite nice to learn and use, and I was impressed by how well it worked cross-platform.  It helps that it uses regular old Python instead of proprietary languages that seem to be all the rage in game engines today.   I also learned just how nice it was to have modellers/animators on a game project.  Finally a game that isn’t made up of spheres, cubes, and stock models!

You can download the game on its Global Game Jam page.  The .zip on that page contains the source and a Windows installer.  You can also run the source directly in Linux or Windows if you have Panda3D installed.  It seems most distros have it available in their repos, but if not, there are packages downloadable at the Panda3D site.  It’ll run ok on just about anything that isn’t integrated graphics.   The game isn’t perfect and certainly isn’t bug free, but it is a fun light hearted experience and the result of only 48 hours of work.

1 Comment on Deep Sheep: A Global Game Jam Entry