Creating Your Own Voxel Model
Last updated
Was this helpful?
Last updated
Was this helpful?
Voxel models are automatically generated from a vox file, which is converted to a base64 string and put into a property in TestVoxSpawner (VoxFile).
To create your own, you'll need
MagicaVoxel Verson 0.99.6.4
Base64 Guru
Create your voxel model in MagicaVoxel
Save it via the floppy disk icon, and navigate to your saves folder. Exporting doesn't work for some reason so you have to use the save instead.
Convert it to a base 64 string via
Click the small copy button and copy it to your clipboard
Check if the last few characters at the end of the base64 string is both "A" or "=" - If not, this would most likely mean that your voxel model will not appear in game since it's weird like that
Within within your mod.cs script, paste the text as a public static string
Within your Action Event, call the function DeleteVoxelModel
for each children on your Instance gameobject - Check out Run Method
.
Add the TestVoxSpawner
component to the instance with the string VoxFile being set to your base64 string - Check out Add 3D Component
.
If all goes well, in theory your item will have a different model.