Just wondering is there a way to transfer barebone animation data (for example, keyframes, animation curves) from outside of Babylon?
For example, for a mesh, I create an animation (key frames and curves) in Unreal. I want to export that animation only out of Unreal. Then I want to import the animation data into Babylon, and retarget/reapply the animation to any other models in Babylon.
In an ideal world, if I can transfer the animation curve over instead of baking the animation to every frame, it would be even better.
The model can rigged or not rigged. I am open for this part.
Just wondering if there is a good way to transfer animation between Unreal (or other platforms) and Babylon.
In most Babylon exporters (for Maya, 3DSMax and Blender) you usually have the option to export a .babylon file or a .glb/.gltf file with only the animation information:
Once you have a file with the animation information you will have access to the animation groups and the individual animations during import (see playground bellow):
Once you have the individual animation you can just create new Animation groups and assign them to new targets.
I don’t think we have any Unreal Engine plugins at the moment, but if you are able to import your animations into Blender/ 3DSMax or Maya you can than use the Official Babylon exporters:
3ds Max doesn’t support Mac OS, so there will be no special exporter for Mac.
I don’t use Unreal but the most of popular 3D file formats support animation data export. GLTF/GLB is just the most convenient for Web.
If you want to export GLTF from Unreal here is a couple of links:
@tawibox , also to complement the previews answer, if your glb/gltf file has more data (mesh, materials, …) but you are only interested in the animations, you can use:
BABYLON.SceneLoader.ImportAnimationsAsync
It works very similarly to SceneLoader.ImportMesh but it will only import animations.