FBXLoader: fails to load file
See original GitHub issueDescription of the problem
Hello,
the FBXLoader is not loading the file (folder scene1 in attached ZIP) the fbx file verion is binary and higher than 7.0
in 3dMax it works - looks like this:
After loading it with FBXLoader I get this error:
THREE.FBXLoader: FBX binary version: 7400
TypeError: GetData[infoObject.mappingType][infoObject.referenceType] is not a function
at getData (FBXLoader.js:1402)
at FBXLoader.js:949
at Array.forEach (<anonymous>)
at FBXLoader.js:947
at Array.forEach (<anonymous>)
at genGeometry (FBXLoader.js:829)
at parseMeshGeometry (FBXLoader.js:743)
at parseGeometry (FBXLoader.js:680)
at parseGeometries (FBXLoader.js:662)
at THREE.FBXLoader.parse (FBXLoader.js:107)
it seems like it is trying to load function GetData[‘ByVertice’][‘IndexToDirect’] that is not there (I don’t know if it should)
After saving it with 3dMax and loading to THREEJS it works and looking good (folder scene1_max in attached ZIP):
I’m not sure why it is not working with original file. I would like to keep it in original as it is generated by software that I use and I want to pass it automatically to THREEJS without manual opening and saving in external programs like 3dMax.
I was trying to change some things in FBXLoader library (not knowing exactly what I’m doing - by switching off things that were causing problems) just to open original file somehow but what I only achieved is this view (no textures or correct mapping and visible triangles on objects):
FILES (folder “scene1” contains original file that doesn’t work, “scene1_max” contains file saved in max that works): scene.zip
PS: I’m new here so I hope I’m writing about this issue in correct place (if not let me know where should I put it)
Three.js version
- Dev
- r91
Browser
- All of them
- Chrome
- Firefox
- Internet Explorer
OS
- All of them
- Windows
- macOS
- Linux
- Android
- iOS
Hardware Requirements (graphics card, VR Device, …)
Issue Analytics
- State:
- Created 5 years ago
- Comments:10 (5 by maintainers)
Top GitHub Comments
Beautiful! Works like a charm 😃
The model loads correctly and I checked also on other generated files - bigger and more complex and everything is working.
Only issue that I found left is that there are some textures that use .tga image files so those textures are not loaded (object appears all white) but it’s a detail as those textures are used not so often and also I can change them to other format.
Thank you @looeee. I owe you a beer 😉
@looeee I did a PR here: #13841
There is only this “if” line that I know is not so nice… If you could just check it and propose change maybe 😃