2

I'm trying to use the Three.js FBXLoader and I'm fairly new to it. When I tried loading the FBX model I exported from blender though it didn't work. Were no errors in the console and It's a little frustrating.

I have tried :

  • Inflate.min.js
  • moving the camera
  • Changing the way I export in blender
  • Using OnError. (but I could be using it wrong.)
  • Etc

Here's my Javascript Code for the loader:

var loader = new THREE.FBXLoader();
loader.load('mmm.fbx', function (object) { scene.add(object) });

It was basic so I expected my model to load properly but nothing's happening. Everything else is working properly but the model isn't.

Kenny
  • 21
  • 1
  • 2
  • I am assuming you already have a renderer object running, is that right? – Xedret May 10 '19 at 06:54
  • I have experienced problems like this one when I do not add an actor (Or animation), so I have to add an empty animation with a single keyframe. – Xedret May 10 '19 at 06:57
  • Yes I have the render object running, and sorry for asking I'm new but how do I do that? – Kenny May 10 '19 at 07:02
  • Hi, I just added a cube to the scene to make sure there wasn't something wrong with my localhost. When I zoomed out I found my model ; it just black. Whenever I zoomed out too far though it would just disappear. Do you know how I can solve this? – Kenny May 10 '19 at 09:37
  • @Kenny Did you add a light? You can try 'object.frustumCulled = false' to try to solve disappearing problem. It would be much easier to solve with a jsfiddle. – corashina May 10 '19 at 10:10
  • Check out this example that uses the FBX loader: https://boxelizer.com/renderer.php?mid=60e08f7b67d34fd3881659e7d58b38f7 – Xedret May 10 '19 at 17:31
  • I haven't added lights yet but I did notice something odd. Everytime I moved back with orbit controls I would alway see my model but no matter which direction I moved in I would always run into it. For some odd reason I can only see it up close and I can't change it's position ; later I checked the three.js editor and I'm having the same issue there too. – Kenny May 11 '19 at 05:32
  • I tried using object.frustumCulled = false, it didn't change so I think it might be an export or import problem, I also added in a light and my model is affected by the light but It isn't visible when I zoom back in. – Kenny May 11 '19 at 05:45

0 Answers0