Using Reprap to bring Minecraft creations to (real) Life

Daisy1 Daisy
Printout1

Minecraft is a great game, but it’s also an amazing teaching tool as well.  This post describes step-by-step how to take your Minecraft creations and turn them into real-world physical objects.

Why Minecraft?

There’s a lot of ways to create models that can be printed on a 3d printer ranging from expensive, high-end professional tools to free, web-based systems designed for beginners but few of these tools offer much terms of support for collaboration.  When they do, the traditional “windows and desktop” user interface (while appropriate for one person working on one document at a time) is far from an ideal experience for realtime collaboration, and their 2-dimensional interface is not necessarily well-suited for working with 3-dimensional objects.

Minecraft on the other hand provides a “virtual Legos” interface for constructing 3-dimensional objects that is immediately familiar to most kids (and adults as well).  This, coupled with a naturally-collaborative environment (the multiplayer game) makes building things together as natural as doing it in real life, with an incredibly low learning curve.

Step 1: Create something awesome

Daisy: She's a big dog Daisy: She’s a big dog

This is Daisy, a multi-story monument designed by my daughter Liberty to commemorate the loss of one of her Minecraft pets (when I say loss it’s unclear if the dog has passed or we simply can’t find it).  The range of things that can be created in Minecraft is extreme, but I’ll leave it to other, more skilled Mincrafters to explain that process.

Step 2: Mark it

Stack Diamond, Gold, Iron to mark the area to export \(buried here so we
get some ground in the model\) Stack Diamond, Gold, Iron to mark the area to export (buried here so we get some ground in the model)

Once you’ve created your masterpiece you have to mark what portion of the Minecraft world you want to print (lest you print the entire world, which would take awhile).  This is done in-game, buy placing a special series of blocks at the corners of the area you want to print.  Start by placing a stack of blocks in this order: diamond, gold, iron at one corner of the area you want to print, at the lowest point you want printed (the diamond block will mark this point).

Marker Tower Screen Shot 2013-03-09 at 9.18.57
AM

Next place another stack like this kitty-corner to the first, creating a rectangle around the object you want to print.  The base of this stack (the diamond block) needs to be elevated above the highest point you want to print (remember we’re marking a 3d space) so it may be necessary to construct a tower to place this marker on.

Step 3: Export

Now that we’ve marked what we want to export from the Minecraft world, we need something to do the exporting.  I use a Python script called minecraft.print() to accomplish this.  This script searches the entire world for the two markers placed in step 2 above.  Once it finds them, it takes all the blocks in-between them and exports them as an STL file, which is a format commonly used for 3d printing.

If you’re not familiar with Github and Python you might need some help getting this to run.  I have created a separate page describing how to do this in detail if you need a hand with this step.

Once you have the script setup you can pause Minecraft and run the script. You’ll need to specify the name of the world you created your model in (just the name as its displayed when you start the game, the script will find the actual files).  You may need to put the name in quotes if it has spaces, etc.

minecraft.print\(\) running in the OSX
console minecraft.print() running in the OSX console

If the script is sucessfull at finding your model you’ll see this message, then it will begin creating the STL file that you’ll use in the next step.

Markers found! If something is wrong \(no markers, too many markers\)
you'll see an error here Markers found! If something is wrong (no markers, too many markers) you’ll see an error here

Now if you look at the contents of this directory you’ll see a file with the name you supplied and an extension of .stl; in our case this file is named daisy1.stl

minecraft.print\(\) output

Step 4: Verification (make sure you got what you want)

Now that we have an STL file let’s make sure we got what we expected.  For this step you’ll need a way to view the STL file; on OSX I use Pleasant 3D for this purpose.  There are many other programs you can use for this, but I’ll leave Google to help you with that process.

Note the missing blocks in the base, this isn't what I want so time to try
again! Note the missing blocks in the base, this isn’t what I want so time to try again!

Once you have a way to view the file, take a look at what you have and make sure that it’s what you’re expecting.  In our case there are some gaps at the base that were captured because our first marking stack was too low, so we moved that stack and re-exported the model.  You may find that corners are getting cut, or perhaps the top of your model is missing (or maybe some unexpected animal has wandered into the scene), etc. so this is a good step to make sure you’re only taking what you want into the next step.

Step 5: Slice

If you’ve used a 3d printer before the next two steps will seem familiar.  If you plan to have someone else print your model you can skip these steps but I include them for completeness and for readers who don’t have experience with 3d printing but want to know more.

Once you know you’ve got what you want in an STL file the next step to printing it is called “Slicing”, where a slicer program is used to turn the STL file into code (specifically, Gcode) that the printer can understand. There are a lot of options at this step, and there are several pieces of software avaliable to slice your model but the key thing to be aware of regardless of what software you use is the scale of the model.

I prefer Slic3r, but use what you like
best I prefer Slic3r, but use what you like best

The STL file that comes out of Minecraft is probably going to be very small, much smaller than the build capacity of even the smallest printers (100x100x100mm).  When you open the STL in your slicing software you’ll notice this.

You can print the model this small if your printer is up to the task, but I recommend increasing the size at least 200%, and in our case we went up to 400% and achieved good results.  At 400%, the smallest surface you can create in Minecraft (a single block) is still big enough for the printer to print safely and sturdy enough to stand on its own and hold weight.

400% seems about right, but
experiment 400% seems about right, but experiment

Once the model is scaled adequitly export the gcode and you’re ready to print!

Step 6: Printing

This step (like slicing) will vary greatly depending on your printer and the software you use to operate it.  Lately I’ve been favoring a piece of software called Octoprint , which makes this process very simple and also makes it easy to monitor the job (and record it as you’ll see shortly).

Monitoring the print job using
Octoprint Monitoring the print job using Octoprint

Four legs, good start so far! Four legs, good start so far!

Regardless of your software, this step consists of preparing the printer, uploading the Gcode file created in the previous step and starting the print job.  Depending on the size and complexity of the model and the speed of your printer, the printing step can take from 15 minutes to several hours.  In the case of our example it took about 1.5 hours to complete the print job, but this video makes it look much faster:

http://www.youtube.com/watch?v=HbNt9hUaqv4

Step 7: Clean-up

After carefully removing the print from the printer you may need to clean up around the edges.  As those of you familiar with 3d printing may have noticed early on, there are elements to this example model that are particularilly challenging to extrusion-type printers.  I expected more problems due to this but in the end the model turned out better than expected.

clean-up 1

It’s possible to try to take the printers limitations into consideration while designing the model, and there are “validation” tools that will examine the STL file and try to identify parts of the model that will be hard to print, but my opinion in this case is that trial-and-error is a valid way of discovering these limitations.  In an educational environment, lessons learned this way tend to stick with the learner longer, and require less repetition that trying to ingrain this knowledge before or without experience. Additionally, trying to keep all these rules in mind tends to squelch the creative process, and often times the greatest creations come out of bypassing rules or accidentially creating something new when the results are not what was expected.

clean-up 2 The final output, before clean-up

This is one of the greatest strengths of software development, and with the advent of inexpensive 3d printing it can now be used for the creation of physical objects as well; the capability to rapidly “iterate” over a design from that initial creative spark through realization, testing, refinement and then re-engineering until a desired (or greater) outcome is observed.

What’s Next?

This is neat and all, but I really want to make it possible to do the entire process from inside of the game.  I need to work on my Minecraft hacking skills first, but the goal is to allow a player to create an object, mark it and the press a button inside the game to kick-off a completely automated export-slice-print process.

I’ll keep you updated :)


evernote

1593 Words

2013-03-10 00:00 +0000