Import FBX with bones more than 256

Hi, I am one of the refugees who is currently switching from Unity to Flax.
And currently my FBX models can not be imported as SkinnedModel to Flax because they have more than 256 bones.
My question is,

  • Can I do something to fix this limitation? If yes, then please tell me how to do it
  • Will this 256 bones limit be increased in the next version? Are there any plans to fix this problem?

I 've searched other 3D engines, but I think Flax has the best features in terms of creating industry quality AAA games, especially because Flax implemented DDGI showed me that the engine cares about Graphics, that and combined with C# flexibility is what made me decide to use Flax.
And since the engine support High-end graphics, it will be counter-intuitive to have 256 bones limitations, because next-gen 3D Models tend to have higher polygons, bones, etc

The limitation comes from using byte to store bone index inside Skinned Mesh vertices which limits the range to [0; 255] (https://github.com/FlaxEngine/FlaxEngine/blob/master/Source/Engine/Graphics/Models/Types.h#L152).
Changing this in the forked engine version would be pretty hard (it’s in shaders, engine types and inside serialized assets). I plan to refactor mesh data to support selective streams thus allowing mesh to contain more custom data (eg. secondary texture coords or maybe more blend indices memory).

I can schedule this task somewhere around Flax 1.8 (to be implemented within ~2-3 months).

2 Likes

Thanks for your fast reply.
So it seems you already have plans to improve mesh data streams.
Your plan sounds good to me.
It’ll be awesome if you can implement this within 2~3 months just like you said.
Greatly appreciate it.

In the meantime I’ll just try to fork and tweak the Engine source codes while waiting.

@mafiesto4
Hi again,
I have confirmed that “mesh data refactor + blend indices with 16bit” is in 1.8 roadmap. Thank you.

In the meantime, I made a fork and tried to change the types myself while waiting for ver 1.8
I plan to contribute in developing the engine in the future, so I guess I start from here.
I’ve changed all necessary codes (change Color32 → Int4, MAX_BONES definition, etc)
in c++ and c# codes, and it compiled successfully without error.
The models with >256 bones are imported successfully but as you can see in my attached image,
The bones are imported but no mesh is being rendered.

I’ve searched all references regarding skinning, or blend indices but can not find any links within the solution project.
I believe it has something to do with the shaders, like you said above.
Can you please give me direction to fix this rendering problem ?
Sorry again for taking your time.