zTim
zTim

Reputation: 78

ThreeJS FBX Model is one-sided

i´m trying to load an FBX Model in ThreeJS. If I load the model it is only shown from the bottom and not from the top. It seems like only one side is rendered.

Has anyone a idea to fix that?

My load function:

_LoadAnimatedModel() {
      const loader = new FBXLoader();
      loader.setPath('./resources/models/');
      loader.load('track.fbx', (fbx) => {
        fbx.scale.setScalar(0.1);
        fbx.traverse(c => {          
          c.castShadow = true;
      });

          const anim = new FBXLoader();
          anim.setPath('./resources/models/');
          anim.load('track.fbx', (anim) => {
            const m = new THREE.AnimationMixer(fbx);
            this._mixers.push(m);
            const idle = m.clipAction(anim.animations[0]);
            idle.play();
          });
          this._scene.add(fbx);
      });
  }

The same issue is if i load it into the https://threejs.org/editor/

Bottom Picture

Top Picture

I exported it without Animations and now it is shown on the screen. Have anyone a idea how to export as FBX from blender correctly?

Upvotes: 3

Views: 219

Answers (1)

zTim
zTim

Reputation: 78

For everyone with the same problem. I fixed it by making my track thicker and check "Apply Modifiers" at the export in blender.

Upvotes: 1

Related Questions