If one skeleton can do the same thing, can it be exported like that? It doesn’t make much sense to do processing on import if it can be done on export.
If the user exported from blender its not a problem… Its from services like facebooks FBX to GLB that makes the issue.
But blender sees those split skeletons and merges them into one, so effectively it fixes that data problems for when we import. We should technically be doing the same thing one would imagine. It does not break any of the data, it simply consolidates it.
Just kinda figure we would want to match the main content creation tool for Babylons import export handling as opposed to doing our own thing.
Plus with if anyone is doing animation editing and things they are not going to want to reference the excessive duplicate skeletons.
I can almost guarantee our importer is missing a parsing step, but in our defense Three.js skips that step as well… so maybe it is convention?
This is the library that is causing the chaos with the splitting of the skeletons
Which sucks because thats like industry standard and there are no real good alternitives.
Might be an FBX thing? The Alien head one is exported using an old Unity exporter that I wrote a long while back. It definitely had duplicate skeletons in that. IIRC, my export already tries to remove duplicates if it can, but only if the skeleton matches exactly and not subsets.
We can maybe add something to the export or just a custom function to do the consolidate, but I don’t think it’s a good idea for import to do automatically. Maybe it’s okay as a flag in the import if it’s cheap?
I agree 100%, yeah a flag would be perfect and from as far as I understand its only like 100 lines of code so the impact should be minimal.
Submit a PR? We can discuss more once the code is visible.
Let me talk to my peoples and see if they want to contribute the code they came up with. Otherwise it would have to be solved by someone else because it would be a conflict of interests for me or @mrlooi to do unless we as a company decided it was not.
Ill hit him up when he wakes up.