title: Three.js model smooth polygons
body: <p>I got something like this:</p>
  
  <pre><code>var manager = new THREE.LoadingManager();
  manager.onProgress = function ( item, loaded, total ) {
  
      console.log( item, loaded, total );
  
  };
  
  var texture = new THREE.Texture();
  
  var loader = new THREE.ImageLoader( manager );
  loader.load( 'obj/'+model+'.jpg', function ( image ) {
  
      texture.anisotropy = anis;
      texture.image = image;
      texture.needsUpdate = true;
  
  } );
  
  // model
  
  var loader = new THREE.OBJLoader( manager );
  loader.load( 'obj/'+model+'.obj', function ( object ) {
  
  
      object.traverse( function ( child ) {
  
          if ( child instanceof THREE.Mesh ) {
  
              child.material.map = texture;
              if(reflex){
                  child.material.envMap = reflection;
                  child.material.shading = THREE.SmoothShading;
                  child.material.reflectivity = reflex;
              }
  
          }
  
      } );
  
      object.scale.set(10,10,10);
  
      object.position.y = pos;
      object.position.z = 0;
      object.position.x = 0;
  
      object.name = "model";
      scene.add( object );
  } );
  </code></pre>
  
  <p>Works fine, but... all polygons on model are visible this way... </p>
  
  <p><img src="https://i.stack.imgur.com/CIYtu.jpg" alt="enter image description here"></p>
  
  <p>I would like to smooth things up... so I read <a href="http://www.kadrmasconcepts.com/blog/2011/11/06/subdivision-surfaces-with-three-js/" rel="noreferrer">here</a>
  , that I could smooth them up like that:</p>
  
  <pre><code>// First we want to clone our original geometry.
  // Just in case we want to get the low poly version back.
  var smooth = THREE.GeometryUtils.clone( geometry );
  
  // Next, we need to merge vertices to clean up any unwanted vertex. 
  smooth.mergeVertices();
  
  // Create a new instance of the modifier and pass the number of divisions.
  var modifier = new THREE.SubdivisionModifier(divisions);
  
  // Apply the modifier to our cloned geometry.
  modifier.modify( smooth );
  
  // Finally, add our new detailed geometry to a mesh object and add it to our scene.
  var mesh = new THREE.Mesh( smooth, new THREE.MeshPhongMaterial( { color: 0x222222 } ) );
  scene.add( mesh );
  </code></pre>
  
  <p>But... I have no idea where do I get that geometry object... could anybody help me out? </p>