-
Notifications
You must be signed in to change notification settings - Fork 264
Fix loading bones #586
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
base: master
Are you sure you want to change the base?
Fix loading bones #586
Conversation
02bf773
to
5ce8d8a
Compare
@julien-moreau do you have any fbx file that can be used to test this? |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Omg if you can handle this it'll be really awesome and it'll prepare the future :)
You can take any animated mesh from Mixamo (https://www.mixamo.com/#/) and you'll see that bones are badly imported using Assimp (we have to figure out if it comes from Assimp or if it comes from our implementation reading the Assimp output data). I remember that I got a support of bones and I changed A LOT the code to make the mixamo models to work but I failed.
Take the basic mannequin from Mixamo (aka Y Bot) as it has no texture. I noticed that when textures are embeded in FBX, the Assimp loader takes SO MUCH time to load the model.
@julien-moreau do you think you can share the fbx file :D ? |
Ahah sure! Here is a FBX you can try: https://babylonjs-editor.fra1.cdn.digitaloceanspaces.com/experiments/fbx/Capoeira.fbx |
@julien-moreau thank you so much! I will try to try later today. |
I couldn't test yet, my PC gets stuck loading the fbx, I will try during the week. |
5ce8d8a
to
75bbccf
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
It works on my side, like I mean I load the 3d model (even if bones are bugged ahah)
Do you logs to share?
Yeah, I could load after cleaning the project but had this same problem with crazy animations. I am going to turn into draft and take another look in the future. |
Title
Fix loading bones from assimp. I couldn't test it yet, but shouldn't be a bad idea to merge it. I will probably test it tomorrow.
Summary
Fix 3 places in the code to make sure bones are loading and handled properly
Changes Made
Modify logic to determine if meshes have bones
Add a way to retrieve a bone from a container by name
getNodeFromContainerByName
method to allow retrieving a bone by nameUpdate the assimp worker to limit bone weights
Benefits
Closes #506