Hi,
Today I came across an issue where my 3D model is not being render. Earlier whatever models i had used ,was having MTL,OBJ & a single Texture File(Jpg format). But Today When i tried to render a 3D model having multiple texture(15 Jpg imges) files, my model couldn’t render. I also did googling but couldn’t find any useful material or example that could solve my problem or guide me. In threejs do we use any other mechanism for such type of issue?
Please help
Code Snippet For Loading MTL/OBJ having single texture file:(Current Code)
//3D MTL & Object Loading
var mtlLoader = new MTLLoader(manager);
mtlLoader.setPath('media/' + this.missionId + '/3D/Mesh OBJ/');
mtlLoader.load("threed.mtl", function(materials) {
materials.preload();
materials.materials.texture.map.magFilter = THREE.NearestFilter;
materials.materials.texture.map.minFilter = THREE.LinearFilter;
OBJLoader(THREE);
var objLoader = new THREE.OBJLoader(manager);
objLoader.setMaterials(materials);
objLoader.setPath('media/' + scope.missionId + '/3D/Mesh OBJ/');
objLoader.load("threed.obj", function (object) {
object.traverse(function(child) {
if (child instanceof THREE.Mesh) {
scope.objects.push(child);
}
});
object.up.set(0, 0, 1);
scope.scene.add(object);
});
});
Thanks
Avinash