Tutorial
Heading
Jan 19, 2024

Create 32x32 PNGs from MagicaVoxel

I found a way to speed up the process of creating these PNGs in 32x32 size while keeping them color-indexed, without having to use programs like Photoshop

Introduction

I was creating blocks for The Sandbox using a base that we already had. During some research, I found a way to speed up the process of creating these PNGs in 32x32 size while keeping them color-indexed, without having to use programs like Photoshop or other image editors.

The mission

Create / edit 32x32 size PNGs to use in blocks.

Resources

  • MagicaVoxel
  • VoxelEdit

Base creation

First, we create a 32x1x32

MagicaVoxel export from a single view

If you are using a reference or editing a PNG, you’ll need to import its color palette by  drawing the PNG to the palette area. Then, you can directly import the PNG to the viewer where a 32x32x1 space will be created. Rotate it in the X-axis once to position it in the desired view.

PNG rotation in X-axis

Once we have this base, we need to draw what we want to see on the face of the block or edit what we already have.

If possible, it should be tileable for better utilization within The Sandbox engine.

Export

With our pattern completed, we will now proceed to export it. To do this, go to the export menu at the bottom right, click on “slice” and choose where to save it.

Block exportation

The file we saved is a 32 x 32 PNG with indexed colors, enabling us to import it directly into VoxEdit in the block editor.

Import into VoxEdit

First, we should create a new block or open an existing one. Then, go to the upper right menu (block sides), choose any view (top will be the best one, as we will use the top one for the floor), and import the PNG that we created.

VoxEdit importation

Uses

This procedure will allow us to create indexed images or edit others that we already have, as well as add more layers to this image.

Indexed image edition result
Indexed image creation result

Creating additional spaces ahead and modeling what we want to superimpose.

Model superimposition example

Then, we need to perform a boolean operation to merge the layers, creating a new 32x1x32 space.

Boolean operation to merge layers

This proces allow us to create diferent patterns a variants of the same base by rotating the upper layer or experimenting with the different tools that MagicaVoxel has.

Base rotation example

Conclusion

With this process, we can create 32x32 pixel PNGs with indexed colors. These can be used to import color palettes and serve as faces for blocks created in VoxEdit. It provides a wide range of options to experiment with, allowing the creation of different patterns and correction of defects in other PNGs without the need for more complex programs.

Magica Voxel
The Sandbox
Voxedit
PJ Martínez
Lead Environmental Artist
Tutorial
Visual effects in Decentraland - A guide to create VFX without tools
Tutorial
Turning a 2D image into 3D using Blender
Tutorial
Trim textures: a new hope