When I export skeleton animation from maya using the same model, first export no animation model to baylon.
Then I add two different animation to maya and export only animations to babylon.
Finally I use code to combine the no animation model and two only animations. One is correct and another is incorrect.
Maya files:
How to solve this problem?
How do you do this? I think we will need a repro in the Playground to be able to help.
2 Likes
@xiaopangoo, I agree with @Evgeni_Popov… seeing how you are doing this in a playground will help us diagnose what is going on.
@xiaopangoo, this looks to be an issue with the joint orientations not matching between the skeletons. This is the orientation of the upper arm from the broken skeleton with Y down the bone:
And this is the orientation of the working skeleton with X down the bone:
If you are trying to retarget animation or skeletons between meshes, the skeletons need to be identical down to the rotation of the individual joints. I hope this helps!
2 Likes
This is the initial position of skeleton in maya. The orientation is different.
Must initial position of skeleton be consistent in Maya?Or can we update the skin to the current initial position of skeleton in babylon to solve this problem?
@xiaopangoo, typically when you are trying to retarget animation between skeletons you want them to be identical skeletons because the bind pose and vertex weighting are integral to the deformation of the mesh. If you have differences in the skeletons in terms of number of bones or orientation of the bones in the skeleton, the bind poses will be different which will result in what you are seeing. I am not aware of a way to reconstruct the bind pose in code so that the different bone orientation could be used, but that does not mean there isn’t one. The problem becomes that every time the scene is run, this remapping will need to be done. If you move that work to the digital content creation tool (Maya, Max, Blender, etc.) then you do the rework once and there is no cost to retargeting the animations in terms of aligning skeletons.
Basically, the way I always do this is to create one skeleton that is attached to my mesh, and then for any other animation that is created, I use a copy of that skeleton as the target for the animation. This way, I will always have animations that are retargetable. In fact, keeping a biped skeleton and rig to be used by any asset you create is a good way to be able to always retarget animations.
1 Like