This is heavily based on the Planet Minecraft tutorial How I Convert 3D Models Into Minecraft without binvox.
Note- don’t leave this page/site open in your browser. At least for me, the embedded videos, ads, etc seem to leak memory and eventually slows my machines down to a crawl.
The Schematic used in the screenshots is 'Millennium Falcon Flying.schematic', which is, as the name implies, the Millennium Falcon from Star Wars. Megatech rebuilt it inside MineCraft and was nice enough to let people have the schematic of it, downloadable here. Import schematics, export schematics, build schematics. All inside Minecraft! - Old-Chum/Schematica. Such as Github for Windows/Mac, SmartGitHg, TortoiseGit, etc.
There are several other tutorials on the internet that use binvox. The advantage of poly2vox is that it can read texture data and create full coloured voxel versions of 3D models.
Aside: If you’re interested in other Minecraft mapping tools, then this page is for you!
Input
I usually capture scans of people and items using an XBox 360 Kinect 1, Skanect software, and a human-size turntable.
The Turntable is made from plywood and powered by a second hand power drill driving the reduction gearbox from another, broken drill. It’s inspired by the Scan-o-Tron, which has a great set of write-ups, both on Thingiverse and Make magazine.
In the past We’ve tried photogrammetry using 123D Catch and VisualSFM. There’s a lot of potential to get higher resolution and more accurate 3D models using this technique. But there is a lot more processing required, meaning it takes longer to see the results. And in our limited attempts I had more reliable results using the kinect and skanect combination.
Or I find cool 3D designs online- for example on Thingiverse.
Pre-Processing
The input models often need some tweaking before they are usable as Minecraft schematics.
For kinect scans I use the reconstruction tools in Skanect to make sure the model is watertight (no holes) and doesn’t have any disconnected chunks. It takes care of creating ‘textures’ - image files that get wrapped onto the 3D geometry and give it the appearance of having a lot more details.
Sometimes further fixes to the mesh and texture are needed. I use netfab basic, meshmixer, meshlab, and/or blender.
The tools used to create objects in Minecraft create the shapes out of blocks that can be coloured. These blocks (e.g. wool and clay) have a palette of only 16 colours. So the texture image for the 3D model to be converted has to have an exaggerated and brightened palette. I often use Mac OS X’s built in preview application. But something like The Gimp gives you more control and options.
Conversion to Voxels
So far, [polyvox][] is the best tool I’ve found for vowelizing models. Ken Silverman, creator of poly2vox, includes both a Windows executable and the source code. I did briefly start work on trying to adjust the code to compile and run natively on Mac OS X, but quickly ran out of time.
Luckily it runs just fine using Wine:
Typing wine
and the full path to where-ever you put the poly2vox
executable quickly becomes tiresome.
So I moved poly2vox
to usrlocalbin
and created this poly2vox
helper script in the same directory:
Now I can be in any directory and use poly2vox
like this:
The -v128
sets the maximum number of voxels (cubes) in the final voxel model.
I run poly2vox
twice to create two different formats. The kv6
format is used by the next utility kv6toschematic
, to generate the Minecraft schematic file. The vox
format is used for Voxel editors, such as MagicaVoxel.
Aside: You can use slab6
to convert between kv6
and vox
formats. At the time of writing there is some odd behaviour in accessing menus when slab6
is run via Wine. If you use the mouse, the menu never goes away and blocks access to dialogs. Instead, use the alt
key to use the menus.
Conversion to Schematic
The final step: converting to a schematic
file.
To do that I use kv6toschematic. It’s a Java application that reads kv6
files and outputs minecraft schematics
usable by mcedit.
So first, make sure that you have Java installed.
I had no luck running it as a GUI program; it just always exits with a ‘user cancelled’ error.
Luckily it works fine from the command line, which suites me fine:
Again, I didn’t want to be typing the full path to the jar
file every time, so I created another little helper script:
Now I can just type kv6ToSchematic -bId:159 -in:model.kv6 -out:model.schematic
from any place there is a waiting kv6
file.
Automation
After the Vancouver Mini Maker Faire I found myself with around 30 sets of scans to convert.
Time to automate what I can. I created a script that automatically generates kv6
and vox
files in two sizes, and also converts them to schematics
.
Here it is:
So long as the model to be converted is in a directory with the same base name (e.g. “Bob”), and is arranged as per this directory structure it all just works.
Extra: Converting Voxel Files Back to 3D Geometry
It can be useful to have the voxelized (made out of cubes) version of an object available as an stl
file. For example, rendering or editing with blender or 3D printing it.
I found MagicaVoxel does a good job of exporting vox
files to an obj
file that can be used like any other mesh.
Improvements
Schematics For Minecraft Mod
I need to remember to always start from the same position, and have the turntable turning the same way for every scan. Especially important as one of the tools in the chain swaps two axis (Y & Z?). So there are always some rotations needed in mcedit to align the schematic with the world.
If I ensured this, I could programmatically modify the schematic and also add it to a blank world using pymclevel
- which is part of mcedit.
This would save a lot of manual fiddling and time.
File TypeMCEdit Schematic File
Developer | MCEdit |
Popularity | |
Category | Game Files |
Format | Binary |
What is an SCHEMATIC file?
Template file used by MCEdit, a program used to make levels for Minecraft, a 3D sandbox construction game; stores an arrangement of custom blocks that make up part of a level; can be used for storing any type of level objects, including buildings, bodies of water, and mobs.
SCHEMATIC files can be opened in MCEdit by selecting the button while editing a level. Also, schematics can be exported by selecting 'Export Schematic' while the Select tool is selected.
Open over 300 file formats with File Viewer Plus.