Spyduck / voxwriter

Blender addon to export to the MagicaVoxel .vox format
GNU General Public License v3.0
46 stars 12 forks source link

Support for multiple objects, setting to use scene units, styling, tweaks #12

Closed wrapperup closed 6 months ago

wrapperup commented 2 years ago

PR was remade because I decided to put the UI changes in it's own branch. Link to old one: https://github.com/Spyduck/voxwriter/pull/6

@Spyduck Hi, this add-on is really awesome! There aren't very many voxelizer plugins (if any at all) for Blender, let alone any as nice as this one, so great job.

I thought it was missing a few useful settings, so this PR adds a few I thought would be great to have. MagicaVoxel has since changed their chunk size limit to 256, so I updated the plugin to reflect that. I've also added settings to tweak how the voxelizer operates on the mesh (also added some styling and operator presets):

image

The 'Selected Objects' setting should be self explanatory. The 'Use Scene Units' and 'Scale' setting let you have consistent units between Blender and MagicaVoxel. When 'Use Scene Units' is enabled, the 'Voxel Detail' setting is ignored. The chunk size is instead determined by the dimensions of the mesh itself and the 'Scale' setting

For example, I have this mesh which at it's longest is about 18 Blender units: image

And the exported mesh in MagicaVoxel (creates an 18x18x18 chunk): image

I would like to expand further on this by letting the user define the chunks/bounds/worlds like in MagicaVoxel, perhaps a setting to make each object it's own chunk? For now, I think these are good to have. Let me know what you think.

alexsafayan commented 2 years ago

This looks amazing!! Are you looking to support multiple-object-export in Magicavoxel?