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

FBXLoader messes the animation up #14204

Open
makc opened this issue Jun 2, 2018 · 12 comments
Open

FBXLoader messes the animation up #14204

makc opened this issue Jun 2, 2018 · 12 comments
Assignees

Comments

@makc
Copy link
Contributor

makc commented Jun 2, 2018

I dont really know why, but this model here looks like this if animated:
screen shot 2018-06-03 at 2 02 30

It does work perfectly fine in autodesk fbx review. There are warnings of dropped weights, and some vertices appear to have as much as 12 influences according to FBXLoader, however it is hard to believe that is the cause (hello #12127) and also previous revisions of the same model in dae format had no such problem.
Head_69.fbx.zip

@looeee looeee self-assigned this Jun 3, 2018
@looeee
Copy link
Collaborator

looeee commented Jun 3, 2018

Me, everytime someone reports and FBXLoader bug: "please don't be a problem with bone matrices, please don't be a problem with bone matrices, ..."

But yeah, this is a probably a problem with the bone matrices.

It doesn't look as bad as your image when I'm testing it though, have you updated to the latest files?

EDIT: actually on second thoughts, I guess the corruption could be related to deleted vertex weights.

recording

@makc
Copy link
Contributor Author

makc commented Jun 3, 2018

It doesn't look as bad as your image when I'm testing it

that's because you are playing 1st clip. try 2nd or 4th

@looeee
Copy link
Collaborator

looeee commented Jun 4, 2018

Are you able to edit the vertex weights? I think that the next step is to confirm whether this a weights issue or a bone matrices issue.

If you can reexport this with 4 weights per vertex and the issues are not resolved then we can look at the bone matrices.

@makc
Copy link
Contributor Author

makc commented Jun 4, 2018

@looeee I'm affraid too many influences is itself a bogus problem, like I said in previous dae version there was no such situation. I don't have latest version in dae format to prove this. But I can, for example, upload fbx file to playcanvas and it works there. Do you know their bones per vertex limit?

@looeee
Copy link
Collaborator

looeee commented Jun 4, 2018

No idea. But perhaps they do something fancier than we do when re-weighting vertices. All we currently do is to take the 4 biggest weights and delete the rest.

However, I agree that it's the less likely cause of this.

Unfortunately the transforms involved in converting FBX bones to three.js bones are pretty complex - especially since, as I've understood it, FBX format has been kind of hacked together to support both Max and Maya which specify transforms in different ways. Not to mention MotionBuilder, Blender and all the other apps that may be doing things differently again, or exporting incorrectly.

While working on setting up the bone matrices I mainly concentrated on Max exports, while making sure not to break any older test files. It's mainly worked for other apps too, but I have come across a couple of issues like this.

If you want to take a look, it would be great to have a second set of eyes on this. Perhaps you will notice something that I missed.

@donmccurdy
Copy link
Collaborator

Running this model through Facebook's FBX2GLTF utility, the animations match FBX Review:

Head_69_out.zip

https://gltf-viewer.donmccurdy.com/

@mrdoob
Copy link
Owner

mrdoob commented Jun 18, 2018

@makc are you able to use gltf instead?

@makc
Copy link
Contributor Author

makc commented Jun 18, 2018

@mrdoob I am trying to, yes. However, if gltf converted from fbx plays fine, it means the problem is definitely there in fbx parser.

@mrdoob
Copy link
Owner

mrdoob commented Jun 18, 2018

However, if gltf converted from fbx plays fine, it means the problem is definitely there in fbx parser.

Yes, of course. But we may not have bandwidth to fix it so we're suggesting a more robust workflow.

@looeee
Copy link
Collaborator

looeee commented Jun 19, 2018

Agreed - I will look into this at some point, but honestly it will be weeks before I have time. If you want a fix sooner, you can try looking into it yourself.

@yazancash
Copy link

similar problem with all Mixamo FBX animations.

@mrdoob
Copy link
Owner

mrdoob commented Jan 12, 2021

After #20932 seems like the animations _WN and _WS are now fixed. _AN and _AS are still broken though.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

5 participants