FBX Loader not loading some FBX files

fbx-loader
fbx

#1

Hi everyone, I guess I am the new guy here!

I’ve been working on a project that compiles FBX files into Unity Asset Bundles which currently works fine. I use three.js to display these FBX files on the browser, it works fine most of the time (We use MODO to export / design our models), I have noticed that some models will just not load and will display an this error on the console (Using Chrome, I get a similar error in FireFox):

Uncaught TypeError: Cannot read property ‘traverse’ of undefined

In this case my 3D model was never loaded from the FBX file, yet I am unsure why.

I am currently using revision 90dev.

Here are two working examples:
https://boxelizer.com/renderer.php?mid=5df8bdea3fee477dbcf0f30e55c2e362
https://boxelizer.com/renderer.php?mid=e2229d8d564143ccb1ac6bcc8944885d

And the non-working example:
https://boxelizer.com/renderer.php?mid=08e566c1eb83418687194c3334d8d227

Any suggestions? Have you ever bumped into this?

P.D. I edited the FBXLoader to look for my textures on a different folder (That works fine, and that’s the only thing I have modified) so FBXLoader.js and DexFBXLoader.js are almost the same thing, except for that little variation.


#2

FBXLoader throws an exception when parsing the file of your non-working example:

TypeError: Cannot read property ‘split’ of undefined
at parseImages (https://boxelizer.com/js/loaders/DexFBXLoader.js:209:37)
at THREE.FBXLoader.parse (https://boxelizer.com/js/loaders/DexFBXLoader.js:103:17)
at Object.onLoad (https://boxelizer.com/js/loaders/DexFBXLoader.js:53:23)
at XMLHttpRequest. (https://boxelizer.com/js/three.js:30265:40)

parseImages() uses videoNode.Filename to access the path of the image. The problem is that videoNode only has a FileName property for your FBX file. This could be a problem of the loader (/cc @looeee).

@xedret Apart from that, you should always use the latest version of three.js and FBXLoader. In general, we are not supporting older versions of three.js. However, even the latest version of the loader uses videoNode.Filename.


#3

Hey @Mugen87 thanks a lot, I for some reason my debugger doesn’t get to that point, I will try to fix that myself now that I have a hint on what’s happening (Will also update my files).

Should I submit the fix to the repo?

Also, what browser were you using to get that debug info?


#4

I’m using Chrome.

Let’s see what @looeee thinks about this issue. He knows FBXLoader best.


#5

I’ll take a look in the morning, this does sound like a bug to me.


#6

@xedret is this the file you are having trouble with?

https://boxelizer.scishift.com/3d/assets/33967110dcec4454/b8302273f29150cd.fbx

I can’t get it to download, if you upload the model here I’ll take a look.


#7

@looeee This would be one of the FBX files that I am having issues with:

https://boxelizer.com/assets/08e566c1eb834186/87194c3334d8d227.fbx