Extension to import MagicaVoxel (.vox) files. Supports multiple meshing, color, and material modes as well as joining all meshes and adjusting the voxel size.
This options determines whether the hierarchy from MagicaVoxel is imported as empty axis objects in blender and all transformations (translation and rotation) are applied hierarchically. If not, all transformations are calculated and applied to each model and no hierarchy parent structure is created.
This option allows all models in the MagicaVoxel file to be merged into one. Joining is done on a voxel basis and before meshing which is superior to just combining the blender meshes for generating the voxel hull and greedy meshing.
The voxel size parameter can be used to define the unit voxel size. The example below shows a voxel model imported with voxel size 1.0, 1.5, and 2.0.
MagicaVoxel files contain a color palette and additional material properties per color in the palette. This addon supports different modes how this information is imported.
⚠️ Please note: Additional material props are still experimental and under development
Mode | Description |
---|---|
Ignore | Neither colors nor materials are imported. |
Vertex Color | Only the color palette will be imported and assigned to face vertex colors. A simple material is added using the vertex colors as 'Base Color'. |
Material Per Color | A material is added per color in the color palette and assigned to the faces material index. |
Materials As Texture | The color palette is created as a 256x1 texture. A simple material is added using this texture. |
Textured Models (UV unwrap) | Each model is assigned a material and texture with UV unwrap. (Only usable/sensible for Greedy meshing) |
Depending on the material mode, additional material properties are either added as a separate vertex color layer, texture, or blender material nodes.
Mode | Description |
---|---|
Vertex Color + Prop | The color palette and certain material properties are assigned as vertex color layers. A simple material is added using the vertex color layers. |
Material Per Color + Prop | A material is added per color in the color palette and assigned to the faces material index. Additional material properties are stored for each material. |
Materials As Texture + Prop | The color palette and certain material properties are created as a 256x1 texture. A simple material is added using these textures. |
Textured Models (UV unwrap) + Prop | Each model is assigned a material and textures with UV unwrap. (Only usable/sensible for Greedy meshing) |
To simplify the workflow from MagicaVoxel to "Game Ready" assets the "Textured Models (UV unwrap)" material model generates textures for base color, emission, roughness, and metallic in combination with UV unwrapping the model faces onto these textures.
As game assets are generally only sensible as optimized meshes, this material mode is only usable/sensible for the "Greedy" meshing mode.
This option is only available for certain meshing types and implicitly active for others. If checked, each model is analyzed to find the voxel hull and all other voxels inside the model are deleted/ignored.
This addon supports different methods of representing the loaded voxel models.
Voxel as models meshing generates a six-sided cube for each voxel as separate models. Depending on the voxel hull option, cubes are only generated for the hull or all voxels defined in the model.
⚠️ Beware that this option may be slow as alot of cube models may be generated!
Simple cubes meshing generates a six-sided cube for each voxel combined in one mesh per model. Depending on the voxel hull option, cubes are only generated for the hull or all voxels defined in the model.
Simple quads meshing generates the voxel hull of all models and creates only faces where voxel cube faces are visible from outside.
Greedy meshing is equivalent to simple quads as it only creates faces of the voxel hull visible from outside, with the addition of greedily joining quads where possible.
Adjusted addon for new extension format
This extension requests the following permission:
Import VOX from disk