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 - BRANCH CHANGED #6

Closed wrapperup closed 2 years ago

wrapperup commented 3 years ago

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

wrapperup commented 3 years ago

@YgorSouza Hi, yes I should have done that. However, I didn't since the original repo didn't have it. Still, I think it would have been a good addition anyway.

I may continue developing as I use it for my own project, or at least until something better comes around.