If I use the following code to load the .obj and .mtl downloaded from https://poly.google.com/view/9NXf-SDxJny it works fine, I see the star rendered in my scene.
return new Promise((resolve, reject) =>
{
let mtlLoader = new THREE.MTLLoader();
mtlLoader.crossOrigin = true;
mtlLoader.setPath(ASSETS_PATH);
mtlLoader.load(filename + '.mtl', (materials) =>
{
materials.preload();
let objLoader = new THREE.OBJLoader();
objLoader.setPath(ASSETS_PATH);
objLoader.setMaterials(materials);
objLoader.load(filename + '.obj', (obj) =>
{
this.obj = obj;
resolve(true);
});
});
});
But when I use the same code to load the obj and mtl from https://poly.google.com/view/4-OZNPuTqFq it doesn't show. I don't get any errors. If I remove the line objLoader.setMaterials(materials); then i see the cake but with no material. So it appears to be a material issue.
I have a codepen with the full code here https://codepen.io/steveg3003/pen/6f0d8c4a17ed12bea49b3391a6d80ce3?editors=0010
Thanks