Mineways Resources

Mineways is a program for exporting Minecraft models for 3D printing or rendering. The home page is here. This page is an in-depth guide to how to use Mineways, and also discusses related resources you may find useful.

Let me know of any bugs you find and features you'd like. The program is open-source and is based on the (great) open-source program minutor written by Sean Kasun - his work gave me a huge headstart. Mineways is a superset of his mapper, with a model exporter and other features added. I wrote this program just for fun, I'm not associated with Shapeways or Mojang. There are other print services that work with Mineways, such as i.materialise and Ponoko, as well as home 3D printers, such as RepRaps and Thing-O-Matics (wiki).

What follows is extensive documentation about each part of the export and print process. If you don't want to wade through it all, at least search on the phrase "Key tip", as these bits are particularly useful.

Offsite Links

Google Groups
Subscribe to Mineways - for just important announcements, like new version releases
Email:
Visit this group

Installation

Installation is trivial, and there not much to add to: Download and unzip (using 7-Zip or other decompressor) to some directory, like the desktop.

Uninstall: just delete the directory. If you created color schemes, there will be a few small entries in the registry: if you really want to clean it all, search for "Mineways" and you'll find them.

Mapping

Double-click the mineways.exe to run the program. Here's basic map use:

Color Schemes

Color schemes allows you to change the color for any block, and - extremely useful for 3d printing - remove any blocks you want from view. Key tip: you can eliminate all glass from your model by setting its alpha to 0 in a color scheme. This part of this video shows how to use color schemes to do this.

