Is there a decent fbx loader and exporter to be used with babylon.js?

Is there a decent fbx loader and exporter to be used with babylon.js?

Not in JS as it would be a nightmare to manage the binary files. The easiest would be to do it from the art tools available out there (Blender/Max/Maya).

Would GLTF/GLB be sufficient for your use case ?

1 Like

I see. What is so different than in the case of .obj format?

I can import and export GLB/GLTF/OBJ files.

Additionally how to export or import .babylon files? Is it just the scene (or this.scene) object written to a file?

What is so different than in the case of .obj format?

The file is completely different and creating a parsing/writer would involve way more code
also dealing with the binary without the fbx sdk would be insanely time consuming.

About babylon: SceneSerializer.Serialize(scene)

Have a read in the doc:
https://doc.babylonjs.com/resources/save_babylon
https://doc.babylonjs.com/extensions/gltfexporter

Thanks a million!

I did not know fbx file format is so complicated. Maybe I employ another dedicated library for that if I need it so much. Any recommendation for such libraries for formats that Babylon.js does not support?

I will read them. I had read the second one.

I think Tools.Download does some HTML anchor with download and createObjectURL stuff.

You have access to all the sources on Github that is the beauty of Open source, so yes it does and also uses the special MS path for MS browsers.

What does that mean, special MS path?

Just by curiosity, how the gltf importer dealing with the .bin?

Another point about the .fbx is that we can see many software dealing with this format but not with the same rules (correct me if I’m wrong), so it’s probably a little messy to go deep into it.

Official supported files by BJS are .babylon, .gltf/.glb, .obj & .stl.

Take a look into GitHub - BabylonJS/Exporters: Exporters for Babylon.js and gltf file formats :wink:

The bin format in glb is quite easy to parse despite being binary :slight_smile:

From where do I import the Tools? I am using es6.

Ok. I have found it in @babylonjs/core/Misc/tools.js

1 Like

What about a dae importer and exporter for babaylon.js?
I researched a bit it seems .dae format is based on collada which is based on xml. So this means it is easy parse and convert too. babylon format is json which equally parsable and convertable.

After 2 years, it seems that it could be possible.
There is FBX loader in three.js, here is the example - three.js webgl - FBX loader

Some time ago there was also FBX Mixamo Animations Combiner at https://nilooy.github.io/mixamo-animation-combiner/ (the link doesn’t work anymore) which I believe was made with JS only (and it was so much simpler and faster than to do the same with Blender manually).

1 Like

FBX is a pretty big format to support + the addition of a binary and a text version. I would be totally game for a community version but this is not something the core team could support knowing the amount of work required to provide an extensive support as we do for GLTF :slight_smile:

2 Likes

Could be a community extension sponsored by Autodesk :slight_smile:

2 Likes
2 Likes

Seems that you found a secret area, like in Doom II :slight_smile:

2 Likes

It felt like that when i found it while i was working on the editor yesterday

2 Likes

This thread started at 2019 :slight_smile:

1 Like