Are armature / skeleton animations saved to .babylon files? I have made this GLTF file, and when dropped into the sandbox, it loads with both of its animations and both can be played.
However, when I click the ‘Export to .babylon’ button, it saved fine. However, when I drop the .babylon file back into the playground, it fails to load the skeleton animations and instead t-poses me.
It is not a bug glTF files uses Animation Groups which are automatically started by the sandbox. Babylon files host the animations differently but you should be able to start them by clicking on the skeleton in the scene explorer and you may have then a button to start animation on the properties panel
I am not sure if this is of much use… but the window on the right is the console for the GLTF file while that on the left is for the .babylon file. There seems to be a discrepancy at the x y z.
Thanks for reporting this @Theodore_Lee, I’ll need some more information to determine a root cause. It appears that the skeleton and animations are exported properly in the .babylon if that data is imported properly, but perhaps the mesh isn’t being properly skinned?
This sounds somewhat similar to Github issue 571 but I can’t say for sure since I’m not sure what program you’re using. Would you also be able to share your scene file (or make a simple scene that reproduces this issue?)
The window on the right is the console for the GLTF file while that on the left is for the .babylon file. There seems to be a discrepancy at the absolutePosition x y z. I’m not sure if this has any meaning, but it’s a difference from the loaded GLTF file and the .babylon file.
Sorry, but I am not quite sure if this is glTF or .babylon. I only do a .babylon & my own javascript exporter for blender. The glTF importer / exporter for Blender is supported by Khronos.
Did not read this whole thread, but the .babylon exporter does the older AnimationRange, not Animation Groups. These need code to run, so cannot be animated in sandbox.
In your page this would start the run range:
BABYLON.SceneLoader.Append(url, "myfile.babylon", scene);
scene.executeWhenReady(function () {
skeleton = scene.getSkeletonByName("base_male1");
skeleton.beginAnimation("run", true);
// Attach camera to canvas inputs
scene.activeCamera.attachControl(canvas);
// Once the scene is loaded, register a render loop
engine.runRenderLoop(function() {
scene.render();
});
});
Each Blender action becomes an AnimationRange, with the same name. Check your log file for the ranges exported.