Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

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

Closed
niloct opened this issue May 8, 2023 · 9 comments

Comments

@niloct
Copy link

niloct commented May 8, 2023

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.

@Arlorean
Copy link
Owner

Arlorean commented May 9, 2023

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.

@niloct
Copy link
Author

niloct commented May 9, 2023

yorkshire.zip

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

@Arlorean
Copy link
Owner

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

@niloct
Copy link
Author

niloct commented May 10, 2023

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 ?

@Arlorean
Copy link
Owner

Arlorean commented May 30, 2023

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

@Arlorean
Copy link
Owner

Arlorean commented Jun 2, 2023

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!

@niloct
Copy link
Author

niloct commented Jun 2, 2023

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.

@Arlorean
Copy link
Owner

Arlorean commented Jun 2, 2023

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.

@Arlorean Arlorean transferred this issue from Arlorean/Voxels.Core Jun 10, 2023
@Arlorean
Copy link
Owner

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

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants