stride3d / stride

Stride (formerly Xenko), a free and open-source cross-platform C# game engine.
https://stride3d.net
MIT License
6.65k stars 957 forks source link

*.glb asset is imported with broken mesh #2406

Closed delustra closed 2 months ago

delustra commented 3 months ago

Release Type: GitHub

Version: 4.2.0.2188

Platform(s): Windows

Describe the bug GLTF asset is imported incorrectly. Geometry transformations and animations are broken for certain assets. At the same time the same assets work fine in other assets viewers.

To Reproduce Steps to reproduce the behavior:

  1. Open editor
  2. Create asset '3D Model'
  3. Import this model this model
  4. Hangar geometry is broken. The gates are inside the hangar. image

Expected behavior Hangar imports with proper geometry. This how the same assets looks in the regular windows 3d asset viewer. image

Screenshots If applicable, add screenshots to help explain your problem (use GitHub drag & drop)

Log and callstacks If any, please attach here any log or callstack (preferably in a .txt file using GitHub drag and drop)

Additional context Add any other context about the problem here.

Basewq commented 2 months ago

I've debugged the importer with your model and it looks like the underlying assimp library isn't loading the node hierarchy properly because of duplicate names making things linked incorrectly to one another. I imported it into blender and see your mesh objects and armature have the same name as the bones (eg. 'door_under' is the name of both the mesh object and the bone).

As a workaround, when I renamed the bones (eg. add a _bone suffix) then re-exported it, the animations seem to work correctly.