What determines bone hierarchy/bone index?

Hi, guys~~I met a problem related to bone hierarchy in skeletal mesh. When I import a rig into UE by fbx.

Hello @ChristoLiu and welcome!
Please share screenshots and more information!

The only I do know at this moment is you have a “problem related to bone hierarchy in skeletal mesh”

I have not a single clue about how to help you…

Software you are using, how it looks, names of the bones, options to export and import…

At the moment I can share this to you…

I’m not sure that the author had the same problem, but I think for me this is the place - not to waste the same topic in vain :sweat_smile:
So, we have a FBX file with skeletal asset and a mesh, which we import into Unreal. This is how the order of the bones is specified in the rig (Maya):

and here is how it is after import:
And these are not the only bones this happens to.
No matter how I change the import settings, the order does not change.

I decided to look into the file itself (it is an ASCII fbx, so I just opened it with a text editor) and in it the order of the information blocks and the binding of the bones is what it should be (IK bones in the end). But even when I changed them, the result stays the same.

Then I noticed that each bone has its own ID - I thought that maybe the point is that Unreal determines the order of the bones in ascending or descending order. It turned out that apparently it is! The bones with the higher ID number go first in the hierarchy. Example:
Here the head bones in rig:
In Unreal:
And here the data on them from file:

Model: 2670873893264, "Model::upper_jaw"
Model: 2670873904864, "Model::lower_jaw"
Model: 2670873921104, "Model::eye_l"
Model: 2670873916464, "Model::eye_r"

And if you place them in ID order:

Model: (2670873)921104, "Model::eye_l"
Model: ()916464, "Model::eye_r"
Model: ()904864, "Model::lower_jaw"
Model: ()893264, "Model::upper_jaw"

Just like in Unreal! :sunglasses:
BUT, this principle works with all reordering except for IK bones:

Model: 2671150983856, "Model::pelvis"
Model: 2670873969824, "Model::ik_hand_root"
Model: 2670873911824, "Model::ik_foot_root"

This order doesn’t match with either the rig or the Unreal version :grimacing:
So even if we somehow change their ID, I’m not sure that the order will change.

From all this, we have the following:

  1. Did I understand correctly that the order depends on the number of bones?
  2. If so, how do we make it match the order in the rig? And why this doesn’t apply to the IK (Root childrens) bones?
  3. If not - how do we make Unreal to get the hierarchy correctly?

Also here is some file info:

Try in UE4 - the order as intended!

So this is the problem/feature for UE5 :thinking:

Update: it the IK and Control Rig the order is correct - so this is only problem in Skeleton Tree when viewing Skeletal Asset or Skeletal Mesh