question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Update broke fbx loader, doesn't load textures

See original GitHub issue

FBXLoader doesn’t load textures, I tried swapping out the threejs lib in the node modules to an older one (a month old) and it works, so some update happened which either broke it or changed the way it works?

Import: import { FBXLoader } from "three/examples/jsm/loaders/FBXLoader";

Code:

  loadFBXModel(path, modelFile, pos = [0, 0, 0], size = 0.1) {
    const loader = new FBXLoader();
    loader.setPath(path);
    loader.load(modelFile, (fbx) => {
      fbx.scale.setScalar(size);
      fbx.traverse((c) => {
        c.castShadow = true;
      });
      fbx.position.copy(new THREE.Vector3(...pos));
      this._scene.add(fbx);
    });
  }

how it is with older version: image

how it is in the current version: image

Issue Analytics

  • State:closed
  • Created 2 years ago
  • Reactions:1
  • Comments:9 (3 by maintainers)

github_iconTop GitHub Comments

3reactions
Mugen87commented, Aug 7, 2021

PR is now merged so the module version of FBXLoader is now fixed on dev 👍 .

2reactions
camnewnhamcommented, Aug 6, 2021

Thanks for the reports and providing the sample files. This was caused by https://github.com/mrdoob/three.js/pull/22114 and is resolved by https://github.com/mrdoob/three.js/pull/22289

Read more comments on GitHub >

github_iconTop Results From Across the Web

How can I resolve issue with fbx not loading textures and ...
Warnings appear because your exporter uses unsupported parameters and materials. If possible, convert your model to glb / gltf, this may resolve most...
Read more >
Missing textures from imported fbx file in Unity since update
To solve this in blender, on export fbx settings, you have to click the icon besides Path Mode which says Embeded Textures and...
Read more >
FBX Files Not Importing Into Blender? Here's the Easy Fix
If you've ever sat there wondering why you can't import an FBX file into Blender, there's a simple tool to fix it. And...
Read more >
texturing - .fbx export why there are no materials or textures?
Explanation: The specification does not detail how to load normal maps, only greyscale bump maps. As a result many obj files misuse the...
Read more >
how to resolve (reading 'elements') error while using ...
const loader = new FBXLoader(); @foreach ($files as $file) @if ... If that's the problem, why don't you load the texture separately with ......
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found