Cannot export a simple animation to gltf in Maya2018

Mannequin (190.9 KB)
I use babylon gltf exporter for Maya2018, but I cannot export a very simple character with animation. Above is that Maya file.

ping @PatrickRyan

@Zion_Huang, in looking at your file, it does not appear that you have skinned the mesh to your skeleton:

The mesh nodes have a Maya parent constraint which works for animations in Maya, but to export to glTF or Babylon, you will need to skin the meshes to your joints. Even if you do a rigid bind where all of the vertices of a submesh of your mannequin are skinned at a value of 1.0 to a single joint, this will be enough. Skeletal animations coming into Babylon require a bind pose so that the matrices can be set correctly for the deformation of the mesh based on joint translation, rotation, or scale.

The other thing I noticed is that your hip joints are not children of your root joint. This will cause a lot of problems in your animations as you effectively have three root joints from three separate skeletons that you will skin to your meshes. You will manually need to translate your leg skeletons to keep up with your root. The easiest fix for this is to make both hips children of your root joint.

Lastly, for optimization purposes, you will want to combine all of your meshes into one mesh. You won’t need to keep them separate anymore for parent constraints due to the mesh skin, and combining the meshes into one mesh will make your scene run faster.

A tip for quickly cleaning up your skin weights on a mesh like this, once combined. Combine your meshes into one and delete history. Then select your mesh and all bones in the skeleton and skin with the default skinning type. Then to rigid bind each submesh, select one vertex from a submesh and press shift + > which will expand your selection to neighboring vertices. Since all of your submeshes meshes are convex, you can repeat tapping shift + > until all of the vertices of the submesh are selected. Then open your Component Editor and choose the Smooth Skins tab. It will show all of the selected vertices and the joint weights each one has. Choose the joint you want to drive all the vertices (open Options and deselect Hide Zero Columns if your joint does not appear in the list) and select that column in the first vertex row and then shift + click the same column on the last vertex row so that the column for all vertices is highlighted and type 1 and hit enter. This will set all the skin weights for each vertex to 1.0 for the selected joint. This will make that submesh follow the joint exactly the same as if it had a parent constraint.

I hope this helps, but feel free to reach out if you have more questions.