I’m having trouble properly exporting my rig from Maya to Babylon. I’d like to know the correct procedure for importing a rig from Maya. I might be making a mistake.
1/ I select all my bones and their hierarchy. There’s only one rig, and all the bones depend on a single root. However, there may be some constraints on some bones. I didn’t create the model, and I don’t remember.
2/ I bake the animation and clean it up by doing delete by type > history and constraints to make sure these bones aren’t influenced by anything in my rig.
3/ I proceed with my export. Some of the bones aren’t exporting. I’ve tried everything in my scene, even deleting almost everything to try to find the problem. Once in the playground, my animation plays on my model, but with fewer bones than expected. Visually, it works, but there are still animation keys for these bones, and when I try to clone an animation, it detects that these bones are missing, which confuses me.
Does anyone have any ideas? Why some bones export and some others don’t ? all of them have keys on them
@Thibaut, the one thing I see in your steps that may be tripping you up is the deletion of history. If you delete history on your mesh, it will also delete skinning information on the mesh as well. If a bone no longer has skinning information, it will not be included in export for the skeleton. What you want to do instead is Delete Non-Deformer History
for your meshes. This will leave any skinning or deformation information on your mesh and delete any edit history.
The other thing that you may be talking about if I am extrapolating from your question correctly is that you may have some bones in your skeleton that are for attachments. Something like a bone off the shoulder to hold a shoulder pad. There are no children for the bone and nothing skinned to the bone. Since there are no children, there are no issues with the bone not being there (which is why your animation looks correct) but since we can’t export a bone without skinning information, it gets skipped. If there is a bone that has nothing skinned to it, but it has children with skinning information, that parent bone will be exported because it’s transform will affect bones with skinning information. This can be seen if you have a root bone at the ground that does not have vertices skinned to it and its first child is the hips bone that does. The root bone will be exported because its transforms will affect the skinned mesh.
If using delete non-deformer history does not fix bones going missing on export try this. If you have any terminal bones that do not have anything skinned to them, try skinning a quad to them but leave it as a separate mesh. This way you can target and dispose of these quads that are placeholders in the skin just to get the bones to export.
Thank you very much for the answer.
Ok for Delete Non-Deformer History instead of delete history. However, it still doesn’t work; some bones aren’t exported.
These bones are indeed skinned to a mesh, but some have animation linked to a simulation (muscle) to correct the body shape. Even though I bake them, they’re normally no longer linked to these simulations; and while they move correctly in maya, they’re not exported.
Could it be a bone number limit or something like that ? My character is made of many mesh and there are no more than
Do you happen to know what I could do? I can select my entire bone hierarchy, apply a “delete all by type > constraints” for example, and it doesn’t change anything.
I tried to remove most of the things in the scene to eliminate what could go wrong, but it’s not working.
I’m lost, I must do something wrong, but I can’t find what!
@Thibaut, in trying to understand what you are experiencing, it sounds like there are two issues here. One is that you are losing your simulated animation and the second is that you are losing bones in your skeleton. Is this correct?
If so, I am guessing this is all due to the simulated motion. In glTF, there is no concept of per-vertex animation. The closest we have is morph targets which are a linear interpolation of vertex positions based on two or more meshes. But other than that, we don’t have a way to support true per-vertex animation like Maya has. If you are baking your simulation of mesh deformations, I don’t know if Maya is baking just the simulation part of the vertex animation or if it’s also baking the skinned animation as well since the skinned animation will also affect the simulation displacement. If it’s baking both, then it no longer needs the skinning information and may even detach the affected mesh from the bone so that that are not double transformations.
This is just a guess on my part as I don’t know what’s going on under the hood without digging in and testing a bunch of scenarios to build a working idea of what may be going on. But this guess does seem to be supported by the outcomes you are describing unless I am misunderstanding what you are seeing.
If you don’t bake your timeline in Maya and just assume you will lose the simulated motion on export, do you get your bones exported as expected?
If not, then there may be a second explanation. If the mesh is only constrained to the bone and not directly skinned and relies on simulation for deformation, then it would make sense that the bone is missing on export. Going to the component editor and selecting vertices that should have a skin will show you skin weights if they are present. If they are indeed skinned, then I would look at the baking process to see if the skin is being lost there. And as a control, skinning a temporary mesh like a cube to the bones that disappear would also be an interesting test to see if the bones export with an additional mesh attached. There shouldn’t be a mesh limit for export, but it will cost you and extra draw call for each additional mesh.
Not sure if this helps, but maybe you can attach some screen recordings or a sample file that we can test with.