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 failing to load binary #11487

Closed
CarlBateman opened this Issue Jun 10, 2017 · 30 comments

Comments

Projects
None yet
10 participants
@CarlBateman
Contributor

CarlBateman commented Jun 10, 2017

Description of the problem

FBX loader failing to load binary pearl.fbx from mixamo site.

small-test at

(jsfiddle won't allow CORS)

http://webglworkshop.com/fbx/index.html
fbx file at http://webglworkshop.com/fbx/pearl.fbx

Three.js version
  • Dev
  • r85
  • ...
Browser
  • All of them
  • Chrome
  • Firefox
  • Internet Explorer
  • Opera
OS
  • All of them
  • Windows
  • macOS
  • Linux
  • Android
  • iOS
Summary of console output and errors listed:

THREE.WebGLRenderer 85
100% downloaded Index.html:50
FBX binary version: 7400 FBXLoader.js:3917
Unknown texture application of type TransparentColor, skipping texture FBXLoader.js:526
parseParameters @ FBXLoader.js:526
parseMaterial @ FBXLoader.js:420
parseMaterials @ FBXLoader.js:387
parse @ FBXLoader.js:124
(anonymous) @ FBXLoader.js:61
(anonymous) @ three.js:29466
Unknown texture application of type SpecularColor, skipping texture FBXLoader.js:526
Unknown texture application of type ShininessExponent, skipping texture FBXLoader.js:526
Unknown texture application of type TransparentColor, skipping texture FBXLoader.js:526
Unknown texture application of type SpecularColor, skipping texture FBXLoader.js:526
Unknown texture application of type ShininessExponent, skipping texture FBXLoader.js:526
Unknown texture application of type TransparentColor, skipping texture FBXLoader.js:526
Unknown texture application of type SpecularColor, skipping texture FBXLoader.js:526
Unknown texture application of type ShininessExponent, skipping texture FBXLoader.js:526
Unknown texture application of type TransparentColor, skipping texture FBXLoader.js:526
Unknown texture application of type SpecularColor, skipping texture FBXLoader.js:526
Unknown texture application of type ShininessExponent, skipping texture FBXLoader.js:526
Unknown texture application of type TransparentColor, skipping texture FBXLoader.js:526
Unknown texture application of type SpecularColor, skipping texture FBXLoader.js:526
Unknown texture application of type ShininessExponent, skipping texture FBXLoader.js:526
FBXLoader: Vertex has more than 4 skinning weights assigned to vertex. Deleting additional weights. FBXLoader.js:780
genGeometry @ FBXLoader.js:780
parseMeshGeometry @ FBXLoader.js:686
parseGeometry @ FBXLoader.js:659
parseGeometries @ FBXLoader.js:636
parse @ FBXLoader.js:126
(anonymous) @ FBXLoader.js:61
(anonymous) @ three.js:29466
pearl/pearl.fbx 1 26 index.html:44
TypeError: Cannot read property 'values' of null Index.html:55
at http://localhost:65003/root/three/FBXLoader.js:2145:35
at Map.forEach (native)
at parseAnimations (http://localhost:65003/root/three/FBXLoader.js:2133:12)
at parseScene (http://localhost:65003/root/three/FBXLoader.js:1606:22)
at THREE.FBXLoader.parse (http://localhost:65003/root/three/FBXLoader.js:127:24)
at http://localhost:65003/root/three/FBXLoader.js:61:28
at XMLHttpRequest. (http://localhost:65003/root/three/three.js:29466:21)
onError @ Index.html:55
(anonymous) @ FBXLoader.js:69

blob:http://localhost:65003/e4f94a03-16ab-49d6-b41b-fa7f0f286dec 2 26 Index.html:44
blob:http://localhost:65003/227f8e8f-f9c5-4f6a-945a-eed1573a4759 3 26 Index.html:44
blob:http://localhost:65003/eca94845-73fb-4d58-9d64-874806d92571 4 26 Index.html:44
blob:http://localhost:65003/35c2f7b8-f078-4c31-9578-dd33b44f283f 5 26 Index.html:44
blob:http://localhost:65003/4b16603d-1538-4add-80f0-8f44463f5a72 6 26 Index.html:44
blob:http://localhost:65003/394172ac-4faa-4bd3-90aa-6b81e90fe027 7 26 Index.html:44
blob:http://localhost:65003/661a04de-1afb-4ae9-aee6-08bfad529073 8 26 Index.html:44
blob:http://localhost:65003/5704e2c5-6279-450d-aec7-3f7eb670762e 9 26 Index.html:44
blob:http://localhost:65003/4cf6158f-a61c-49db-a761-f45cde1920c6 10 26 Index.html:44
blob:http://localhost:65003/a0c1ac3b-f2bd-499c-b8a3-f3d1f3f68faa 11 26 Index.html:44
blob:http://localhost:65003/aa4ea3d2-db4e-4dc7-a770-fa52b50e2136 12 26 Index.html:44
blob:http://localhost:65003/aa5e2229-00cb-42ba-a16d-5fb7fd5970f8 13 26 Index.html:44
blob:http://localhost:65003/c7cb7a04-2fed-4ad4-af1c-676b7c933367 14 26 Index.html:44
blob:http://localhost:65003/2995a256-0d97-430c-8c61-4ab367b09567 15 26 Index.html:44
blob:http://localhost:65003/5f139178-9caf-47a3-b86f-816f94385190 16 26 Index.html:44
blob:http://localhost:65003/eb06be9f-e090-45e7-aad9-6f29d481bc27 17 26 Index.html:44
blob:http://localhost:65003/5311fd2e-4ba0-46b9-8cfb-361d3f32809b 18 26 Index.html:44
blob:http://localhost:65003/644e06bc-eba6-4b12-b54d-0a46bc1cbaaa 19 26 Index.html:44
blob:http://localhost:65003/cbd93517-8f3e-4dea-bcb6-b85a0fe84680 20 26 Index.html:44
blob:http://localhost:65003/fa01269f-afcf-40e0-b1e4-d3a7f9367a70 21 26 Index.html:44
blob:http://localhost:65003/2c98f06c-1141-4963-a9d2-9aace865f47d 22 26 Index.html:44
blob:http://localhost:65003/3b29317c-8ca1-4b53-b1ff-00ee232b0414 23 26 Index.html:44
blob:http://localhost:65003/acbbcf85-f9ad-46fa-87d4-88300219d8b2 24 26 Index.html:44
blob:http://localhost:65003/6875e4b9-75b1-457f-b333-717927894792 25 26 Index.html:44
blob:http://localhost:65003/fea3e1d5-6851-4b2c-9257-d8bd6ba3d89e 26 26 Index.html:44

@Mugen87

This comment has been minimized.

Show comment
Hide comment
@Mugen87

Mugen87 Jun 11, 2017

Collaborator

/ping @takahirox

Collaborator

Mugen87 commented Jun 11, 2017

/ping @takahirox

@Mugen87 Mugen87 added the Bug label Jun 11, 2017

@Bonfims

This comment has been minimized.

Show comment
Hide comment
@Bonfims

Bonfims Jun 12, 2017

The same here with an 3D model with animation from Mixamo.
i can run the same fbx without animations from Mixamo, but, when i get him from mixamo, follow:
image
The character FBX with an animation from Mixamo:
basicCharacter.fbx.txt
The original model:
basicCharacter.original.fbx.txt
The code:
exemplo.js.txt

Is this a mixamo problem? Is my first time using three.js, so far I have not been able to load any kind of fbx with animations, neither mixamo or any other applications.

Bonfims commented Jun 12, 2017

The same here with an 3D model with animation from Mixamo.
i can run the same fbx without animations from Mixamo, but, when i get him from mixamo, follow:
image
The character FBX with an animation from Mixamo:
basicCharacter.fbx.txt
The original model:
basicCharacter.original.fbx.txt
The code:
exemplo.js.txt

Is this a mixamo problem? Is my first time using three.js, so far I have not been able to load any kind of fbx with animations, neither mixamo or any other applications.

@Bonfims

This comment has been minimized.

Show comment
Hide comment
@Bonfims

Bonfims Jun 12, 2017

OOOOW GUYS,
I made a mistake. :(
in my case, was just the wrong way to get models from Mixamo...
image
I was making the download from "My Characters" tab, but, when i tried make the download from "Animations" tab, the model worked on FBXLoader, cool!
mixamo_animation

The right model:
golf_chip.fbx.txt

Bonfims commented Jun 12, 2017

OOOOW GUYS,
I made a mistake. :(
in my case, was just the wrong way to get models from Mixamo...
image
I was making the download from "My Characters" tab, but, when i tried make the download from "Animations" tab, the model worked on FBXLoader, cool!
mixamo_animation

The right model:
golf_chip.fbx.txt

@takahirox

This comment has been minimized.

Show comment
Hide comment
@takahirox

takahirox Jun 15, 2017

Collaborator

Perhaps I've figured out what the root issue of this error is.

In general, AnimationCurveNode is an animation node and
AnimationCurve connected to a node represents animation
(times and values of key frame animation).

But sometimes, AnimationCurveNode doesn't have
any connected AnimationCurve (not sure why tho).

The error disappeared if I ignore such animation nodes.

image

However, the animation seems still weird.
Just her hands and legs tremble.

Where can I see the right animation?

(It's also weird around her eyes but it'd be another issue, maybe textures?)

Collaborator

takahirox commented Jun 15, 2017

Perhaps I've figured out what the root issue of this error is.

In general, AnimationCurveNode is an animation node and
AnimationCurve connected to a node represents animation
(times and values of key frame animation).

But sometimes, AnimationCurveNode doesn't have
any connected AnimationCurve (not sure why tho).

The error disappeared if I ignore such animation nodes.

image

However, the animation seems still weird.
Just her hands and legs tremble.

Where can I see the right animation?

(It's also weird around her eyes but it'd be another issue, maybe textures?)

@CarlBateman

This comment has been minimized.

Show comment
Hide comment
@CarlBateman

CarlBateman Jun 15, 2017

Contributor

Wow! That's certainly looking much better.

There is no animation in the pearl.fbx model. I can generate a separate animation file and upload if you need it (probably a good idea for testing anyway).

The eyes should look like this (this is the same file imported into SketchFab):
pearl-correct
and the original in Mixamo:
pearl-original

Contributor

CarlBateman commented Jun 15, 2017

Wow! That's certainly looking much better.

There is no animation in the pearl.fbx model. I can generate a separate animation file and upload if you need it (probably a good idea for testing anyway).

The eyes should look like this (this is the same file imported into SketchFab):
pearl-correct
and the original in Mixamo:
pearl-original

@CarlBateman

This comment has been minimized.

Show comment
Hide comment
@CarlBateman

CarlBateman Jun 15, 2017

Contributor

I've uploaded pearl_walk.fbx to http://webglworkshop.com/fbx/pearl_walk.fbx

Contributor

CarlBateman commented Jun 15, 2017

I've uploaded pearl_walk.fbx to http://webglworkshop.com/fbx/pearl_walk.fbx

@CarlBateman

This comment has been minimized.

Show comment
Hide comment
@CarlBateman

CarlBateman Jun 20, 2017

Contributor

@takahirox have you committed any changes?

Contributor

CarlBateman commented Jun 20, 2017

@takahirox have you committed any changes?

@takahirox

This comment has been minimized.

Show comment
Hide comment
@takahirox

takahirox Jun 22, 2017

Collaborator

Sorry, still working on it now.

Animation looks fine?

ezgif com-optimize

And one question.
If you load pearl.fbx with other libs/viewers, the girl's hands/legs don't tremble?

Collaborator

takahirox commented Jun 22, 2017

Sorry, still working on it now.

Animation looks fine?

ezgif com-optimize

And one question.
If you load pearl.fbx with other libs/viewers, the girl's hands/legs don't tremble?

@CarlBateman

This comment has been minimized.

Show comment
Hide comment
@CarlBateman

CarlBateman Jun 22, 2017

Contributor

@takahirox looking good. Mixamo has an "In Place" option which should make it easier to check imported animation.

Loading into PlayCanvas, SketchFab, Unity and Blender, the T-pose FBX I linked to has no tremble.

Contributor

CarlBateman commented Jun 22, 2017

@takahirox looking good. Mixamo has an "In Place" option which should make it easier to check imported animation.

Loading into PlayCanvas, SketchFab, Unity and Blender, the T-pose FBX I linked to has no tremble.

@takahirox

This comment has been minimized.

Show comment
Hide comment
@takahirox

takahirox Jun 22, 2017

Collaborator

Thanks. It seems the file actually has tremble animation, not sure how FBXLoader should handle it yet.
I'll make PR to avoid the failure so far.

Collaborator

takahirox commented Jun 22, 2017

Thanks. It seems the file actually has tremble animation, not sure how FBXLoader should handle it yet.
I'll make PR to avoid the failure so far.

@CarlBateman

This comment has been minimized.

Show comment
Hide comment
@CarlBateman

CarlBateman Jun 22, 2017

Contributor

Is it "tremble" or "idle"? If not in T-Pose probably "idle".

Contributor

CarlBateman commented Jun 22, 2017

Is it "tremble" or "idle"? If not in T-Pose probably "idle".

@takahirox

This comment has been minimized.

Show comment
Hide comment
@takahirox

takahirox Jun 23, 2017

Collaborator

Trembling. Probably you'll see what I mentioned if you replace the file with pearl.fbx in webgl_loader_fbx example.

Collaborator

takahirox commented Jun 23, 2017

Trembling. Probably you'll see what I mentioned if you replace the file with pearl.fbx in webgl_loader_fbx example.

@takahirox

This comment has been minimized.

Show comment
Hide comment
@takahirox

takahirox Jun 23, 2017

Collaborator

About her eyes, they seem fine.
That while color is just reflection of light.
This's the screenshot where I changed the light direction.

image

So I think we can close this thread.

Collaborator

takahirox commented Jun 23, 2017

About her eyes, they seem fine.
That while color is just reflection of light.
This's the screenshot where I changed the light direction.

image

So I think we can close this thread.

@CarlBateman

This comment has been minimized.

Show comment
Hide comment
@CarlBateman

CarlBateman Jun 23, 2017

Contributor

Sterling work, you should get a bl**dy knighthood. I have no idea what's causing the tremble.

One minor point, I found the error message confusing (twice). Partly because it's an external, third-party library and maybe partly because "import" has a different meaning to me.

Perhaps, rather than
'FBXLoader: Import inflate.min.js from https://github.com/imaya/zlib.js'
have something like
'FBXLoader: External library Inflate.min.js required, import from https://github.com/imaya/zlib.js'

Contributor

CarlBateman commented Jun 23, 2017

Sterling work, you should get a bl**dy knighthood. I have no idea what's causing the tremble.

One minor point, I found the error message confusing (twice). Partly because it's an external, third-party library and maybe partly because "import" has a different meaning to me.

Perhaps, rather than
'FBXLoader: Import inflate.min.js from https://github.com/imaya/zlib.js'
have something like
'FBXLoader: External library Inflate.min.js required, import from https://github.com/imaya/zlib.js'

@CarlBateman

This comment has been minimized.

Show comment
Hide comment
@CarlBateman

CarlBateman Jun 23, 2017

Contributor

Before closing, the eyelashes should be transparent. Can this be fixed? Should it be a raised as a separate issue?
TIA

image

Contributor

CarlBateman commented Jun 23, 2017

Before closing, the eyelashes should be transparent. Can this be fixed? Should it be a raised as a separate issue?
TIA

image

@takahirox

This comment has been minimized.

Show comment
Hide comment
@takahirox

takahirox Jun 23, 2017

Collaborator

Please file another issue.

Collaborator

takahirox commented Jun 23, 2017

Please file another issue.

@mrdoob

This comment has been minimized.

Show comment
Hide comment
@mrdoob

mrdoob Jun 23, 2017

Owner

Perhaps, rather than
'FBXLoader: Import inflate.min.js from https://github.com/imaya/zlib.js'
have something like
'FBXLoader: External library Inflate.min.js required, import from https://github.com/imaya/zlib.js'

Sounds good to me. Would you like to edit the file directly
https://github.com/mrdoob/three.js/edit/dev/examples/js/loaders/FBXLoader.js

Owner

mrdoob commented Jun 23, 2017

Perhaps, rather than
'FBXLoader: Import inflate.min.js from https://github.com/imaya/zlib.js'
have something like
'FBXLoader: External library Inflate.min.js required, import from https://github.com/imaya/zlib.js'

Sounds good to me. Would you like to edit the file directly
https://github.com/mrdoob/three.js/edit/dev/examples/js/loaders/FBXLoader.js

@CarlBateman

This comment has been minimized.

Show comment
Hide comment
@CarlBateman

CarlBateman Jun 24, 2017

Contributor

Love to, but alas I'm not allowed to edit directly. 😞
fork

Contributor

CarlBateman commented Jun 24, 2017

Love to, but alas I'm not allowed to edit directly. 😞
fork

@jostschmithals

This comment has been minimized.

Show comment
Hide comment
@jostschmithals

jostschmithals Jun 24, 2017

Contributor

@CarlBateman You have to fork the repository first (green button). Then you can create a Pull Request in this way. That might be relevant, too.

Contributor

jostschmithals commented Jun 24, 2017

@CarlBateman You have to fork the repository first (green button). Then you can create a Pull Request in this way. That might be relevant, too.

@CarlBateman

This comment has been minimized.

Show comment
Hide comment
@CarlBateman

CarlBateman Jun 24, 2017

Contributor

In VS, got the repo, made changes but can't push it.

In terminal got as far as:
git pull upstream dev
fatal: 'upstream' does not appear to be a git repository
fatal: Could not read from remote repository.

So, yeah. I don't have a clue what's going on.

Do you mean fork or download? The green button is labelled "clone or download".
Fork just copies the repo to my github account.

Contributor

CarlBateman commented Jun 24, 2017

In VS, got the repo, made changes but can't push it.

In terminal got as far as:
git pull upstream dev
fatal: 'upstream' does not appear to be a git repository
fatal: Could not read from remote repository.

So, yeah. I don't have a clue what's going on.

Do you mean fork or download? The green button is labelled "clone or download".
Fork just copies the repo to my github account.

@jdanford

This comment has been minimized.

Show comment
Hide comment
@jdanford

jdanford Jun 24, 2017

Contributor

You should fork this repository, clone your fork, and then run git remote add upstream git@github.com:mrdoob/three.js.git to add the upstream repository.

Contributor

jdanford commented Jun 24, 2017

You should fork this repository, clone your fork, and then run git remote add upstream git@github.com:mrdoob/three.js.git to add the upstream repository.

@CarlBateman

This comment has been minimized.

Show comment
Hide comment
@CarlBateman

CarlBateman Jun 24, 2017

Contributor

Thanks for the feedback. In the end, I used "github desktop" and managed to raise the pull request.

Contributor

CarlBateman commented Jun 24, 2017

Thanks for the feedback. In the end, I used "github desktop" and managed to raise the pull request.

@JamesHealdUK

This comment has been minimized.

Show comment
Hide comment
@JamesHealdUK

JamesHealdUK Aug 16, 2017

I've actually had a similar issue loading local files, only my FBXLoader seems to entirely miss the version of the file:

Uncaught Error: THREE.FBXLoader: Cannot find the version number for the file given.
    at getFbxVersion (FBXLoader.js:4950)
    at THREE.FBXLoader.parse (FBXLoader.js:105)
    at init ((index):271)
    at start ((index):110)
    at HTMLButtonElement.onclick ((index):534)

JamesHealdUK commented Aug 16, 2017

I've actually had a similar issue loading local files, only my FBXLoader seems to entirely miss the version of the file:

Uncaught Error: THREE.FBXLoader: Cannot find the version number for the file given.
    at getFbxVersion (FBXLoader.js:4950)
    at THREE.FBXLoader.parse (FBXLoader.js:105)
    at init ((index):271)
    at start ((index):110)
    at HTMLButtonElement.onclick ((index):534)
@mrdoob

This comment has been minimized.

Show comment
Hide comment
@mrdoob

mrdoob Aug 16, 2017

Owner

@JamesHealdUK It would be helpful if you could share the .fbx file...

Owner

mrdoob commented Aug 16, 2017

@JamesHealdUK It would be helpful if you could share the .fbx file...

@Travis1282

This comment has been minimized.

Show comment
Hide comment
@Travis1282

Travis1282 Dec 29, 2017

I'm running into the same problem as James both locally and on a server.

Error: THREE.FBXLoader: Cannot find the version number for the file given.
at getFbxVersion (FBXLoader.js:3529)
at THREE.FBXLoader.parse (FBXLoader.js:90)
at Object.onLoad (FBXLoader.js:53)
at XMLHttpRequest. (three.js:30794)

vorona_256

Travis1282 commented Dec 29, 2017

I'm running into the same problem as James both locally and on a server.

Error: THREE.FBXLoader: Cannot find the version number for the file given.
at getFbxVersion (FBXLoader.js:3529)
at THREE.FBXLoader.parse (FBXLoader.js:90)
at Object.onLoad (FBXLoader.js:53)
at XMLHttpRequest. (three.js:30794)

vorona_256

@mrdoob

This comment has been minimized.

Show comment
Hide comment
@mrdoob

mrdoob Dec 29, 2017

Owner

@Travis1282 It would be helpful if you could share the .fbx file...

Owner

mrdoob commented Dec 29, 2017

@Travis1282 It would be helpful if you could share the .fbx file...

@Travis1282

This comment has been minimized.

Show comment
Hide comment
@mrdoob

This comment has been minimized.

Show comment
Hide comment
@mrdoob
Owner

mrdoob commented Dec 29, 2017

/ping @looeee

@looeee

This comment has been minimized.

Show comment
Hide comment
@looeee

looeee Jan 1, 2018

Collaborator

@Travis1282 would you mind opening a new issue about this? I'll take a look.

Collaborator

looeee commented Jan 1, 2018

@Travis1282 would you mind opening a new issue about this? I'll take a look.

@looeee

This comment has been minimized.

Show comment
Hide comment
@looeee

looeee Jan 2, 2018

Collaborator

@Travis1282 your model gets past the version check in the latest FBXLoader:

THREE.WebGLRenderer 90dev
THREE.FBXLoader: FBX binary version: 6000

However something in the BinaryParser is failing silently and I haven't been able to figure out where, except that there seem to be some non-unicode characters parsed (displaying as ? when I log them to the console).

It's likely that this is because your model is a very old version - the current FBX Binary version is 7400.
The best thing for you to do is to re-export your model with a newer version.

Collaborator

looeee commented Jan 2, 2018

@Travis1282 your model gets past the version check in the latest FBXLoader:

THREE.WebGLRenderer 90dev
THREE.FBXLoader: FBX binary version: 6000

However something in the BinaryParser is failing silently and I haven't been able to figure out where, except that there seem to be some non-unicode characters parsed (displaying as ? when I log them to the console).

It's likely that this is because your model is a very old version - the current FBX Binary version is 7400.
The best thing for you to do is to re-export your model with a newer version.

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