How to load multiple textures in a model

I’m trying load this model

https://free3d.com/3d-model/environment-23742.html

It’s a city, so it’s one FBX with 9 textures. How can I load this in three JS? I’m only know how load a FBX with one texture

Since your FBX files has TGA textures, it’s necessary that you configure your loader like so:

const manager = new THREE.LoadingManager();
manager.addHandler( /\.tga$/i, new TGALoader() );

const loader = new FBXLoader( manager );

This will ensure FBXLoader can actually load TGA textures.

Apart from that I have encountered a small bug this context. You need this patch so textures are loaded from the right path. I’ll file a PR at GitHub.

1 Like
2 Likes

With the above patch, the model looks like so:

Should be available with the next release r129.

1 Like