title: Three.js - Loading jpg texture on Mesh loaded from an OBJ file
body: <p>I have a human body mesh loaded with <code>OBJMTLLoader</code>, and I want to apply <code>skin.jpg</code> on it.</p>
  
  <p>Loading the texture and OBJ file:</p>
  
  <pre><code>var texloader = new THREE.TextureLoader();
  var skinTexture = texloader.load('/test/skin.jpg', function (tex) {
      skinTexture = tex;
      skinTexture.needsUpdate = true;
  });
  skinTexture.wrapS = THREE.RepeatWrapping;
  skinTexture.wrapT = THREE.RepeatWrapping;
  skinTexture.repeat.set( 4, 4 );
  
  
  var loader = new THREE.OBJMTLLoader();
  
  loader.load( '/test/body.obj', 'test/body.mtl', function ( res ) {
      body = res;
  
      var _body = body.children[0].children[1]
      _body.material = new THREE.MeshLambertMaterial( {
          map: skinTexture
      });
      _body.geometry.computeVertexNormals();
  
      scene.add( body );
  
  }, onProgress, onError );
  </code></pre>
  
  <p>and I have a simple cube that I render the skin on:</p>
  
  <pre><code>    var cubeGeometry = new THREE.BoxGeometry( 1, 1, 1 );
      var cubeMaterial = new THREE.MeshPhongMaterial({
          map: skinTexture
      });
      cube = new THREE.Mesh( cubeGeometry, cubeMaterial );
      scene.add( cube );
  </code></pre>
  
  <p>What I see is this:</p>
  
  <p><a href="https://i.stack.imgur.com/hiUw7.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/hiUw7.png" alt="enter image description here"></a></p>
  
  <p>The cube has the skin applied, but body only gets the colour of it somehow. If I change <code>map: skinTexture</code> to <code>color: 0xff0000</code> the body changes colour, so parameter should be the correct one.</p>
  
  <p>This is a closeup of the head, and cube on the background:</p>
  
  <p><a href="https://i.stack.imgur.com/Uw19P.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/Uw19P.png" alt="enter image description here"></a></p>
  
  <p><code>skin.jpg</code> dimensions are 256x256.</p>
  
  <p>Any ideas why the body doesn't get the same texture as the cube? Thank you</p>