Repository navigation
Description
Summary
Research whether FBX files should be imported with ufbx instead of Assimp. Other formats would stay on Assimp.
This is still a research topic: the switch only happens if the research shows it is worth it.
Why
Recent work on RescueDrone and on Assimp's FBX importer found several Assimp faults that are specific to FBX (bone offsets fixed in assimp/assimp#7038 and assimp/assimp#7039, shipped by Stride in its own Assimp 6.0.5 build, #3824). Assimp's FBX importer has few tests that check the imported data, so such regressions are easy to miss: none of its tests checked a bone offset.
ufbx is a single-file C library (MIT or public domain) with an extensive test suite of real FBX files exported by Maya, 3ds Max, Blender, MotionBuilder and others, each checked against the tool's own export. Both Godot (since 4.3) and Blender (since 4.5) import FBX with it.
It would also solve other Assimp issues:
- Animation curves: Assimp keeps only the keys and interpolates linearly between them, so cubic curves are lost (a 3ds Max test file is off by 11.5 units mid-animation). ufbx evaluates curves with their real interpolation, and can bake them.
- Scale inheritance modes (Maya, MotionBuilder): Assimp ignores them, so bones under a non-uniform parent scale end up wrong. ufbx handles them.
- Old FBX files: Assimp refuses files older than FBX 7.1. ufbx reads ASCII and binary files from FBX 3.0.
- Blend shapes: ufbx supports in-between shapes. Assimp had a regression that scrambled blend shape order, only fixed in 6.0.5.
- Bone offsets: ufbx uses the same formula as the FBX SDK. Assimp's changed in 2023 with no test catching it.
- Pivots and geometric transforms: handled the same way as Maya and 3ds Max evaluate them.
Costs and open questions
- Bindings: ufbx has no C# bindings that Stride could use as is. Options: bind its structs directly, or a small C layer that gives
MeshConverterflat arrays (vertices, indices, bones, node transforms, animation keys). - Native builds: one more native library to build for each platform, like Stride's own Assimp build.
- Processing steps:
MeshConverterrelies on Assimp's steps (vertex join, tangents, normals, bone weight limit). ufbx only has helpers (triangulation, index generation, normals), so the rest would need another source. - Existing projects: a different importer can give different node names, hierarchy, mesh splits and material slot names. Godot hit this and kept the old importer for files already imported. Stride would need a safe path for existing assets, likely opt-in at first.
- Speed: likely faster, not measured against Assimp.
Research plan
- A spike that imports the FBX files of Stride's repository and samples, and a few real projects, through ufbx.
- Compare with the current Assimp import: bones, animations, materials, vertex counts, import time.
- Decide from the numbers: ufbx for FBX (maybe opt-in at first), or stay on Assimp and fix the remaining issues upstream.
Related
- #3533 (comment): the discussion this comes from.
- Replace FBX C++/CLI importer with a cross-platform FBX library #1923: an earlier mention of moving the FBX importer to ufbx.
- ScaleProcess: keep shear in bone offset matrices assimp/assimp#7038, FBX: bone offset from the cluster's Transform, with the geometric transform assimp/assimp#7039: the Assimp fixes; Importer: our own Assimp 6.0.5 build, with bone offset fixes #3824 ships them in Stride.
This issue was drafted by CodeAlta, an AI coding agent.
Activity
icauro commentedon Nov 6, 2026
also ufbx much faster and well optimized.
I tried to optimize ufbx further few day ago (added flamegraph, try alter scheduling, work distrub, decomp algorithm, avx2-512 etc),
i couldn't past 5 percent on best case scenario.
Its well written and performant library.
Also maybe default asset importer be plugin, beside ufbx and other possible feature ones?
I dint look the architecture tho see if its feasible.