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

FBX animations with bones and positions messed up with FBXLoader R89 and later #13821

Closed
3 of 13 tasks
jsalli opened this issue Apr 10, 2018 · 7 comments
Closed
3 of 13 tasks
Assignees
Labels

Comments

@jsalli
Copy link

jsalli commented Apr 10, 2018

Description of the problem

Hi,
We use a FBX-file with animations and we added now couple of animations for cables which use bones. The animations with bones are messed up and the positions of the cables are also wrong when loading the FBX-file with FBXLoader.js loader from Three.js release 89 and later. The FBXLoader from Three.js release 88 works perfectly. The Three.js release itself doesn't seem to have any change to the problem, only the FBXLoader makes this.

When using FBXLoader version R91 and the items are placed to wrong positions frustum culling seems to hide the cables based on their correct positions. The cables disappear even though they are in the view when you have the camera in certain angle/position.

Here is the 3D model with animation and two scenes, one with the r88 FBXLoader and one with r91 FBXLoader. You can see the behaviour in this repo.

The 3D model is modeled with Blender then exported as an FBX to 3DS Max 2017. In 3DS Max we added bones, made the skinning and animations.

Can you help us to solve this? The r91 version of FBXLoader helps us with other things and fixes some bugs in the r88 that we had.

Three.js version
  • Dev
  • r89 and later
  • ...
Browser
  • All of them
  • Chrome
  • Firefox
  • Internet Explorer
OS
  • All of them
  • Windows
  • macOS
  • Linux
  • Android
  • iOS
Hardware Requirements (graphics card, VR Device, ...)
@looeee
Copy link
Collaborator

looeee commented Apr 12, 2018

I'll take a look - the model does seem to be loading correctly in some other places such as Sketchfab, and displays correctly but without animation in Autodesk FBX Review.

However loading it into 3DS Max there are warnings about an incomplete pose node, and exporting it back to FBX there are lots of warnings about gimbal lock on the bones. You could look into fixing those warnings and see if it resolves the issue.

@jsalli
Copy link
Author

jsalli commented Apr 13, 2018

My colleague worked a bit more on the model and got it working with the r91 version of the FBXLoader. My repo has a new version of the model named "working_model_of_cabel_pipes.FBX" and a new html file "workingFBXloader.html" with r91 FBXLoader to show it.

In Blender he applied the location, rotation and scale of the model before exporting it to an FBX. Then in 3DS Max he didn't assign a parent helper (an empty object as parent) to meshes that had bones. Now the model's position and animations show correctly.

Any idea what causes this?

@looeee
Copy link
Collaborator

looeee commented Apr 14, 2018

Not really 😅

The conversion of bone transforms from FBX to three.js is very complex. Unless there are lots of people having problems I'd rather not try and support all the edge cases like this.

For now, just make sure that all transforms are applied to bones and objects before exporting. In 3DS max this means resetting transforms and centering pivot points to objects. Also make sure that there are no warnings when importing and exporting your FBX to 3DS Max.

@donmccurdy
Copy link
Collaborator

For what it's worth, using FBX2GLTF on either FBX model in the repo gives a working glTF animation for me.

@jsalli
Copy link
Author

jsalli commented Apr 16, 2018

We'll apply all the transforms in the future to the models. And thanks @donmccurdy for the info. It might be a good idea for us to move to using glTF at some point. I've heard that it should be a better format for the web use for 3D models.

Should I close this issue?

@mrdoob
Copy link
Owner

mrdoob commented Apr 17, 2018

I guess we can close it for the time being...

@mrdoob mrdoob closed this as completed Apr 17, 2018
@looeee
Copy link
Collaborator

looeee commented Apr 17, 2018

Yeah, let's close it for now. If other people report problems we can reconsider it.

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

No branches or pull requests

4 participants