MagicaVoxel 0.99+ multiple object and animation support
MagicaVoxel version 0.99+, with multiple models with individual rotations and translations, is now supported. The example shipped with MagicaVoxel is the cars.vox
model which has two cars in a larger world (Issue #4):
This also shows off another feature which is the ability to generate animated GIF files from VOX files. By default, specifying --gif
to the Voxels.CommandLine.exe
program will fully rotate the camera once in 2 seconds. Use the --camera-orbits
option to specify how many full rotations to do, with the rotation direction indicated by the sign, e.g. 2 would be 2 full rotations clockwise, -3 would be 3 full rotations anti-clockwise, 0 would be no camera rotations. --frames
specifies the number of frames to generate and --duration
specifies the total duration in seconds.
If there are animation frames present in the VOX file then these will be displayed at the correct frame in the GIF too. There are two sample animation files shipped with MagicaVoxel. deer.vox
just has different voxel models per frame but not different transforms. T-Rex.vox
has transforms and an animated voxel model (--camera-orbits 0
used in this case):
Optimizations have been made to support much larger voxel models now the 256x256x256 limit has effectively been raised to 2048x2048x2048 by use of multiple models. An example of this is on Ultek's Patreon page where a terrain model was created out of multiple smaller models:
Extra command line options have been added to address the create thumbnails for directories of .vox files in a single call (Issue #3) and to be able to specify the --yaw
and --pitch
of the camera when creating the thumbnails (Issue #5). To recurse into directories use the -r
option.
Usage: Voxels.CommandLine [options] <Filenames>
Arguments:
Filenames Filenames or directories to convert.
Options:
-w|--size <SIZE> Size in pixels.
Default value is: 512.
-y|--yaw <YAW> The yaw in degrees.
Default value is: 45.
-x|--pitch <PITCH> The pitch in degrees.
Default value is: -26.
-p|--png Output a PNG file.
-s|--svg Output an SVG file.
-g|--gif Output an animated GIF file.
-v|--vox Convert PNG file to VOX.
-f|--frames <FRAMES> The number of frames for the animated GIF.
Default value is: 30.
-d|--duration <DURATION> The duration for the animated GIF in seconds.
Default value is: 2.
-c|--camera-orbits <CAMERA_ORBITS> The number of camera orbits for the animated GIF (0=none, -1=clockwise.
Default value is: 1.
-r|--recursive Recurse into sub-directories to convert.
-o|--output <OUTPUT> Output filename ({0} - path minus extension, {1} - extension).
Default value is: {0}.{1}.
-?|-h|--help Show help information.
Images (PNG, etc.) can now also be converted to VOX file using the --vox
command line option:
NOTE: You will need to rebuild the thumbnail cache in Windows to see updated thumbnails for VOX files that were only displaying a single model previously (like cars.vox):
https://www.elevenforum.com/t/clear-and-reset-thumbnail-cache-in-windows-11.2051/