Hi All,
I’ve see the tutorials on how to download an RPM character, convert it to FBX in Blender, upload it to Mixamo and then animation the character in Babylon.js. While this process works well, I’m looking for a method of utilizing Mixamo animations with RPM characters directly - i.e. without the need to pass through Blender/Mixamo.
Using the RPM Animation Library (GitHub - readyplayerme/animation-library: Ready Player Me Animation Library) and converting these animations to GLB, they can then be directly imported into a BJS scene and applied to an RPM character with the following code (thanks GitHub - crazyramirez/babylonjs-ReadyPlayerMe-Animation-Combiner: Babylon JS -- Combining multiple animations to a ReadyPlayerMe Character for the example):
BABYLON.SceneLoader.ImportMeshAsync(null, "./resources/models/" + model, null, scene)
.then((result) => {
player = result.meshes[0];
player.name = "Character";
var modelTransformNodes = player.getChildTransformNodes();
animationsGLB.forEach((animation) => {
const modelAnimationGroup = animation.clone(model.replace(".glb", "_") + animation.name, (oldTarget) => {
return modelTransformNodes.find((node) => node.name === oldTarget.name);
});
animation.dispose();
});
animationsGLB = [];
});
If converting a Mixamo FBX to GLB using the same process and utilizing the above approach BJS throws an error:
Uncaught (in promise) TypeError: Cannot read properties of undefined (reading 'getRestPose')
at e._getOriginalValues (babylon.js:1:214926)
Is there a way to map these Mixamo animations to the RPM skeleton in Babylon.js directly without import/export through Blender/Mixamo?