How do use a color scheme: From the menu, Add a new color scheme, then Edit it. Change the name "Color Scheme" at the top of the dialog that pops up to something useful, then select any block type to edit it. Color is given in hexadecimal color format. You can use MWSnap (old but free), FastStone Capture (new but costs $20), or other programs to find the hexadecimal (e.g. #787878) color value of any pixel on your screen. 'Alpha' says how opaque a block will appear on the screen, with 255 meaning fully opaque and 0 meaning fully transparent (invisible). Blocks with an alpha of 0 will be deleted when exporting. You can turn off export of all blocks by using the "Hide All Blocks" button. This feature allows you to create separate parts, e.g. a glass roof could be created by then turning on just glass export.

Changing the color will affect the 3D print model's color for only the "solid material colors" and "richer color textures" export modes; "full color texture patterns" (the default on the export dialog) will not be affected (except water, a little bit). To change full color textures' colors, you need to edit the input terrain.png itself.

Selecting a Region

To create a 3D file for viewing or printing you first select a 3D box in your world. Whatever is in this box is exported. Hold down the right mouse button and drag to define a selection area. Key tip: once a region is defined, you can use the right mouse button to select an edge or corner and drag to fine-tune the rectangle.

By default the heights used for the rectangular block are y=62 (sea level) to y=127. The altitude slider at the top of the window determines the maximum height, but usually you'll leave this one alone. You'll use it for selecting areas fully underground or in the Nether. The number keys 0-9 can be used to quickly shift the maximum height; the < and > keys shift the altitude by one.

The current lower depth of the selected volume is shown in the status window at the bottom of the screen as "Bottom". You can change this lower depth at any time, regardless of whether a volume has been selected. The lower depth can be changed in a number of ways. If you click the middle mouse button over a location, the lower depth is set to the height of that location. The [ and ] keys shift the lower depth by one, and so are invaluable for tuning. See the shortcut key list for more program options.

Example: at first, the selected area does not include the terrain below. By clicking on terrain with the middle mouse button, the level is lowered. Clicking again on the unselected area, the lower depth is now set low enough to capture all terrain. Bright pink shows terrain exactly at the lower depth.

In the image on the left an area is selected but the lower depth is too high, so parts of the terrain are not selected. Adjusting the depth downwards selects this terrain.

Key tip: to see what you're doing, export the model and view with the SAP Viewer Complete or other tool. I usually work by adjusting the box size and export options in Mineways, export, then reload the file in the SAP viewer to see the results.

Exporting Models

Select "Export Model for Rendering" from the File menu, or use control-R, and save your file. The resulting file(s) can then be imported into a huge variety of 3D modelers and viewers, e.g. Blender. Alternately, you can select "Export Model for 3D Printing", control-P, to create a model suitable for sending to a 3D printer.

The big difference between rendering and printing is that 3D print models must be solid and well-formed. Currently Mineways treats all blocks as solid, full blocks: half-steps or stairs are treated as blocks, as is every other block. There is also no transparency for the materials, since printers do not currently support this type of creation. Models for rendering can, when full texturing is on, include billboard models for flowers, saplings, crops, and other elements. Note that the billboard locations are added in comments to the output .OBJ and .WRL files. In this way, a dedicated modeler could substitute his own elaborate grass, flower, or other models in place of the simple billboards Minecraft provides.

"My Model's Too Expensive!"

If you export to print and upload to Shapeways, you might be surprised to find that the price is sometimes just shy of a used car. For example, this model of our spawn area is 15 x 9.8 inches in size (about 190 x 125 blocks, 2 mm wide), and costs $633.14. Expensive models happen because either the model is too small, or too large. The problem with small models is that each block itself is massive. If you scale a small model to a large height, the blocks themselves become larger and you have to pay for each block's volume. Mineways can't help you much there, you'll need to use a CAD program to hollow out your object manually. Shapeways has a tutorial on hollowing.

The other problem you may run up against is the blocks are not small enough. This happens with larger models, those 100+ hour darlings you sweated over in Minecraft. The cause is that, by default, Mineways exports the model to print at a safe size. Colored sandstone has a thin wall dimension of 2 millimeters. This means if some wall in your model is less than 2 mm thick, it is in danger of breaking into pieces if printed in color. There are some solutions to the price problem:

By the way, I hear "it would be cheaper using LEGOs" a fair bit. LEGO blocks cost around 4-5 cents a block, 2 mm colored sandstone 3D printed blocks run about 6/10th of a cent. There are advantages to LEGOs (larger, reusable, fun to make) and disadvantages (no textures, not perfect cubes), but LEGO cost is not an advantage.

Model check: the SAP Viewer Complete has a wonderful feature: cross sectioning. You can slide a plane through your model and see the interior spaces. This can help you determine where to place your box for printing, how well hollowing is working, where to build escape holes, etc. On the flip side, this viewer has a defect in its display of tree foliage when viewing render (but not 3D print) exports: from some angles you see through all the foliage. This is from it not setting alpha testing properly; use G3D instead if you want to preview for rendering (it also loads faster).

SAP Viewer Complete: on the top, the wonderful cross-section viewer in action. Below, leaves look fine in the left view; on the right, leaf cutout problems.

By default, Wavefront OBJ *.obj (and *.mtl) files are exported for rendering, VRML97 (aka VRML2) for 3D printing. Here's the rundown of the various file types you can select, including some subtleties about each.

OBJ, relative and material preview: Wavefront OBJ is an old format, so is commonly supported as an import format for a huge range of applications. The "material preview" version of OBJ works well with the free Blender package, letting you see colors of objects in interactive mode, before rendering. If you export materials, a corresponding *.mtl file is output; if you export textures, a *.png is also created. The .obj and .mtl files are text files, so can be easily edited or processed further. In addition, relative indices are used on faces. These allow you to concatenate two or more OBJ files into a single OBJ file. Currently Shapeways does not read in color OBJ files, so any OBJ files zipped and uploaded will print only in a solid material. Use VRML97 to export color files for 3D printing.

OBJ, absolute and true spec: This variant of OBJ is worth trying if you see anything odd (or nothing at all) when reading in the default OBJ output. A subtlety of OBJ is how the material file should influence the texture file. Many viewers, like the SAP Viewer Complete, will multiply the texture by the material (specifically, map_Kd times Kd). This is technically correct. The "material preview" is the default only because it helps in Blender's interactive preview. By selecting "true spec" for the OBJ file, a material file is generated where Kd is always white and so will have no real effect. Indices are absolute (positive), for those readers that don't read relative indices correctly. If for some reason you want "relative and true spec", just write the model out twice with the same name, to different locations in the two OBJ types, and mix and match.

Binary STL: This file format is commonly used by 3D printers. It normally is used for single-color materials, but the exporter will used either the Materialise Magics or VisCAM format to attach colors to triangles - see this article. When STL files, binary or ASCII text, are exported a corresponding *.txt file is generated with information about the model. This same data is included in the beginning of the *.obj and *.wrl files themselves.

ASCII text STL: A variant for 3D printers, the file generated is considerably larger than the binary form and cannot include color. The main advantage is that this file type is a simple text file and so can be easily edited. The format is trivial and so can provide a raw set of triangles for a model.

VRML97: Also known as VRML2 or VRML 2.0. While this format has been superceded by X3D, it is commonly supported by a wide range of packages. That said, its main reason for existence here is that it's the one file format that Shapeways uses for colored models. The *.wrl and *.png file created are put into a zip file and uploaded to Shapeways for printing - see more about this process below. The VRML file produced is tailored towards making a single texture for printing. When previewing, this is the best format to use with the free SAP Viewer Complete.

Rendering Tips

This section covers the basics on importing Mineways files into various renderers. I know little about particular renderers, so rely on you guys out there to inform me. I'd love information on 3DS MAX, Maya, Blender, Octane, etc. About all I know about Blender is that their beta does not import Mineways' OBJ files well; use the release version.

That said, if you want better geometry and other features, you should try out mc2obj; Mineways' focus is on 3D printing more than rendering. While I have your ear, you should also check out OptiFine for in-game play: it has lots of cool rendering options.

Previewing: to quickly check results before importing into a rendering program, consider using an interactive previewer. The SAP Viewer Complete is a good previewer for 3D print models, but not so fantastic for viewing models made for rendering. I recommend the G3D viewer when using full color textures. It does not have cross-sectioning and supports only OBJ files, but has much better transparency support and shadows, loads much faster, and has screenshot and video capture built in (note: the viewer32.exe is the one that supports video capture). Unzip and double-click the register.bat file to associate it with OBJ files (or just do this manually, if you prefer). Here's an example, side to side, of this set of sampler files, which show one of (almost) every block in Minecraft.

On the left, SAP Viewer Complete showing the VRML (WRL) printing file; on the right, G3D on the OBJ rendering file:

Blender

Here's a quick tutorial from Alexander Boden, who's just learning Blender himself, along with my own additions; if you have anything to add, let me know. This is for Blender version 2.61.

1) Open your World in Mineways, select the area for exporting (hold right mouse button and drag the rectangle), and choose "File -> Export Model for Rendering" from the menu.

