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 Loader: Blender export with rotation animation will result in error #27907

Open
nookinook opened this issue Mar 12, 2024 · 3 comments
Open

Comments

@nookinook
Copy link

Description

FBX loader does not load models exported from blender when the animation contains a rotation. Only translation works fine. Also export from other DCC (3ds Max) works. Tested with Blender 3.6 and 3ds Max 2020 and r160

Orginial thread: https://discourse.threejs.org/t/blender-fbx-imported-in-threejs-error/62357

@Mugen87 tracked the issue: "it seems this is a regression in FBXLoader which was introduced in r159 by this PR: #27057 "

Reproduction steps

  1. Create a model with simple rotation animation in blender and export to fbx with animation and default settings (or download this example: https://discourse.threejs.org/uploads/short-url/1zwNloZNfCRb2L3vnYk7vt1xYnQ.fbx )
  2. Drag`n drop it into threejs editor
  3. Error appears

Code

three.module.js:42485 Uncaught (in promise) Error: THREE.KeyframeTrack: no keyframes in track named Cube.quaternion
    at new KeyframeTrack (three.module.js:42485:58)
    at new QuaternionKeyframeTrack (three.module.js:42993:1)
    at AnimationParser.generateRotationTrack (FBXLoader.js:2848:37)
    at AnimationParser.generateTracks (FBXLoader.js:2777:31)
    at FBXLoader.js:2748:34
    at Array.forEach (<anonymous>)
    at AnimationParser.addClip (FBXLoader.js:2746:17)
    at AnimationParser.parse (FBXLoader.js:2456:23)
    at FBXTreeParser.parseScene (FBXLoader.js:926:44)
    at FBXTreeParser.parse (FBXLoader.js:171:8)

Live example

https://threejs.org/editor/

simply dragn drop the fbx file to see the error

Screenshots

No response

Version

160

Device

No response

Browser

No response

OS

No response

@Mugen87
Copy link
Collaborator

Mugen87 commented Mar 12, 2024

/ping @solinehayes

It seems r159 breaks the FBX asset of the OP and I believe the root cause is #27057. Do you mind having a look?

@pikilipita
Copy link

If a project is affected by this issue, can I use the latest threejs version but stick to the fbx loader from r158, or should I stay on threejs r158 until this is solved?

@Mugen87
Copy link
Collaborator

Mugen87 commented May 19, 2024

We do not recommend to use modules from different releases. Even if it seems to work, there might be unexpected side effects.

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

3 participants