Arlorean/Voxels

Is it possible to keep camera orientation from free mouse rotation inside MagicaVoxel to an exported svg sprite ?

niloct opened this issue · 9 comments

Thanks for your tool.

I'm trying to export a specific camera setup from MagicaVoxel after free rotating with mouse, to an SVG sprite with Voxels.CommandLine.exe.

Is this possible ? The SVG file always keep same orientation.

I'm getting .vox sprites from this awesome site: https://rooms.xyz

I appreciate your help.

The SVG orientation is currently fixed. Can you attach a test case to this issue? There might be a quick fix. The site looks great. If you're just looking to recreate the same view that can probably be done more easily than an arbitrary rotation angle.

yorkshire.zip

It seems the orientation you set on MagicaVoxel is never exported to the .vox format, according to this: ephtracy/voxel-model#12

Did you just essentially want a way to rotate it 90 degrees so the dog is facing the camera?
image

Yes, but for instance I have another image that would be facing the camera from the left.
Would it be possible to define the angle as a parameter to the command line tool ?

I've been looking at this but the arbitrary angle causes the problem of what order to draw the faces of the voxels. If we were using a 3D engine, with a z-buffer, we could just throw all the quads at it and get the right result, but with SVG we have to do all that face ordering in software. It's doable but not a simple case of changing the matrix rotation angles and you're done.

wizard

I just had it all working, went to commit it and got a "detached head" message. Not sure what I was doing I followed an online tutorial to "fix" it. Long story short I've just lost all my changes. I'll see if I can get motivation to do this again at some point but for now I just feel beaten by git. Sorry.
UPDATE: Phew. Stack Overflow to the rescue!

I really know that pain. Well if it's a comfort everything I ever lost in the same way I got a better coded version later that would not benefit from having the old version restored.

OK. The latest Voxels.CommandLine.exe now supports a --yaw <angle> parameter, although I must have changed a default of some kind as it works with no changes the way you'd like it to:
york7
There is also a --gif option that creates an animated gif as a bonus:
york7
I'll see if I can package it up into a new release.

This is now fixed and will be in the v1.5 release.