One of the great features that comes with MagicaVoxel is the ability to import PNG and JPG images into the editor directly. This powerful feature is a quick way to jump start you model creation in MagicaVoxel. In this tutorial we will show you how to import your PNG images into MagicaVoxel.

Learn how to import image files into MagicaVoxel

How to Import an Image into MagicaVoxel

These are the basic steps on how to import an image into MagicaVoxel:

  1. Open up the MagicaVoxel Editor on Windows or macOS
  2. Drag the image into the Color Palette Window
  3. Place the PNG or JPG image directly onto the World Editor

Now that you have a basic understanding of the process of how to import a photo into MagicaVoxel we will dive into the specific steps.

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

To begin you will need either a PNG or JPG image. Now even though you can technically import any image, we recommend using pixel art because it will transfer over cleanly to voxels. Also keep in mind that MagicaVoxel has a max limit of 256x256x256 voxels on the grid. If you attempt to import an image bigger than 256 pixels high or wide, MagicaVoxel will automatically scale it down to fit that grid size. One last thing is that MagicaVoxel does have a maximum on how many colors can be in a scene. The limit is 256 colors. Anything more than that will be clipped.

For this tutorial we decided to use a pixel art background we created that is 256 pixels wide and 128 pixels tall and uses 16 colors. Of course like we mentioned this technique will work with any image. To begin lets open MagicaVoxel. First we will exit out of Model Mode and enter the World Mode.

When you enter World Mode, simply click the cube Model and press the Backspace key on a Windows or the Delete key on a Mac. Your world should now appear empty.

How to Import the Color Palette

Like we mentioned before, MagicaVoxel will attempt to use the default color palette when we import our image into the world creating a strange looking result. To properly import an image into MagicaVoxel we must first import the proper color palette so that our image appears correctly with the right colors in the editor. To do this simply drag the image file on the Color Palette window. Use the image below as a guide.

Awesome! Now MagicaVoxel understands what color palette to use when we import the image. Next we will go over how to get this image in our world.

Import the Image into the World

Now that we have the right color palette, all that is left is to import our image into the World editor. The good news is that this is super easy to do as well. Get the image again, but this time drag it into the World editor. Use the image below for reference.

Once you drag it in you should immediately see your image portrayed in the editor. Keep in mind if you used a larger photo than the max limit, or you have an image with thousands of colors, MagicaVoxel will automatically compress it. This is how our image came out.

A PNG image that was imported into the MagicaVoxel editor

Basically MagicaVoxel just created a new grid of voxels that match the image you just imported. This means you can add, delete and paint voxels in your newly created grid just like any other voxel model.

Where to go from Here

Now that you know how to import images into MagicaVoxel, you can
experiment with the various photos and sprites to create a base for your own voxel models. Let us know if you have any questions.