- Notifications
You must be signed in to change notification settings - Fork4
A C# library to read .vox files created with MagicaVoxel
License
NotificationsYou must be signed in to change notification settings
sandrofigo/VoxReader
Folders and files
Name | Name | Last commit message | Last commit date | |
---|---|---|---|---|
Repository files navigation
A C# library to read .vox files created withMagicaVoxel
At the moment it is possible to read:
- the name, size, position and rotation of all models
- all individual voxels including their color and position
- the palette that was used for the model
- the notes stored in the palette
- all raw data related to the scene
- miscellaneous raw data
// Read .vox fileIVoxFilevoxFile=VoxReader.Read("my_awesome_model.vox");// Access models of .vox fileIModel[]models=voxFile.Models;// Access voxels of first model in the fileVoxel[]voxels=models[0].Voxels;// Access properties of a voxelVector3position=voxels[0].GlobalPosition;Colorcolor=voxels[0].Color;// Access palette of .vox fileIPalettepalette=voxFile.Palette;// Access raw data of a chunkbyte[]rawData=voxFile.Chunks[0].Content;
The package is also available onOpenUPM for the Unity game engine.Follow themanual installation or theCLI installation instructions on the OpenUPM page to install the package in your project.
The file format specification made byephtracy is available at.vox file format
Support this project with a ⭐️, report an issue or if you feel adventurous and would like to extend the functionality open a pull request.
About
A C# library to read .vox files created with MagicaVoxel