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

How to import vox animations #13

Open
SugarWong97 opened this issue Jan 20, 2025 · 6 comments
Open

How to import vox animations #13

SugarWong97 opened this issue Jan 20, 2025 · 6 comments
Assignees
Labels
enhancement New feature or request

Comments

@SugarWong97
Copy link

Hi,

Thanks for your tool, it is very help for modeling.

May I ask that is any possible to import from vox frame animations ?

@AstrorEnales
Copy link
Owner

Thank you very much for your kind words.

Currently, animation import is not supported. However, it should be fairly simple to implement.
The only question would be how to represent the imported animation. What would your preferred way be?

For example: if we have an animation of 20 frames.

  • Should there be 20 collections with the frame's meshes?
  • Should there be collections only for frames that changed?
  • Should there be an animation track that toggles the visibility of these collections for each frame?
  • Or should there be an alembic Mesh Cache generated holding the entire animation?

I can see multiple options having pros and cons, or maybe they should all be options in the import dialog.
Looking forward to your input.
I should be free to start on this feature end of this week.

@AstrorEnales AstrorEnales self-assigned this Jan 20, 2025
@AstrorEnales AstrorEnales added the enhancement New feature or request label Jan 20, 2025
@SugarWong97
Copy link
Author

I appreciate you replying so fast ~

After considering, I notied that :

  • The animations expression for mesh we know, acts more liked a mesh with some changing at timeline, so we can collect those changing and make keyframes.
  • If we focus on Voxel, the animations expression many be different. They art more liked some individual mesh at timeline and they have never existed at the same time.

If we treat the animations in MagicaVoxel as individual mesh for each frame, maybe it will be easier to reach what we want. Based on the above conclusion, I compared the difference between thoes solutions, if we have an animation of 20 frames :

Q-1:Should there be 20 collections with the frame's meshes?
A-1:Yes, It can be an import option. We can collect those frames , name them in-order (like xx-01xx-02xx-...), and place them in the space with same position(or increasing position). I think it will suit for game development.

Q-2:Should there be collections only for frames that changed?
A-2:Opinion reserved. Because it is hard to calculate, and I can not figure out how to use the delta between frames.

Q-3:Should there be an animation track that toggles the visibility of these collections for each frame?
A-3:Yes, It can be an import option. It is more like Q-1's plus version. It will have more readability for using.

Q-4:Should there be an alembic Mesh Cache generated holding the entire animation?
A-4:Opinion reserved. It is more like Q-2's plus version and it has more difficulty for developping. But it can be a option for Blender animation expert.

Pleae allow me to say that based on Q-1 and Q-3, I think it can be an import option:We can collect those individual frames , name them in-order (like xx-01xx-02xx-...), and depend on "Generate to animation track" sub-option place them in the space with same position(or increasing position) or place their visibility into animation track.

Thanks again for your goot question.

Kind regards

@AstrorEnales
Copy link
Owner

Thank you for your input!
Your concerns fully align with mine, so i will go with Q-1 and Q-3 first. Once everything is working, i will consider Q-4 as an additional baking option.
I have some test vox animation files, but if you want you can email me some more complex use cases of yours for better testing. I'll keep them private and only for testing this feature of course.
vox.57opz@passmail.com

Will let you know once i have something working!

@SugarWong97
Copy link
Author

Thank you for the opportunity of tesing ~

May I ask one question: Which verion of MagicVoxel should I use, before I send vox files to your email ?

@AstrorEnales
Copy link
Owner

I will focus on the newest MV version 0.99.7.1. As there was a period of versions without animation support i'm currently unsure which older versions supported them. But if you have animated vox files from older versions i would be interested as well! But the primary focus will always be on the newest versions.

@SugarWong97
Copy link
Author

Hi AstrorEnales,

Please check your e-mail for vox files(size is 4.67 MB) contained 2 animated vox files and 2 complex static scenes.

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

No branches or pull requests

2 participants