Hi, I have a garment mesh which i can render in blender correctly. However, when i use in three.js with obj and mtl loaders, interestingly i can get a result similar to wireframe which i didn’t want.
mtlLoader.load( mtl_base_path+data[key+"_mtl"], function( materials ) {
materials.preload();
let objLoader = new OBJLoader();
objLoader.setMaterials( materials );
objLoader.load( obj_path, function ( object ) {
object.name=key;
allScenes[type1][type2].add(object)
}, function (xhr) {
console.log(
'Garments:' + (xhr.loaded / xhr.total) * 100 + '% loaded'
)
},
// called when loading has errors
function (error) {
console.log(error)
console.log('An error happened in',key)
} );
});
the mtl file like in the below
Blender MTL File: ‘None’
Material Count: 1
newmtl Skirt_Cotton_FRONT_1170775
Ns 5.000001
Ka 1.000000 1.000000 1.000000
Kd 1.000000 1.000000 1.000000
Ks 0.025778 0.025778 0.025778
Ke 0.000000 0.000000 0.000000
Ni 1.450000
d 1.000000
illum 2
map_Kd gaberdine_black_cotton_R204_G255_B102.png