# Creating Your Own Voxel Model

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

{% hint style="info" %}
You MUST use MagicaVoxel Verson 0.99.6.4
{% endhint %}

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 [this site](https://base64.guru/converter/encode/file)
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

```csharp
public class Mod : MonoBehaviour
{
   public static string EggVoxModel = "THIS IS WHERE YOU INSERT THE BASE64 STRING, KEEP THE QUOTATION MARKS";
   // ... your code and stuff ...
}
```

7. Within your Action Event, call the function `DeleteVoxelModel` for each children on your Instance gameobject - `Check out Run Method`.
8. Add the `TestVoxSpawner` component to the instance with the string VoxFile being set to your base64 string - `Check out Add 3D Component`.
9. If all goes well, in theory your item will have a different model.


---

# Agent Instructions: Querying This Documentation

If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://docs.team-wilson.org/readme/voxels/creating-your-own-voxel-model.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
