This guide will explain step by step how to display MagicalVoxel models in modded Minecraft, using the Voxel Projector from Random Things.
Tested with Random Things v3.7.7.1 for Minecraft v1.10.2 in singleplayer.
This is a Work-In-Progress block. This procedure might not work for later or earlier versions of Random Things.
- Get a MagicalVoxel model (e.g. from https://github.com/ephtracy/voxel-model, or create your own).
- Open your Minecraft directory (the one that contains the
directories
saves
,screenshots
,mods
, and so on). If you're unsure where that directory is, open the Minecraft launcher, click Launch Options, click the profile that you usually use, and click the small green arrow to the right of Game directory. - In your Minecraft directory, create a new directory called
voxmodels
. - Move or copy the model from step 1 into that new directory.
- Extract the colour palette.
Most MagicalVoxel models have an embedded colour palette.
However, Random Things currently doesn't seem to use that
palette. Instead, you will need to provide the palette
in a separate file. If you have more than one model,
you will need one palette for each model.
You have
threefour options here:- The easiest way:
(Thanks to lumien231 (the Random Things developer) for pointing this out on Reddit)
- Download MagicalVoxel from https://ephtracy.github.io/
- Open MagicalVoxel, and load the model, using the Open button in the bottom-right corner.
- Save the embedded palette, using the Save button
in the bottom-left corner. Assuming that your model is called
my_model.vox
, save the palette asmy_model.act
in thevoxmodels
directory from step 3.
- The lazy way: Use the default palette
default_palette.act
from this gist. Models may look weird when they're displayed with the default palette instead of the embedded palette. Store the palette in thevoxmodels
directory from step 3. Then, assuming that your model is calledmy_model.vox
, you will need to rename the palette tomy_model.act
. - The easy way: Use the nifty Python3 script from
this gist. Open a Windows command prompt and do the
following:
cd "path/to/your/Minecraft/directory/" cd "voxmodels" python3 extract_palette.py my_model.vox my_model.act
- The hard way: Manually extract the palette.
You will need to read and write binary data for this.
- Open the model with a hex editor of your choice.
- See https://github.com/ephtracy/voxel-model/blob/master/MagicaVoxel-file-format-vox.txt
for the
.vox
format specs. Understanding the structure of the model file will make it easier to follow these steps. All numbers are Little Endian. - The
.vox
file contains multiple chunks. Each chunk begins with a four-character ID. Locate the chunk with IDRGBA
. If you can't find it, then the model may not contain an embedded palette. In this case, you can use the default palette from this gist, as described in the lazy way above. If the model does contain an RGBA chunk, then proceed as follows: - Skip 8 bytes after the characters "RGBA", and copy the following 1024 bytes. These bytes contain the 256 embedded colours, encoded as rgba32 (32 bit per colour, 8 bit for R, G, B, A each).
- Assuming that your model is called
my_model.vox
, copy this data to a new filemy_model.act
. - Now, remove every fourth byte from that file.
Random Things requires an
.act
palette, which contains 256 colours in rgb24 encoding (24 bit per colour, 8 bit for R, G, B each, no alpha channel). Since the.vox
file contains rgba32 colours, we need to strip the alpha channel from the embedded colours to create a valid.act
palette. After this step, you should be left with 768 bytes.
- The easiest way:
(Thanks to lumien231 (the Random Things developer) for pointing this out on Reddit)
- You should now have a file
my_model.vox
and a filemy_model.act
, both stored in a directoryvoxmodels
within your Minecraft directory. You can repeat steps 1-5 to add more models. Note that you will need a separate palette for each model. - Before you can see the models in-game, you will need to reload your world. In singleplayer, exit to the main menu and then return to your world. Restarting the game works, too.
- Craft the Voxel Projector from Random Things, place it
somewhere, and right-click to open its GUI. You should
see three sliders and a grey box. If everything went
well then the grey box should contain the model(s) that
you placed in the
voxmodels
directory. Click on the name of a model to display it.