In this MagicaVoxel tutorial we will show you how to convert 3D models into voxels so that you can modify them using the MagicaVoxel editor!
Do you want to turn a 3D model into a voxel model that you can edit inside of MagicaVoxel? Depending on the complexity of the model you want to make, there can be a lot setup involved. Sometimes it’s quicker to convert an existing 3D model into a voxel model and just edit that instead of starting a model from the beginning. The good thing is MagicaVoxel has a great feature that can import a traditional 3D model into a grid with voxels, that you can then edit or export from inside the MagicaVoxel editor.
This tutorial uses MagicaVoxel 0.99.6 or newer. If you need help installing MagicaVoxel, view our previous tutorial How to Install MagicaVoxel. There you can find a step by step tutorial on getting MagicaVoxel running on your computer.
Getting Started
Before we get started there are a few things to that you’ll have to know to take advantage of this feature. Like Qubicle, MagicaVoxel only supports the .OBJ model type for conversion. This means that if your model is using the Autodesk .FBX file type or Collada .DAE file type, you will first have to convert that model into an .OBJ file using a software like Maya LT. Maya has options for importing these model types and exporting them as a .OBJ file. If you can’t buy Maya LT another good option for converting is Blender. It is free to download. The other thing to note is that MagicaVoxel does not support importing textures at this time. Once your model is in MagicaVoxel it will come in usually a solid color. However we will show you a trick later in this tutorial on how you can use your existing texture as color palette.
Converting a 3D Model into Voxels
So just to give a quick overview on what we will cover. To convert a 3D model into voxels you must first export your 3D model as the .OBJ type. Then you will import the 3D model into the MagicaVoxel editor using the built-in mesh to voxel converter to make a voxel model. After that we will create a custom color palette for painting voxels based on the original model’s texture. Let’s being by importing our model.
How to Import your 3D Model into MagicaVoxel
In this tutorial we will be getting an OBJ model that we made inside of Maya and importing it into MagicaVoxel so that we can convert it into a voxel model that we can edit.
Before we begin here are a few quick notes. We are using MagicaVoxel version 0.99.2 so if you have an older version you may want to update it so your screens match mine as we go through the tutorial. Also, the model that I’m using in the example was made in Autodesk Maya LT. Maya LT is a lightweight version of Maya, a 3D modeling program. The thing to note here though is that it supports exporting .OBJ models which is what we will need when importing the model into MagicaVoxel. However, if you don’t own Maya LT you can also download Blender, a free open-source 3D modeling program. Blender also supports exporting models in the .OBJ format.
So go ahead and fire up MagicaVoxel. Make sure you are starting with a new project. There should be a blue cube on screen.
Now that you have a new model file its a very easy and straightforward process to convert your model into a voxel model. The model I will be using is a Taxi model that looks like the image below. Note that this file is a .OBJ model.
Next we are going to import the model into MagicaVoxel. This process is very simple. Open up Finder on your Mac or Explorer on Windows to where your model is located. Also make sure you have MagicaVoxel open as well. All you have to do is literally drag your model file into the main editor window in MagicaVoxel. Use the image below as a guide:
In earlier versions of MagicaVoxel the cube would have disappeared. But since 0.99.6, MagicaVoxel will create an entirely new model for your imported OBJ file. To view it simply delete the cube first. Also we find that changing the camera type to Orthographic helps us visualize it better. To do this click the Orth button at the bottom of the editor. If you imported it successfully you should see a voxel model that at least somewhat resembles your original OBJ model. As for us, you can kind of make out that it was a taxi. Double click the model so that you are in Edit mode for this specific mode. The arrow at the top next to the size should be facing up like the image below.
This is great, but it would be nicer if our model had a little more detail. A cool feature when converting a model into voxels using MagicaVoxel is the ability to set the resolution of the voxel model. If you look towards the top-right of the main editor window in MagicaVoxel you’ll notice three numbers. Change it to 100 100 100 like the image below.
Then drag in your model again like before. When you do you should notice more detail in your voxel model. However, remember to delete the old taxi model that is smaller. Like we mentioned before, anytime you import a model, MagicaVoxel will make a brand new model and leave the old model there.
How to Import Your Model Texture as a Color Palette
As you can start to see our taxi cab is starting to look more defined. However you might be wondering why our taxi cab is blue. This is because at the time of this writing, MagicaVoxel does not yet support importing textures that are applied to models. You will have to reapply any colors that were on the original model
Fortunately we have come up with a way of getting it started so we can kind of speed up the process of applying colors. Right now MagicaVoxel is using a default color palette that’s included when you create a new model file. In my case it randomly selected a light blue. The cool thing is you can actually import custom color palettes inside of MagicaVoxel. Using this feature we will actually import the original model texture that way we have access to the color palette that was on the original model. To import your original texture move your mouse to the bottom left of the editor window.
When you click this button you should get a load file dialogue. Navigate to where you have the texture file for your original model. It is worth noting that this has to be a image type supported by MagicaVoxel such as .PNG or .JPG. When you find it click Open.
As soon as you do that you should notice a change in color of your model. That is because the old color palette was overriden with your new texture file.
As you can see you now have access to all the different colors that where on your original model. This makes it easier when you start painting the details. After about a minute of painting this is how our model started taking shape.
Where to go from here
Congratulations! You can now import your own models into MagicaVoxel and start editing them however you wish. Although the feature is still being constantly improved, this alone can save you hours to time from having to manually create your voxel models from scratch.
To learn more about MagicaVoxel, check out our post MagicaVoxel Tutorials