Team Wilson Docs
  • PPG 3D
    • API
      • Main3D Function
      • Register
      • Action Events
      • Modify Property
      • Run Method
      • Add 3D Component
      • New Voxel Item
      • Categories
    • Voxels
      • Creating Your Own Voxel Model
      • Models
    • Snippets
      • Lean Monster Addon
    • Resources
  • RageBox
  • Character Creator
Powered by GitBook
On this page

Was this helpful?

Edit on GitHub
  1. PPG 3D
  2. Voxels

Creating Your Own Voxel Model

PreviousVoxelsNextModels

Last updated 1 year ago

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

You MUST use MagicaVoxel Verson 0.99.6.4

  1. Create your voxel model in MagicaVoxel

  2. 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.

  3. Convert it to a base 64 string via

  4. Click the small copy button and copy it to your clipboard

  5. 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

  6. Within within your mod.cs script, paste the text as a public static string

public class Mod : MonoBehaviour
{
   public static string EggVoxModel = "THIS IS WHERE YOU INSERT THE BASE64 STRING, KEEP THE QUOTATION MARKS";
   // ... your code and stuff ...
}
  1. Within your Action Event, call the function DeleteVoxelModel for each children on your Instance gameobject - Check out Run Method.

  2. Add the TestVoxSpawner component to the instance with the string VoxFile being set to your base64 string - Check out Add 3D Component.

  3. If all goes well, in theory your item will have a different model.

this site