X-Hax / sa_tools

Sonic Adventure Toolset
http://info.sonicretro.org/SA_Tools
102 stars 24 forks source link

Assimp: Chunk models export with wrong hierarchy #160

Closed PiKeyAr closed 3 years ago

PiKeyAr commented 3 years ago

Steps to reproduce:

  1. Load the model in SAMDL. amy.zip

  2. Export as DAE.

  3. Create a new model and import DAE.

The resulting object will have the original object hierarchy but all nodes will be empty. The DAE file does contain mesh data, but it's dumped as a list of nodes after the original hierarchy like this: image

In the "Import as Nodes" mode, SAMDL loads hierarchy belonging to the first child of the root mode, so the mesh data doesn't get included in the imported hierarchy (the screenshot was taken on a build with that code commented out). This can be fixed easily but the hierarchy would still be wrong even if it was.

I don't know enough about chunk models, weights etc. to be able to fix this on my own.