A Blender add-on for Voxel 3D models.
Description: streamlines optimising MagicaVoxel models to be used in Unity, can also create low level-of-detail version of models.
Note
The default parameters that my team found fit Unity best will be included in the attached images.
The add-on relies on two existing add-ons and won't work without having them installed in advance:
- VoxCleaner v1 by Farhan Shaikh - Github repo.
- Texel Density Checker v3.3.1 by Ivan Vostrikov - Addon page.
It could work with different versions, but these are the ones that were tested.
Tip
You can read how to install Blender add-ons here or find another guide online.
- Install the dependencies.
- Download
UnitySettings_1_1.py
and add it to Blender.
Model
- will define the size of the texture map.Island Margin
- used while packing islands.Set TD
- parameter that Texel Density Checker needs to change TD.New Model
- quickly import a new Obj and remove anything extra from the scene.
Auto Export
(recommended) - whether processing will prompt to export the Texture and Obj(s) automatically. (couldn't get Blender to save without needing confirmation, might change in the future)Texture Path
- location for the Texture to export to.Flip Z axis
andScale
- will auto select these parameters when exporting.Model Path
- location for the Obj to export to. (Will also be used for low LOD version if created)
Caution
If Auto Export
is unselected, the "path" inputs will be replaced with manual Export
buttons. Remember to export both the Texture and Obj after you're done processing!
Note
If a low LOD model was processed, the Obj panel will update to reflect that.
Use smart process
(recommended) - whether to condence all processing steps into a single button click.Smart Process
- runs 7 steps to process the MagicaVoxel (or other voxel art) model and optimise it for using in Unity.
Note
If Use smart process
is unselected you will be able to go step by step:
Start Process
- removes all objects except selected.Prepare For UV
- uses VoxCleaner'sPrepare For UV
.Pack Islands
- cubes projections and packs islands.Update TD
- uses Texel Density Checker'sSet My TD
.Set To Pixels
- snaps islands on Texture to fit pixels.Bake Texture
- uses VoxCleaner'sBake Texture
.Pretty Polygons
- traingulates the polygons so they're more effecient in Unity.
Tip
There is generally no reason in regular usage to go step by step here and it's best to Smart Process
instead.
Decimate
- how much to reduce the face count of the mesh.Process
- decimates the model and creates a low level-of-detail model instead.
Important
In order to create a low LOD version you need to process the model first.
- Select the
Unity Settings
tab (pressN
if it's not open) - Verify that all the settings fit your preferences.
- Click
New Model
and import the model you wish to process, select the model once it's in the scene. - Select
Auto Export
and select a path for the Texture & Obj. - Select
Use smart process
and clickSmart Process
. - Confirm saving in the window that opens.
- If also creating a low LOD verision click
Process
in theLevel of Detail
panel and confirm saving as well.
Note
This is the recommended usage but you can choose to do the process manually if you wish to.