2) "File | Export Model for Rendering" and save the file as a Wavefront Object (.obj) to a folder of your choice. Let's call it myobject.obj or whatever you like. You can just click "OK" in the dialog with the export settings.

3) Open Blender 2.61 and click anywhere on the screen to make the splashcreen disappear. Then, click on the cube in the middle of the scene, hit "x" (or "delete"), and then "Enter". This deletes the cube.

4) Now, import the model we have just created by selecting "File -> Import -> Wavefront (.obj)" from the menu. Search and select the right file (the .obj file) and click "Import OBJ".

If you cannot select Wavefront from the Import dialog, you have to active this file format first from the settings menu. Select "File -> User Preferences", activate the "Addons" tab, and scroll down in the list until you find "Import-Export: Wavefront OBJ format)". Just activate the checkbox at this entry, dismiss the settings dialog and try importing again.

5) The model we have just imported is probably small. Move the cursor to the center of the screen, hit "s", and move the mouse until you have the right size, then click the left mouse button to save the size. You may have to move in a different direction if the model is flipped upside down.

6) Turn on textured display: click the "n" key and a menu should appear to the right, the view properties menu (sometimes this hotkey is flaky - you can also find the Properties menu at the bottom of the View menu; look for the View menu in the lower left of the screen). Near the bottom is "Display". Open this menu by clicking on the arrow to the left of the word "Display". Near the bottom it says "Textured Solid" - click this box. You should now see the model as textured. Just above, for "Shading:", you can select "GLSL" for faster rendering. Click "n" again to dismiss this menu.

