Need help to understand why some fbx files not working
I’m using showcase example app. Some fbx files cannot be opened via fbxloader http://localhost:8083/examples/?q=fbx#webgl_loader_fbx
This is not working example (not working geometry and missed materials)
cashregister.fbx (3.6 MB)
This working geometry but missed materials
spider.zip (941.2 KB)
Just a little bit of help for you, maybe try the attached re-exported version of your cash register model.
I used my ASSIMP Viewer to load the original and then export it to FBX again using the ASSIMP library. This re-exported file is bigger than the original but seems to work fine in my FBX Viewer.
Also, your spider works fine as well if I put all the textures and the FBX file together in a single folder and then load it in my FBX Viewer (see the attached screenshot). Your issue is probably with how you make sure the loader knows where to get textures from so try to figure out that part.
cashregister.zip (1.3 MB)
3 Likes
I still don’t understand what the problem is with my original cashregister fbx file…?
And my cashregister example also doesn’t work on your fbx viewer
The same errors as on original threejs environment
There doesn’t seem to be anything wrong with your original file, it’s only that three.js does not know how to process it properly.
This is the reason why I used the ASSIMP library, which apparently knows how to process it and can also re-export it to FBX format that is also readable by three.js library.
I did try importing your original into the Blender software and this worked as well. Blender can re-export to FBX format which is also readable by three.js but the file size was even bigger than what ASSIMP produced.
So, try to do it yourself in the Blender.
1 Like
Just wanted to throw out there that FBX itself is a bit creaky.
It’s proprietary, and there are different versions of the format all under the same .fbx format extension, and there are also text and binary variants.
This makes creating a robust parser difficult, which is why it’s often used only as an interchange format to move between different modelling softwares, and not very well suited to realtime delivery on the web.
It has become a standard because there weren’t better options available in the past.
Now we have GLTF (openGL Transmission Format) which improves the situation a lot. The spec is open, the parsers/exporters are open. The spec supports many modern rendering/model features like mesh and texture compression, instancing, and a whole host of other features, while still being designed as an optimal asset delivery format.
So I wouldn’t expect THREEJS FBX parser to get much love in terms of improving its compatibility. @GitHubDragonFly s advice is good, and I would extend what he stated, with the caveat that you might use these external tools to get away from FBX and into a more open/optimal format like GLTF.
2 Likes