Research: import FBX with ufbx instead of Assimp
I maintainer di solito rispondono entro 1 giorno
Nessuno ha ancora preso questa issue.
Valutazione
- Difficoltà
- 5/5
- Tempo stimato
- Più di una settimana
- Idoneità per principianti
- 35/100
- Tipo di issue
- Funzionalità
- Chiarezza
- Specificata chiaramente
- Stato di attività
- Attiva
- Stack tecnologico
- csharp
- Ambito
- computer-graphics, game-dev
Direzione di ricerca
Start by reading the related discussion in #3533 and inspect MeshConverter's Assimp processing steps. Build a spike that imports FBX files from Stride's repository, samples, and a few real projects through ufbx, then compare bones, animations, materials, vertex counts, and import time with Assimp. Done means the comparison supports a documented decision to use ufbx, potentially opt-in, or keep Assimp and fix remaining issues upstream.
Scritto dal modello di indicizzazione a partire dal testo della issue.
Descrizione
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.
- #1923: an earlier mention of moving the FBX importer to ufbx.
- assimp/assimp#7038, assimp/assimp#7039: the Assimp fixes; #3824 ships them in Stride.
This issue was drafted by CodeAlta, an AI coding agent.
- Lingua principale
- C#
- Stelle
- 8k
- Fork
- 1.2k
- Merge medio
- 2g 7h
- PR unite (30g)
- 316
Preparare l'ambiente
- Nessun Dockerfile né file Docker Compose
- Ha un modello di pull request
- Leggi la guida per i contributori
Come iniziare
- Leggi tutta la issue e poi la guida ai contributi del progetto.
- Commenta sulla issue per dire che te ne occupi tu — evita che due persone facciano lo stesso lavoro.
- Fai un fork del repository e lavora su un branch.
- Apri una pull request che faccia riferimento al numero della issue.
Altre issue di stride3d/stride
-
`.gitignore` isn't created for sample projectsForse già presa @ferafiks l’ha presa 1 giorno fa. Apertaarea-Asset area-GameStudio area-Samples bug
Difficoltà 2/5 1-3 ore Idoneità per principianti 76/100
I maintainer di solito rispondono entro 1 giorno
-
area-Build bug
Difficoltà 2/5 1-3 ore Idoneità per principianti 88/100
I maintainer di solito rispondono entro 1 giorno
-
area-Samples enhancement
Difficoltà 2/5 1-3 ore Idoneità per principianti 75/100
stride3d/stride#3386 · 7 commenti ·
I maintainer di solito rispondono entro 1 giorno
-
area-Physics bug
Difficoltà 2/5 1-3 ore Idoneità per principianti 86/100
stride3d/stride#3384 · 1 commento ·
I maintainer di solito rispondono entro 1 giorno
-
area-Samples bug
Difficoltà 2/5 1-3 ore Idoneità per principianti 68/100
stride3d/stride#3066 · 6 commenti ·
I maintainer di solito rispondono entro 1 giorno
Tutte le issue di stride3d/stride
Issue simili
-
Scaffold marks an association as required when its composite foreign key has a nullable columnApertaarea: scaffold status: needs-tests
Difficoltà 2/5 1-3 ore Idoneità per principianti 62/100
I maintainer di solito rispondono entro 1 giorno
-
provider:flagd type:fix
Difficoltà 2/5 1-3 ore Idoneità per principianti 74/100
open-feature/dotnet-sdk-contrib#789 · 1 commento ·
I maintainer di solito rispondono entro 1 giorno
-
Difficoltà 1/5 1-3 ore Idoneità per principianti 72/100
NimblePros/Metronome#23 ·
-
Difficoltà 2/5 1-3 ore Idoneità per principianti 72/100
jsboige/CoursIA#28504 · 3 commenti ·
I maintainer di solito rispondono entro 1 giorno
-
CustomUnits: Battle Armor squads play tank movement sounds (move-audio default ignores FakeVehicle)Aperta
Difficoltà 2/5 1-3 ore Idoneità per principianti 72/100