Note
This is only a draft, might change at any time, the implemention takes a huge amount of work, so it’s not expected to happen any soon.
This would never be considered before the era of AI coding, but even with a SOTA AI tool, billions of token usage would be expected.
Background
FBX is still widely used as the de facto standard for 3D interchange after so many years after glTF 2.0 release, and it’s hard to use as a proprietary format.
The only widely used FBX library on the web is FBXLoader from three.js, but it’s not as feature-complete as importers of DCC tools.
There were many offline FBX to glTF converter based on autodesk’s FBX SDK, like FBX2glTF from facebook, and FBX-glTF-conv from cocos, but they are all unmaintained for years.
Blender is an open source DCC tool with FBX import and glTF export, the underlying library for its FBX import is now ufbx.
Since it’s open source, it should be possible to be compiled to wasm, and loaded to the browser.
But with the wasm-js-call overhead,
Dependency Selection
The proposed architecture replaces the monolithic FBX SDK with a targeted stack of proven, open-source libraries.
Input Layer: ufbx
We propose using ufbx as the parsing engine.
- Rationale: Unlike unmaintained wrappers,
ufbxis actively developed and notably serves as the underlying library for Blender’s modern FBX I/O. - Benefit: This ensures that the converter inherits the robustness and edge-case handling of Blender’s importer without requiring the entire Blender runtime. It is written in C with no external dependencies, making it ideal for Wasm compilation.
Output Layer: cgltf
We propose using cgltf for glTF serialization.
- Rationale: This is the standard library used by
gltfpack(the reference glTF optimizer). - Benefit: It provides a battle-tested, minimal C API for constructing valid glTF structures (JSON and Binary buffers).
System Interface: WASI Filesystem
Instead of Emscripten FS or writing custom JavaScript glue code for memory management, we propose implementing the converter against the WASI (WebAssembly System Interface) filesystem API.
- Rationale:
gltfpackalready utilizes this approach. By compiling with WASI support, the internal C logic can use standardfopen,fread, andfwrite. - Integration: The browser wrapper will implement a “Virtual File System” (VFS) that maps JavaScript
ArrayBufferobjects to virtual file paths (e.g.,/dev/input.fbx) before invoking the WASM module.
External Libraries and Licenses
| name | license | comment |
|---|---|---|
| ufbx | MIT or Public Domain | Direct dependency |
| cgltf | MIT | Direct dependency |
| meshoptimizer | MIT | Good example on cgltf, and wasi fs bridge would be included |
| FBX-glTF-conv | MIT | Reference code on FBX to glTF conversion |
| FBX2glTF | BSD | Alternative reference code on FBX to glTF conversion |
| blender | GPLv3 | Can not be directly referenced, but can use it as a source of clean-room docs on ufbx / glTF export example |
| Autodesk FBX® SDK | CC-BY-NC-SA 3.0 | Docs-only, can not be included, just use it to help understand how FBX-glTF-conv or FBX2glTF work |