Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Bug: FBX reorders bones indices on export #5256

Open
JulianKnodt opened this issue Sep 27, 2023 · 0 comments · May be fixed by #5435
Open

Bug: FBX reorders bones indices on export #5256

JulianKnodt opened this issue Sep 27, 2023 · 0 comments · May be fixed by #5435
Labels
Bug Global flag to mark a deviation from expected behaviour FBX Bugs related to the FBX format

Comments

@JulianKnodt
Copy link
Contributor

JulianKnodt commented Sep 27, 2023

Describe the bug

Assimp will reorder bone output upon FBX export. While for most use cases this is fine (the bone order itself is not important for rendering a single mesh), but some downstream tools that take multiple meshes except their bones to be in the same order.

To Reproduce
Steps to reproduce the behavior:

  1. Take any FBX model
  2. Import with Assimp
  3. Export same model with Assimp
  4. Examine ordering of bones in editor such as Unity

Expected behavior
The bone order between the original and exported should be the same.

Platform (please complete the following information):

  • Any
  • Latest Version (5.24 I believe)

Additional context
This leads to an error when using LOD with Unity.

Proposed Fix

Inside of FBXExporter.cpp, line 1870 uses a set, along with a comparator. Remove this comparator, and convert the set to a vector, and that should be sufficient to preserve the input order.

@JulianKnodt JulianKnodt added the Bug Global flag to mark a deviation from expected behaviour label Sep 27, 2023
@kimkulling kimkulling added the FBX Bugs related to the FBX format label Oct 2, 2023
@JulianKnodt JulianKnodt linked a pull request Jan 24, 2024 that will close this issue
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Bug Global flag to mark a deviation from expected behaviour FBX Bugs related to the FBX format
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants