Hello , I have a .glb model that is rendered but without texture , what should I do?
I’m loading a .glb file using this code :
var world = new THREE.Group();
var mesh = new THREE.AxisHelper();
world.add(mesh);
let loader = new THREE.GLTFLoader();
loader.load('assets/models/FBX/model.glb', function ( gltf ) {
gltf.scene.traverse( function( node ) {
if ( node instanceof THREE.Mesh ) {
node.castShadow = true;
node.receiveShadow = true; }
} );
gltf.scene.scale.set(0.05,0.05,0.05);
world.add( gltf.scene );
}, undefined, function ( error ) { console.error( error );} );
The code above is working with any other .gltf models , but with this one it doesn’t load the textures / materials.
The thing is , I’ve already followed some steps seen on this website like : testing the model on a online viewer tool or using the callback function to log the errors for example.
When I render this object , I don’t get any errors / warnings.
Even more : on the online gltf viewer tools the model seems to look the same ( it renders without any textures / materials ).What should I do?
I mean , ok , I understand there’s a high chance to have a bugged / non-functional model (if the online viewer tools are displaying the same results), but what should I do?
Thank you for help!
P.S : Yes , even if it’s ‘…/FBX/…’ path , I’ve used a fbx to gltf2 online converter and got a .glb file