7) You are now ready to do a first render of your model. Just select "Render -> Render Image" from the menu and have a look. The lighting and view is probably not so great, and the background is a boring grey. So next you will want to position the camera and set the lighting and background.

If you are already happy with your result, you can select "Image -> Save as Image" from the menu near the left bottom of the screen, or hit F3.

8) Go back to the interactive view by hitting "F11". Move your view around with the middle mouse button. You can rotate by dragging with middle-mouse, or hold down shift and you'll pan, or hold down control and dolly. Once you like the view, click Control-Alt-Numpad 0 to set the camera to your view.

If you found the right angle and perspective for your camera, you can finetune a couple of parameters in the camera menu. This can be found by clicking the small film-camera (not the photo camera) symbol in the upper half of the right menu bar, below the scene graph. When you click it, a section called "lens" should appear. You can set the "Shift" of the X and Y axis, as well as the focal length of the camera.

8) There is one predefined lightsource on the working area (which looks like a dot with two enclosing dotted circles). You'll usually have to zoom out to see it. You can right click to select it, or select the Lamp from the Scene tree menu, and move it around the screen by selecting the red, green, and blue arrows and dragging. Then, select the Lamp settings in the same menu bar where you (hopefully) found the camera symbol. It looks like a small sun with four arrows pointing away from it in different directions. Click it, and you can find all kinds of parameters that affect the lighting of your scene. For example, try exchanging the "point" type for "sun", and play with the "Energy" value. You can also change the color by clicking the color field above the Energy settings. You can add Lamps from the "Add" menu in the upper left.

In order to achieve a more even lighting of your scene, select the "Ambient Occlusion" setting from the menu bar where you also found the camera and the lamp settings (in the parameters section, below the Scene list in the upper right). It appears when you click the small world icon in the row of icons. Play with the "Factor" value in this section, I like something between 0.25-0.5. In this menu, you can also set the background of your scene in the "World" section. Pick the "Real Sky" option and set horizon and zenith colors as you wish.

9) Now for the brutal part, for transparent objects like glass, water, and for all "cutouts" such as flowers, mushrooms, wheat, etc. For each of these types of meshes you must select the mesh, select the Textures icon in the parameter area below, select the "D" texture (the image will look mostly black and white), then scroll down and check the "RGB to intensity" box. I'm working to make this easier, but right now you need to do this for every different material that has a "D" texture. Naughty Blender, that doesn't let you pick multiple materials and edit parameters they have in common.

At the same time, you must also choose every mesh that receives shadows, select the Material icon (to the left of the Textures icon), and under "Shadow" at the bottom you need to click "receive transparent". Why this isn't the default...

10) For glass, you can make it more realistic by selecting the glass objects, go into the "Material menu", and set the Transparency to Raytrace. Then, you just have to set Fresnel and Blend to 2.000, IOR to 1.500 and Depth to 8.

11) When you are happy with your scene, your can export it by selecting "Render -> Render Image" as described in step #6, and then selecting "Image -> Save as Image" from the bottom menu on your screen. You can also set several parameters of the Renderer by selecting the small photo camera icon in the menu bar where you also found the film camera, the lamp, etc. In the section "Dimensions", you can set the Resolution of the image and add a border, etc. In order to export Full HD, you can set the Resolution to X:1920 and Y:1080, and set 100% in the bar below these settings.

12) Upload your creation to the Mineways Flickr group! (Optional, but extremely recommended!)

Cinema 4D

Here are steps from James Christien (icecruiser xD; example C4D result here), with help from Huskiee on alpha.

Step 1: Get your world and region selected in Mineways, then select 'Export Model for 3D Rendering'.

Step 2: Save as the file type 'VRML'.

