# How to assign multiple image textures to a subdivided face

**URL:** <https://discourse.threejs.org/t/how-to-assign-multiple-image-textures-to-a-subdivided-face/37043>\
**Category:** Questions\
**Tags:** materials, geometry\
**Created:** [April 13, 2022, 7:46pm UTC](https://discourse.threejs.org/t/how-to-assign-multiple-image-textures-to-a-subdivided-face/37043 "2022-04-13T19:46:35Z")\
**Posts on this page:** 1\
**Showing post:** 2

<div class="post-metadata">

**Author:** ![hofk](https://yyz1.discourse-cdn.com/flex035/user_avatar/discourse.threejs.org/hofk/32/44944_2.png) [@hofk](https://discourse.threejs.org/u/hofk)\
**Post date:** [April 14, 2022, 6:45am UTC](https://discourse.threejs.org/t/how-to-assign-multiple-image-textures-to-a-subdivided-face/37043/2 "2022-04-14T06:45:03Z")

</div>

If you assign the same material index to the two triangles of a quad, you get what you want.

The thing works of course also with BufferGeometry and thus for current revisions.

Take a look at these things.

[ColorWave](https://hofk.de/main/discourse.threejs/2020/ColorWave/ColorWave.html)  
[DoubleSide(gl\_FrontFacing)](https://hofk.de/main/discourse.threejs/2020/DoubleSide(gl_FrontFacing)/DoubleSide(gl_FrontFacing).html)  
( From the [Collection of examples from discourse.threejs.org](https://discourse.threejs.org/t/collection-of-examples-from-discourse-threejs-org/4315) . )

[Select faces within radius](https://discourse.threejs.org/t/select-faces-within-radius/5764)  
[Wireframe of quads](https://discourse.threejs.org/t/wireframe-of-quads/17924)

[Magic Box](https://hofk.de/main/threejs/sandboxthreeg/MagicBoxTHREEg.html) example 20

To [THREE.Geometry will be removed from core with r125 - #26 by hofk](https://discourse.threejs.org/t/three-geometry-will-be-removed-from-core-with-r125/22401/26)  
ind.BufferGeo [SpeedTest\_r124](https://hofk.de/main/discourse.threejs/2021/SpeedTest_r124/SpeedTest_r124.html)

* * *

see also [Faces on BufferGeometry](https://discourse.threejs.org/t/faces-on-buffergeometry/30921)

* * *

To compare old geometry and BufferGeometry (example SpeedTest)

```javascript

	// faces Geometry or BufferGeometry	
	
	for ( let j = 0; j < rs; j ++ ) {
	
		j0 = hss * j; 
		j1 = hss * ( j + 1 );
		
		for ( let i = 0; i < hs; i ++ ) {
			
			// 2 faces / segment, 3 vertex indices
			a = j0 + i;
			b1 = j1 + i; // right-bottom
			c1 = j1 + 1 + i;
			// b2 = j1 + 1 + i; =c1// left-top 
			c2 = j0 + 1 + i;
			
			if ( g.isGeometry ) {
				
				g.faces.push( new THREE.Face3( a, b1, c1 ) ); // right-bottom
				g.faces.push( new THREE.Face3( a, c1, c2 ) ); // left-top
				
			}
			
			if ( g.isBufferGeometry ) {
			
				g.faceIndices[idxCount] = a; // right-bottom
				g.faceIndices[idxCount + 1] = b1;
				g.faceIndices[idxCount + 2] = c1; 
				
				g.faceIndices[idxCount + 3] = a; // left-top
				g.faceIndices[idxCount + 4] = c1,
				g.faceIndices[idxCount + 5] = c2; 
				
				idxCount += 6;
				
			}
						
		}
		
	}

```

---

_[View the full topic](https://discourse.threejs.org/t/how-to-assign-multiple-image-textures-to-a-subdivided-face/37043)._
