Babylon.js: Skinned animation stopped working for more than one joint

Created on 12 Jan 2018  路  6Comments  路  Source: BabylonJS/Babylon.js

Hello BabylonJS team,

A regression has been introduced to skinned animation recently.
Loading a GLB file in BabylonJS sandbox that contains a skinned mesh and more than one joint in hierarchy displays animation only on the first ( skeletal ) joint while ignoring animations for the rest of the joints.

I have attached a GLB file that worked correctly before and contains one simple mesh, 5 joints with weight maps and rotation animation for each joint. 46323_Gltf_Anim.zip

Thanks,
Milo拧

loaders question

All 6 comments

Hello this is not a regression but more an alignment to the spec (pinging @bghgary for info)
You can restore initial behavior like this

BABYLON.SceneLoader.OnPluginActivatedObservable.add(function (plugin) {
       if (plugin.name === "gltf" && plugin instanceof BABYLON.GLTFFileLoader) {
           plugin.animationStartMode = BABYLON.GLTFLoaderAnimationStartMode.ALL;
         }
     });

Hi deltakosh,

Thank you for responding quickly! :)
May I ask why is starting only the first animation default in the spec @bghgary ? It seems wrong from the perspective of character rigs.
Also is there a way to enable all animations from the sandbox UI?

Thanks,
Milo拧

P.S. Animation works after code change. 馃憤

I tend to agree on enabling this option on the sandbox :)

glTF has an array of animations and each animation has an array of channels. It looks like the model you linked comes from "Modov11.2". I'm not familiar with this exporter, but if the animations are expected to be played together, they should be exported into one animation with multiple channels instead of one channel per animation with multiple animations.

Please see glTF issue https://github.com/KhronosGroup/glTF/issues/1052 for more information on the spec discussion and https://github.com/BabylonJS/Babylon.js/issues/3411 for more information on how BabylonJS will handle this.

Hi @bghgary ,
That is a really good way to look at the glTF animation, thank you for explaining it in detail. :)
It would be great to have a drop down list in the Babylon sandbox to choose one of those animations to play. That feature would support workflows with multiple animations actions or clips that game workflows ( Unity, Unreal ) frequently use.

This is the plan :) we will soon update the sandbox to add this feature

Was this page helpful?
0 / 5 - 0 ratings