Step 3: Adjust your option accordingly:
- Tick the 'Export full color texture patterns' button.
- Make the model 1000 CM in height so it's not super tiny in Cinema4D (optional)
Do everything else to your liking.

Step 4: Once the model is exported, open Cinema4D and drag into the main window the 2 files (.png and .wrl) generated.

Step 5: Once it is all loaded, if black ugly things are present on tiles - such as grass or torches - then double-click the material in the materials viewer. The materials viewer is the round sphere with materials on it, at the bottom of the interface.

Step 6: On the material options, on the left side options bar, check the Alpha option and go into its preferences window by clicking it after you checked it.

Step 7: In the alpha settings, come down to the Texture setting and click on the little arrow on the right, go down the menu and select Bitmaps, and choose the material name (there should only be one) in the small window that pops up after clicking Bitmaps.

Step 8: All the black things should be gone, ready to be used and rendered properly.

3DS MAX

No real information here yet. There are lots of options for importing OBJ files in MAX's dialog. See the mc2obj User manual for some typical OBJ settings, in particular this image.

Export options

There is a bewildering dialog that pops up on export, with a ton of options. You can blithely ignore this option and always just click OK (or the Enter key). However, some of the options are extremely useful, so plow on if you want to make sure your model is strong enough and still cheap as can be.

World coordinates selection: you can see and change the 3D volume of space to export from your world. Key tip: You can view the output *.obj or *.wrl with a text editor, like Notepad (or, better yet, Notepad++). By doing so, you'll see a line like this:

# Selection location: -80, 72, 66 to -66, 127, 104
By putting these numbers in the 6 coordinate boxes, you can easily continue to work on a model between Mineways sessions. If you want to know the location of a place in your world, use the F3 key when playing Minecraft. Note that negative values like -5.239 will round down to -6, and also note that your Y-value altitude is one higher than where your feet are located, and so two higher than the ground beneath you.

Create a ZIP: like it says, on export a ZIP file of the exported files is created, ready for upload for 3d printing at Shapeways or other service. Note that the exported files themselves are also still immediately available for previewing.

