<p dir="auto">One of the more recent threads on stack overflow suggests<a href="https://stackoverflow.com/questions/47593597/splitting-sprites-texture-atlases-into-tiles-with-three-js" rel="nofollow"> modifying geometry to index into a texture atlas. </a>. I believe i've seen the same answer before though.</p>
<p dir="auto">I also remember three.js had an issue when cloning the texture, they would get duplicated on the gpu.</p>
<p dir="auto">This conversation happened a while ago:<br>
<a class="issue-link js-issue-link" data-error-text="Failed to load title" data-id="53969989" data-permission-text="Title is private" data-url="https://github.com/mrdoob/three.js/issues/5876" data-hovercard-type="issue" data-hovercard-url="/mrdoob/three.js/issues/5876/hovercard" href="https://github.com/mrdoob/three.js/issues/5876">#5876</a></p>
<p dir="auto">This PR more recent:<br>
<a class="issue-link js-issue-link" data-error-text="Failed to load title" data-id="246631722" data-permission-text="Title is private" data-url="https://github.com/mrdoob/three.js/issues/11863" data-hovercard-type="pull_request" data-hovercard-url="/mrdoob/three.js/pull/11863/hovercard" href="https://github.com/mrdoob/three.js/pull/11863">#11863</a></p>
<p dir="auto">Docs say:</p>
<div class="highlight highlight-source-js notranslate position-relative overflow-auto" dir="auto" data-snippet-clipboard-copy-content="var texture = new THREE.TextureLoader().load( &quot;textures/water.jpg&quot; );
texture.wrapS = THREE.RepeatWrapping;
texture.wrapT = THREE.RepeatWrapping;
texture.repeat.set( 4, 4 );"><pre class="notranslate"><span class="pl-k">var</span> <span class="pl-s1">texture</span> <span class="pl-c1">=</span> <span class="pl-k">new</span> <span class="pl-c1">THREE</span><span class="pl-kos">.</span><span class="pl-c1">TextureLoader</span><span class="pl-kos">(</span><span class="pl-kos">)</span><span class="pl-kos">.</span><span class="pl-en">load</span><span class="pl-kos">(</span> <span class="pl-s">"textures/water.jpg"</span> <span class="pl-kos">)</span><span class="pl-kos">;</span>
<span class="pl-s1">texture</span><span class="pl-kos">.</span><span class="pl-c1">wrapS</span> <span class="pl-c1">=</span> <span class="pl-c1">THREE</span><span class="pl-kos">.</span><span class="pl-c1">RepeatWrapping</span><span class="pl-kos">;</span>
<span class="pl-s1">texture</span><span class="pl-kos">.</span><span class="pl-c1">wrapT</span> <span class="pl-c1">=</span> <span class="pl-c1">THREE</span><span class="pl-kos">.</span><span class="pl-c1">RepeatWrapping</span><span class="pl-kos">;</span>
<span class="pl-s1">texture</span><span class="pl-kos">.</span><span class="pl-c1">repeat</span><span class="pl-kos">.</span><span class="pl-en">set</span><span class="pl-kos">(</span> <span class="pl-c1">4</span><span class="pl-kos">,</span> <span class="pl-c1">4</span> <span class="pl-kos">)</span><span class="pl-kos">;</span></pre></div>
<p dir="auto">if i add:</p>
<div class="snippet-clipboard-content notranslate position-relative overflow-auto" data-snippet-clipboard-copy-content="var texFoo = texture.clone()
texFoo.repeat.set(2,2)

var texBar = texture.clone()
texBar.repeat.set(6,6)"><pre class="notranslate"><code class="notranslate">var texFoo = texture.clone()
texFoo.repeat.set(2,2)

