From Babylon.js directly, How can I export a meshes animations and bones into a FBX file?

I’ve successfully exported the Mesh + Vertex info in a .OBJ file.

This takes care of the mesh + UV map in blender.

Now i need to animate this stuff with the bones + animations in Blender.

I’ve tried exporting with gltf,babylon etc… they’ve all failed on exporting the entire scene. This is why I’m targeting single Meshes in the scene.

Is there a way to take this Mesh object, grab all its bones+animation data, and save that into a .fbx file I can then open in blender and hook back up to the OBJ file I exported earlier???

I want to go Babylon.js —> export via fbx --> import into Blender, use fbx animations with OBJ file mesh.

From blender if you export to gltf or .babylon you should have animations.

Can you share the blender scene you are using so our experts like @gryff or @Vinc3r could have a look?

whoops updated, answer, I am initially in babylon.js and want to take a mesh, export its anim data via a .FBX file, and import that into blender.

I would be up to manually create the .fbx structure via textfile/binary format if necessary.

Oh…this is different then. We do not export to fbx (proprietary closed format)
Our glTF export does not export animation yet but we have an issue to add it (help wanted ;)): GLTF serializer: Add bones and morph target animation support · Issue #5100 · BabylonJS/Babylon.js · GitHub

Pinging @Drigax FYI

I see, in the meantime then, if .fbx is proprietary, what about .dae files. Is that what the TRS animation ticket was referring to in your link?

Is there a way to export bones/animations in a .dae file and hook that back up to mesh exported in OBJ file?

we only export into .babylonjs, .obj and .gltf :frowning:

My two cents… FBX is Autodesk Proprietary Exchange format. If you want to create .FBX files, you need to get your hands on the Autodesk FBX SDK. (Warning: Its old school C/C++).

Once you have that… A mesh is a mesh… POSITIONS, NORMALS, TANGENTS, UVS, COLORS and TRIANGLE INDICES… This is the same every where… So you would use your FBX sdk to serialize your mesh data in fbx format.

FYI… This is why they created GLTF (and legacy open formats like Collada).

Also… Its gonna be tough using your native FBX in a game or project… Because you again need the FBX SDK to read the file on the various platforms (Windows, Mac, IOS and Android)

Technically … Animations are just the POSITION, ROTATION AND SCALE (Either seperate tracks for each or a combined matrix) at a given timestamp so you could dump that stuff in ANY format that supports animations… .babylon, .gltf or .fbx

I would recommend a more Open Format like GLTF :slight_smile:

1 Like

Can’t agree more