Closed adam-clarey closed 7 years ago
It looks that your file is not compiled as content of project. Check file 'example.fbx' Properties in Visual Studio and change property Content to 'True'.
It is compiled as content as mentioned above. I've also cleaned and rebuilt the project afterwards
It should be simple enough to test. I've attached a simple fbx file green.fbx.zip
Can you please try a new variant of the ThreeJS sample app in the develop/sample-threejs-fbxloader branch and let me know if it works properly for you.
The FBX loader (FbxLoader.js) is not part of ThreeJS, it needs to be added to the scripts list explicitly. The FBX loader in turn requires parts of Zlib.js that also have to be referenced in the scripts list. The branch above is adding these required scripts, the FBX file itself and updating the script to make use of them.
I don't know if the latest version of ThreeJS is required for the FBXLoader to work, but I'll upgrade it anyway.
Latest version of three.js for STLLoader is needed. I think it will be same behaviour for FBXLoader. You need to download latest library. Next problem could be if there is more than one shader in fbx (I dont know this format), but it is already different issue.
We have a fix for the multiple shaders issue, in PR.
I created a sample script for the FBX loader. Look in the WebSamples folder.
What i thought would be somewhat simple, seems to not work.
I added a basic .fbx file in the ThreeJS/Scripts folder (alongside texture.png). I then added the reference to the file in the Solution Explorer, I ensured that Content was set to true. So at this point my 'example.fbx' should behave the same as 'texture.png'.
However when I try to load the fbx like so:
There is an exception saying it cannot find the file.
Please help! Thank you