var texBar = texture.clone()
texBar.repeat.set(6,6)
</code></pre></div>
<p dir="auto">What should the expectation be here? Mine is that some UV attribute (call it <code class="notranslate">channel0</code> for example) would get scaled by the <code class="notranslate">.repeat</code>  value of the texture, and display all the textures with their appropriate values?</p>
<div class="highlight highlight-source-js notranslate position-relative overflow-auto" dir="auto" data-snippet-clipboard-copy-content="var myMaterial = new THREE.MeshPhongMaterial({
  map: texture,
  specularMap: texFoo,
  normalMap: texBar,
}) "><pre class="notranslate"><span class="pl-k">var</span> <span class="pl-s1">myMaterial</span> <span class="pl-c1">=</span> <span class="pl-k">new</span> <span class="pl-c1">THREE</span><span class="pl-kos">.</span><span class="pl-c1">MeshPhongMaterial</span><span class="pl-kos">(</span><span class="pl-kos">{</span>
  <span class="pl-c1">map</span>: <span class="pl-s1">texture</span><span class="pl-kos">,</span>
  <span class="pl-c1">specularMap</span>: <span class="pl-s1">texFoo</span><span class="pl-kos">,</span>
  <span class="pl-c1">normalMap</span>: <span class="pl-s1">texBar</span><span class="pl-kos">,</span>
<span class="pl-kos">}</span><span class="pl-kos">)</span> </pre></div>
<p dir="auto">And will this still upload only one image to the gpu?</p>
<div class="highlight highlight-source-js notranslate position-relative overflow-auto" dir="auto" data-snippet-clipboard-copy-content="var oneGeometry = new BoxGeom()
var squares_5x5_units_in_world_space = loadTexture()

for ( var i = 0 ; i &lt; 1000 ; i ++ ){
   var mesh = new THREE.Mesh( oneGeometry , new Material())
   var meshScale = Math.random()
   mesh.scale.multiplyScalar(meshScale)
   mesh.position.set(Math.random(),Math.random(),Math.random())

   mesh.material.map = squares_5x5_units_in_world_space.clone() //should still use one image?
   mesh.material.map.repeat(meshScale, meshScale)
}"><pre class="notranslate"><span class="pl-k">var</span> <span class="pl-s1">oneGeometry</span> <span class="pl-c1">=</span> <span class="pl-k">new</span> <span class="pl-v">BoxGeom</span><span class="pl-kos">(</span><span class="pl-kos">)</span>
<span class="pl-k">var</span> <span class="pl-s1">squares_5x5_units_in_world_space</span> <span class="pl-c1">=</span> <span class="pl-en">loadTexture</span><span class="pl-kos">(</span><span class="pl-kos">)</span>