Material export: these are pretty much as they say. The "no materials" option is just that. "Solid material colors" will give solid swatches of color for each material. "Richer color textures" gives texture tiles that have some noise in them. For the OBJ file format the difference is that a PNG texture file is output; VRML97 always exports a texture for any material option. "Full color textures patterns" requires the terrain.png file (look at the start of this page for more info), reading this file to create full textures for each block, as possible. Some blocks, such as fire, do not have any texture in the terrain.png image, so are rendered as solid blocks. Remember that for any format you can always turn off a block from being output by setting its alpha to zero in your own color scheme. For "full textures" the color scheme has no other effect, other than affecting the water color: the higher the alpha set, the more of the base color you define is combined with the water texture. So, for a deeper blue, you can define the two water colors (note there's a "stationary water") as dark blue or even black and a high alpha, e.g. 200.

The one file you may want to change is the terrain.png file that comes with Mineways, which is from the Ancient Roots texture pack. Minecraft itself and all texture packs make their own terrain.png files. If you unzip a texture pack, you'll see the terrain.png inside. To select a different terrain.png file, use the "Select terrain.png for export" under the File menu. If you have a terrain.png file you would always like to use by default, copy it into the directory where mineways.exe is located, replacing the one that is there.

Note to terrain.png experts: I do use the four tiles in the rightmost column, at the bottom, for water and lava (water, stationary water, lava, stationary lava). One warning: 128x128 and larger tile texture packs will work (and will take awhile to process), but previewing these files in an interactive viewer like the SAP Viewer Complete may not work. This is because DirectX and OpenGL has limitations on the maximum texture size. These texture files should display fine in offline renderers.

The tiles are each given a border 1 pixel wide. This border avoids bilinear interpolation artifacts. However, mipmapping will not work well, since tiles are next to each other, so disable it for rendering (other sampling techniques should work fine). If you cannot disable bilinear interpolation in your renderer and want a more blocky look, take your terrain.png file and resize it to be say 4x larger in both directions; alternately, resize the texture(s) that Mineways exports. Make sure you just use a "pixel resize" without any filtering, e.g. in IrfanView use "Resize (faster)". Download this example and put this one in place of the terrain.png in your Mineways program directory to see the difference. This higher resolution may improve the clarity of 3D texture printing - we're not sure at this point.

On the left, the basic 256x256 terrain.png file is used; on the right, the input terrain.png image is resized (without filtering) to 1024x1024.

Make Z the up direction instead of Y: some graphics applications consider the Y direction to be "up", some Z. If your model imports sideways into your application, check (or uncheck) this box.

Center model: when checked, the center of the bottom of the model is put at the origin, location (0,0,0). This helps for import into a renderer, and can improve the floating-point resolution of the data. If you want to instead have the same coordinate values as in your world, uncheck this box.

Export all block types: by default smaller objects, such as flowers, signs, etc., are culled out when exporting solid materials - only nearly-block-sized or important blocks are exported. This option is on by default when exporting full color textures for rendering; turn it off to remove the "billboard" objects. Remember you can also turn off output of any block type by setting its alpha to zero in your own custom color scheme.

Merge flat blocks with neighbors: some blocks, like redstone wire, repeaters, snow, ladders, wall signs, etc., can be glued onto neighboring blocks, changing their faces. By default we do this; turning this option off (why?!) will generate full blocks for these objects. I haven't done much work on this option, as I never turn it off.

The rest of the options mostly have to do with 3D printing, which follows.

Exporting to 3D print

As background, view the Shapeways 3D color printing process video. Layers of material are laid down and solidified at the appropriate spots. Unsolidified "sand" is vacuumed away. You pay by volume, not by complexity. What this means to you is: avoid making enclosed spaces with tiny entrances. Unfortunately, most buildings are just that: large rooms with small doors. Your job is to make sure your model has either no openings at all, in which case the Hollow option can clear out the inside, leaving just a shell. Alternately, make escape holes yourself using snow blocks, which you then melt after all processing of your model. I'll explain these options below.

There are other potential pitfalls with 3D printing, such as thin wall problems (more here), and too many polygons (rare for a Minecraft model), to name just two. Shapeways' tutorial pages and materials pages give you a lot to chew on. The Mineways program tries to guide you past the major pitfalls, but it's always possible to generate something that's essentially unprintable: too weak, holes too small to clear out the dust, etc. Browsing the tutorials there should help you understand what is possible.

Options follow.

Rotate model clockwise: this is useful when you want to display a model on Shapeways. The view of the model is rendered by Shapeways from the south-south-east. So if your model faces west, you might rotate it 270 degrees to have it face south and so display better on your models page.

Scale: There are four major ways to scale your model. For 3D printing, Mineways assumes the units are meters. If you want centimeters, as some home printers use, you currently have to multiply the values input by 100. For example, if you want to print 1 millimeter wide blocks, you have to put 100 millimeters instead. A units option will be added soon.

Physical material: choosing a material here from among the more sensible Shapeways material options sets the default wall thickness and constrains the "Aim for a cost" option. It also ensures that the price is computed for that material and output in the top of the model file (or associated *.txt file, for STL output). It's worth saying again, key tip: view the top of the output model file in a text editor for all sorts of useful information about the model and how you generated it. The "White & Flexible" material has a smaller minimum wall thickness compared to "Colored Sandstone" (0.7 mm vs. 2.0 mm), so much smaller (and cheaper) models can be created in it. White & flexible is plastic and pretty durable, colored sandstone is heavier, fairly strong, but brittle. Shapeways has a tutorial on how to paint this material, which can be fun in itself. Note that the ceramics material has a maximum wall thickness of 15 mm, something Mineways does not check; this material is also the only one where you are charged by surface area instead of volume.

Model's units: when a model is saved, the values stored are not in any particular units, like meters or inches. However, 3D printers need this scale for printing the model. Meters are assumed, as this is what Shapeways uses by default. For other services and printers, other units are assumed. Here's a brief rundown: