Skip to content

Research: import FBX with ufbx instead of Assimp #3825

Open

Description

@xen2

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 MeshConverter flat 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: MeshConverter relies 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

  1. A spike that imports the FBX files of Stride's repository and samples, and a few real projects, through ufbx.
  2. Compare with the current Assimp import: bones, animations, materials, vertex counts, import time.
  3. Decide from the numbers: ufbx for FBX (maybe opt-in at first), or stay on Assimp and fix the remaining issues upstream.

Related

This issue was drafted by CodeAlta, an AI coding agent.

Activity

  1. added
    enhancement
    area-Animation
    on Nov 6, 2026
  2. icauro commented on Nov 6, 2026

    @icauro
    Contributor

    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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    area-Animationarea-Assetenhancement

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions