Apply texture on child of obj object?

Hi All,

I have a problem when I want to color the front of the object, I have one mesh that was merged in Blender,
But when I apply the texture it seems as separate and drow two images rather than one on all the front face.

    textureFront = textureLoader.load("/colors/" + color + ".png");
    textureFront.wrapS = textureFront.wrapT = THREE.RepeatWrapping;
    textureFront.repeat.set(0.018, 0.01);
    textureFront.offset.set(0.52, 0.32);
    scene.children[index].children[1] = textureFront;


Looks like texture coordinates are not properly defined and now produce a seam. Try to recompute the uv data after the merge in Blender and already apply the texture on it. After that export to glTF and load the resulting asset via THREE.GLTFLoader.

1 Like

Thank you @Mugen87,
The glTF type is better than OBJ?

At least in context of web based applications, yes. glTF should be the first choice if you have to load 3D assets into your app. It is the recommended 3D format of three.js. Some additional information about this topic right here: three.js docs

1 Like

Thank you very much @Mugen87