vengi-voxel / vengi

free and open source voxel art tools - editor, thumbnailer and format converter
http://vengi-voxel.github.io/vengi/
Other
1.11k stars 91 forks source link

VOXELFORMAT: VXM and automation #81

Closed sthewissen closed 3 years ago

sthewissen commented 3 years ago

Hi there! I've been looking to automate some things when it comes to the VoxEdit VXM file format and stumbled across this tool/library. I have a bunch of VOX files & I've been trying to understand the format and how to bulk adjust things.

I'd love to hear from you how much, if anything, can be done with the tooling you've developed.

mgerhardy commented 3 years ago

Currently only the loading part of vxm (and vxr) is reversed. Saving is not yet implemented [1]. So converting from vxm (or vxr) to vox is no problem - but the other way around is not yet done.

Changing the bbox (either increase - or decrease with losing voxels) would be possible. If that is needed a command line option could get easily exposed.

Adjusting the pivot is also possible - but also here, not yet exposed as command line option.

As I see it, there are these feature requests here

Feel free to open three tickets for them and I will implement them as soon as I find the time.

[1] https://github.com/mgerhardy/engine/blob/master/src/modules/voxelformat/VXMFormat.cpp#L29

mgerhardy commented 3 years ago

And if you are looking for the vox loading/saving code: https://github.com/mgerhardy/engine/blob/master/src/modules/voxelformat/VoxFormat.cpp

But there is an open issue with the layers:

mgerhardy commented 3 years ago

bb889a5045de79d57315efe4dd32863d0b82af8f implemented vxm saving. but vxr is still missing - so currently all volumes will get merged into one if you convert from vox to vxm

mgerhardy commented 3 years ago

Oh btw. if you have voxedit running - it would be cool if you could import this vox file: https://github.com/mgerhardy/engine/blob/master/data/tests/rgb.vox and export and attach it as vxm (zipped) here.

mgerhardy commented 3 years ago

Content.vxm.zip

sthewissen commented 3 years ago

Oh btw. if you have voxedit running - it would be cool if you could import this vox file: https://github.com/mgerhardy/engine/blob/master/data/tests/rgb.vox and export and attach it as vxm (zipped) here.

I've tried this, but importing it crashes VoxEdit. Unfortunately 😅 Probably because there are no volumes or anything in there (from what I can tell opening it in MagicaVoxel).

sthewissen commented 3 years ago

Made two new requests for the pivot and bounding box setting.

mgerhardy commented 3 years ago

Closing this issue as the two new issues were created.