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: some textures on Mixamo model fail to load #12067

Closed
looeee opened this issue Aug 28, 2017 · 2 comments · Fixed by #12699
Closed

FBXLoader: some textures on Mixamo model fail to load #12067

looeee opened this issue Aug 28, 2017 · 2 comments · Fixed by #12699
Assignees

Comments

@looeee
Copy link
Collaborator

looeee commented Aug 28, 2017

Here's the model. Mixamo only provides binary FBX unfortunately.

stand_1.zip

It does load, however some of the textures fail and the whole data url gets logged to the console, which crashes the console in Chrome. Here's a truncated version of the error (it repeats for 3 seperate textures).

data:;base64,S2F5ZGFyYSBGQlggQmluYXJ5ICAAGgDoHAAAMAkAAAAAAAAAAAAAEkZCWEh... ../../../../home/app/mixamo-mini/tmp/skins_fccbf8f8-f65d-4324-915e-699da0390df8.fbm/WAFP_clothes_SP.jpg
Image (async)
load @ loader.js:30336
load @ loader.js:30449
parseTexture @ loader.js:46312
parseTextures @ loader.js:46251

If I log the filename in the parseTexture function like so

/**
* @type {THREE.Texture}
*/
const texture = loader.load( fileName );

console.log( fileName );

Then I can see which files are working and which fail:

blob:http://localhost:8008/6558a86f-4023-4b55-a122-7ab0007810f2
loader.js:46344 blob:http://localhost:8008/5dc334b8-10c4-424f-a500-b43fc051c8f0
2loader.js:46344 ../../../../home/app/mixamo-mini/tmp/skins_be3e30ed-c513-4790-a63c-4503ed6a5f49.fbm/WAFP_helmet_SP.jpg
loader.js:46344 blob:http://localhost:8008/7b0cc7f8-ce46-4a4f-aee1-254b936023a3
loader.js:46344 blob:http://localhost:8008/d586390c-5188-4fd8-bd06-b517bab17e44
2loader.js:46344 ../../../../home/app/mixamo-mini/tmp/skins_be3e30ed-c513-4790-a63c-4503ed6a5f49.fbm/WAFP_skin_SP.jpg
loader.js:46344 blob:http://localhost:8008/8822cd1e-d80f-421f-b3d9-399e463a3dab
loader.js:46344 blob:http://localhost:8008/6823d6e5-f804-4238-8628-89cdf25bcef8
loader.js:46344 blob:http://localhost:8008/a0e65b19-6bf0-452e-a77d-cf179473d7a6
2loader.js:46344 ../../../../home/app/mixamo-mini/tmp/skins_be3e30ed-c513-4790-a63c-4503ed6a5f49.fbm/WAFP_clothes_SP.jpg
loader.js:46344 blob:http://localhost:8008/d640f468-3800-4bf3-82ce-6226806f2903

So most of the texture are correctly loading as blobs, however some get the
'../../../../home/app/mixamo-mini/tmp/skins_be3e30ed-c513-4790-a63c-4503ed6a5f49.fbm/` url appended for some reason.

I get similar errors when attempting to load the Dentist's office model from issue #11973
(and I still get the same errors even after applying the fix from #12004 ).

@looeee
Copy link
Collaborator Author

looeee commented Sep 24, 2017

Investigating this further now - the huge console log is actually just happening because of the way I have my app set up. If I load this model using the examples/webgl_loader_fbx code then I get these errors:

WAFP_skin_SP.jpg:1 GET http://threejs.dev/home/app/mixamo-mini/tmp/skins_be3e30ed-c513-4790-a63c-4503ed6a5f49.fbm/WAFP_skin_SP.jpg 404 (Not Found)

WAFP_helmet_SP.jpg:1 GET http://threejs.dev/home/app/mixamo-mini/tmp/skins_be3e30ed-c513-4790-a63c-4503ed6a5f49.fbm/WAFP_helmet_SP.jpg 404 (Not Found)

WAFP_clothes_SP.jpg:1 GET http://threejs.dev/home/app/mixamo-mini/tmp/skins_be3e30ed-c513-4790-a63c-4503ed6a5f49.fbm/WAFP_clothes_SP.jpg 404 (Not Found)

(Note: all textures, embedded or otherwise, still contain a ref to the filepath so home/app/mixamo-mini... is not directly indicative of an error here.)

There are 14 textures referenced by the model, but some are duplicates so the imageMap finally has 8 - and as far as I can see, these three missing files are actually loaded in the map, they are just not getting referenced properly for some reason and the loader tries to pass the URL to the textureLoader, thinking that they are included separately and need to be loaded.

@MarcRibguth
Copy link

Hallo,
I have also some trouble with the textures or colors of this specific object.
Just whanted to share the file to help fixing some problems.

Great work you guys are doing with this loader.

Fan.zip

error: TypeError: Cannot read property '0' of undefined
at Color.fromArray (three.js:5349)
at parseColor (FBXLoader.js:2407)
at parseScene (FBXLoader.js:1001)
at THREE.FBXLoader.parse (FBXLoader.js:78)
at FBXLoader.js:44
at three.js:30057

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

Successfully merging a pull request may close this issue.

3 participants