1
votes

I have created a simple frame-based animation in MagicaVoxel(v.0.98) and can't work out how to import the model with its animation into aframe VR.

The aframe docs re using MagicaVoxel don't mention animation https://github.com/aframevr/aframe/blob/master/docs/guides/building-with-magicavoxel.md

When I look at the recommended animation-mixer component (https://github.com/donmccurdy/aframe-extras/tree/master/src/loaders) it says that only glTF and three.js models support animation. glTF isn't one of the export options in MagicaVoxel but I'm not sure whether it would be possible to convert a MagicaVoxel export into that format.

Am I right in thinking that at present you can't create animations in MagicVoxel and import them along with your model into aframe? the above documentation points to that but doesn't say it explicitly. Likewise I haven't found documentation for MagicaVoxel that says clearly one way or the other.

Thanks in advance

2

2 Answers

2
votes

MagicaVoxel cannot export to any formats that support animation, and in any case the type of animation it uses isn't a fit for typical formats that do support animation (via keyframes, morph targets, and skinning). You would need to export each frame of your animation as a separate OBJ and then import them all. You can use A-Frame's animation feature or some JavaScript to swap them out over time.

See: https://forum.sketchfab.com/t/how-to-export-an-animation-from-magicavoxel/15460/10

0
votes

MagicaVoxel animations are rendered frame-by-frame stop-motion style animations, they don't actually create any real-time animations. You can use a second tool to try to add animation (e.g., Mixamo).