How do animations works?

I made the animations of a skeleton(and the mesh attached) in Maya. But how does it really work? I’m very confused.

I have seen from here:

That he has the model, texture and animations in that single .glb. I’m not sure how to separate the animations.

If you export your file from Maya to a .glb file, you should be able to load it in the PG and play its animations as in the PG you linked.

AFAIK, you can’t have a separate file for the animations but I’m not really knowledgeable in this area.

Adding @bghgary who worked a bit on this topic and might be able to provide guidance when he ll be back the first week of Jan

I imported the mesh and animations. There are problems with the export from Maya. I used the Babylon Exporter, it works(I think), but when I try to import it, it doesn’t show in the scene. So I exported it as a fbx file and then imported it in Blender and then exported it as .glb(WITHOUT the babylon plugin) just with the default blender .glb, the mesh and animation shows and plays. But when I try to get the skeleton from the array, the array has 0 skeletons. The animations play when the mesh is imported. It just that I can’t control it, it just plays all the animations in order and repeatedly.

I think you should provide a PG as if your model is animated you should have a skeleton available.

1 Like

It just doesn’t appear there in the code. There is definitely a skeleton there because when I import the model, the animations plays right away after the mesh is appended in the scene. BUT when I use the skeleton from the callback, it appears to be nothing in the array. And also I’m not sure how to divide the animations before exporting the model. It’s all so unintuitive. (128.9 KB)

This is the model with the 6 short animations.

There is no skins in the glTF file, so there will not be corresponding skeletons when loaded. Perhaps the asset skeleton animation is baked somehow?

Maybe you can attach the Maya file and @PatrickRyan may be able to help?

When exporting from Maya there are a few things you need to make sure you have set up correctly. The first thing is to make sure that you have the Export skins box checked or the skinning information will not be exported and no animations will work on your mesh. The second is to make sure the Export Animations box is checked to ensure the animation data is also exported.

If you have Export only selected checked, you must be sure to select your mesh and skeleton nodes in your scene when exporting. If you are exporting selected and do not select the skeleton, it doesn’t matter if you have the export skins or export animations checked as there would be no underlying skeleton in the scene to deform the mesh.

Lastly, if you want to separate animation clips, you can do that with the animation groups options in the Babylon tools menu.


In this window, you can add an animation group and assign a frame range for the group. You can then address this named group in your code to play just that section of the timeline. If these suggestions don’t help unblock you, I agree with @bghgary that the fastest way to help is if you can provide your file, or a test file if you are unable to share your asset that has a simple skinned mesh that repros your issue we can help debug the process.

1 Like