<span class="pl-k">for</span> <span class="pl-kos">(</span> <span class="pl-k">var</span> <span class="pl-s1">i</span> <span class="pl-c1">=</span> <span class="pl-c1">0</span> <span class="pl-kos">;</span> <span class="pl-s1">i</span> <span class="pl-c1">&lt;</span> <span class="pl-c1">1000</span> <span class="pl-kos">;</span> <span class="pl-s1">i</span> <span class="pl-c1">++</span> <span class="pl-kos">)</span><span class="pl-kos">{</span>
   <span class="pl-k">var</span> <span class="pl-s1">mesh</span> <span class="pl-c1">=</span> <span class="pl-k">new</span> <span class="pl-c1">THREE</span><span class="pl-kos">.</span><span class="pl-c1">Mesh</span><span class="pl-kos">(</span> <span class="pl-s1">oneGeometry</span> <span class="pl-kos">,</span> <span class="pl-k">new</span> <span class="pl-v">Material</span><span class="pl-kos">(</span><span class="pl-kos">)</span><span class="pl-kos">)</span>
   <span class="pl-k">var</span> <span class="pl-s1">meshScale</span> <span class="pl-c1">=</span> <span class="pl-v">Math</span><span class="pl-kos">.</span><span class="pl-en">random</span><span class="pl-kos">(</span><span class="pl-kos">)</span>
   <span class="pl-s1">mesh</span><span class="pl-kos">.</span><span class="pl-c1">scale</span><span class="pl-kos">.</span><span class="pl-en">multiplyScalar</span><span class="pl-kos">(</span><span class="pl-s1">meshScale</span><span class="pl-kos">)</span>
   <span class="pl-s1">mesh</span><span class="pl-kos">.</span><span class="pl-c1">position</span><span class="pl-kos">.</span><span class="pl-en">set</span><span class="pl-kos">(</span><span class="pl-v">Math</span><span class="pl-kos">.</span><span class="pl-en">random</span><span class="pl-kos">(</span><span class="pl-kos">)</span><span class="pl-kos">,</span><span class="pl-v">Math</span><span class="pl-kos">.</span><span class="pl-en">random</span><span class="pl-kos">(</span><span class="pl-kos">)</span><span class="pl-kos">,</span><span class="pl-v">Math</span><span class="pl-kos">.</span><span class="pl-en">random</span><span class="pl-kos">(</span><span class="pl-kos">)</span><span class="pl-kos">)</span>

   <span class="pl-s1">mesh</span><span class="pl-kos">.</span><span class="pl-c1">material</span><span class="pl-kos">.</span><span class="pl-c1">map</span> <span class="pl-c1">=</span> <span class="pl-s1">squares_5x5_units_in_world_space</span><span class="pl-kos">.</span><span class="pl-en">clone</span><span class="pl-kos">(</span><span class="pl-kos">)</span> <span class="pl-c">//should still use one image?</span>
   <span class="pl-s1">mesh</span><span class="pl-kos">.</span><span class="pl-c1">material</span><span class="pl-kos">.</span><span class="pl-c1">map</span><span class="pl-kos">.</span><span class="pl-en">repeat</span><span class="pl-kos">(</span><span class="pl-s1">meshScale</span><span class="pl-kos">,</span> <span class="pl-s1">meshScale</span><span class="pl-kos">)</span>
<span class="pl-kos">}</span></pre></div>
<p dir="auto">I guess I can test both.</p>
<h5 dir="auto">Three.js version</h5>
<ul class="contains-task-list">
<li class="task-list-item"><input type="checkbox" id="" disabled="" class="task-list-item-checkbox" checked=""> Dev</li>
<li class="task-list-item"><input type="checkbox" id="" disabled="" class="task-list-item-checkbox" checked=""> r88</li>
</ul>
<h5 dir="auto">Description of the problem</h5>
<p dir="auto"><code class="notranslate">ObjectLoader</code> doesn't support parsing the following geometries:</p>
<ul dir="auto">
<li><code class="notranslate">TextGeometry</code></li>
<li><code class="notranslate">ParametricGeometry</code></li>
<li><code class="notranslate">InstancedGeometry</code></li>
<li><del><code class="notranslate">WireframeGeometry</code></del></li>
</ul>
<p dir="auto">This causes an issue where the Editor cannot load any scenes or objects that use these geometries.</p>
<h5 dir="auto">Three.js version</h5>
<ul class="contains-task-list">
<li class="task-list-item"><input type="checkbox" id="" disabled="" class="task-list-item-checkbox" checked=""> Dev</li>
<li class="task-list-item"><input type="checkbox" id="" disabled="" class="task-list-item-checkbox" checked=""> r102</li>
</ul>
<h5 dir="auto">Browser</h5>
<ul class="contains-task-list">
<li class="task-list-item"><input type="checkbox" id="" disabled="" class="task-list-item-checkbox" checked=""> All of them</li>
<li class="task-list-item"><input type="checkbox" id="" disabled="" class="task-list-item-checkbox"> Chrome</li>
<li class="task-list-item"><input type="checkbox" id="" disabled="" class="task-list-item-checkbox"> Firefox</li>
<li class="task-list-item"><input type="checkbox" id="" disabled="" class="task-list-item-checkbox"> Internet Explorer</li>
</ul>
<h5 dir="auto">OS</h5>
<ul class="contains-task-list">
<li class="task-list-item"><input type="checkbox" id="" disabled="" class="task-list-item-checkbox" checked=""> All of them</li>
<li class="task-list-item"><input type="checkbox" id="" disabled="" class="task-list-item-checkbox"> Windows</li>
<li class="task-list-item"><input type="checkbox" id="" disabled="" class="task-list-item-checkbox"> macOS</li>
<li class="task-list-item"><input type="checkbox" id="" disabled="" class="task-list-item-checkbox"> Linux</li>
<li class="task-list-item"><input type="checkbox" id="" disabled="" class="task-list-item-checkbox"> Android</li>
<li class="task-list-item"><input type="checkbox" id="" disabled="" class="task-list-item-checkbox"> iOS</li>
</ul>