3D Model having multiple texture files(Jpg format) not being render

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

Are you getting any error messages in the console?

Also, what is this line supposed to do?

OBJLoader(THREE);

Hi Looeee,

How are you ? Hope doing well.

Actually i am using an NPM package for OBJLoader (https://www.npmjs.com/package/three-obj-loader). So this line just initialize the OBJLoader Class to use further.

Thanks
Avinash

OK, that makes sense. I hadn’t seen that module before.

Do you get any console error messages?

Nope.