# How To Assign a Texture to a Singe Face of a Box

**URL:** <https://forum.babylonjs.com/t/how-to-assign-a-texture-to-a-singe-face-of-a-box/12590>\
**Category:** Questions\
**Created:** [July 17, 2020, 12:59pm UTC](https://forum.babylonjs.com/t/how-to-assign-a-texture-to-a-singe-face-of-a-box/12590 "2020-07-17T12:59:03Z")\
**Posts on this page:** 9\
**Page:** 1

<div class="post-metadata">

**Author:** ![steveS](https://sea2.discourse-cdn.com/flex024/user_avatar/forum.babylonjs.com/steves/32/10336_2.png) [@steveS](https://forum.babylonjs.com/u/steveS)\
**Post date:** [July 17, 2020, 12:59pm UTC](https://forum.babylonjs.com/t/how-to-assign-a-texture-to-a-singe-face-of-a-box/12590/1 "2020-07-17T12:59:03Z")

</div>

Hello Everyone,  
This is my first post here.  
I am still learning the how-to’s of BabylonJS and I am stuck at a something  
Is there a possible way by code to assign a texture to only one face of a box?  
[https://playground.babylonjs.com/#M6Z7UW#1](https://playground.babylonjs.com/#M6Z7UW#1)

Here is the PG I am working on, what I am trying to achieve is that I want the “AAA” texture to only display on the side facing the camera.

Thanks in advance 😃

---

<div class="post-metadata">

**Author:** ![JohnK](https://sea2.discourse-cdn.com/flex024/user_avatar/forum.babylonjs.com/johnk/32/26764_2.png) [@JohnK](https://forum.babylonjs.com/u/JohnK)\
**Post date:** [July 17, 2020, 1:19pm UTC](https://forum.babylonjs.com/t/how-to-assign-a-texture-to-a-singe-face-of-a-box/12590/2 "2020-07-17T13:19:27Z")

</div>

Hi @steveS and welcome to the forum. You can find all about textures on different box faces here - [Apply Material to Individual Faces - Babylon.js Documentation](https://doc.babylonjs.com/how_to/createbox_per_face_textures_and_colors)

and here is an example from your PG [https://playground.babylonjs.com/#M6Z7UW#2](https://playground.babylonjs.com/#M6Z7UW#2)

---

<div class="post-metadata">

**Author:** ![steveS](https://sea2.discourse-cdn.com/flex024/user_avatar/forum.babylonjs.com/steves/32/10336_2.png) [@steveS](https://forum.babylonjs.com/u/steveS)\
**Post date:** [July 17, 2020, 1:20pm UTC](https://forum.babylonjs.com/t/how-to-assign-a-texture-to-a-singe-face-of-a-box/12590/3 "2020-07-17T13:20:49Z")

</div>

Thank you very much 😃

---

<div class="post-metadata">

**Author:** ![Mercurio](https://sea2.discourse-cdn.com/flex024/user_avatar/forum.babylonjs.com/mercurio/32/23383_2.png) [@Mercurio](https://forum.babylonjs.com/u/Mercurio)\
**Post date:** [November 15, 2020, 7:12pm UTC](https://forum.babylonjs.com/t/how-to-assign-a-texture-to-a-singe-face-of-a-box/12590/4 "2020-11-15T19:12:15Z")

</div>

Hi @JohnK, is it possible to assign also different texture to different faces?  
From the manual it seems it’s possible only tu apply UV texture. For example, having a cube as a rooom i’d like to apply one texture on the bottom face, another texture to the walls and another to the top. Is it possible?

---

<div class="post-metadata">

**Author:** ![JohnK](https://sea2.discourse-cdn.com/flex024/user_avatar/forum.babylonjs.com/johnk/32/26764_2.png) [@JohnK](https://forum.babylonjs.com/u/JohnK)\
**Post date:** [November 15, 2020, 7:56pm UTC](https://forum.babylonjs.com/t/how-to-assign-a-texture-to-a-singe-face-of-a-box/12590/5 "2020-11-15T19:56:41Z")

</div>

The image used must contain all 6 textures. You cannot use 6 different texture files.

---

<div class="post-metadata">

**Author:** ![Mercurio](https://sea2.discourse-cdn.com/flex024/user_avatar/forum.babylonjs.com/mercurio/32/23383_2.png) [@Mercurio](https://forum.babylonjs.com/u/Mercurio)\
**Post date:** [November 15, 2020, 9:38pm UTC](https://forum.babylonjs.com/t/how-to-assign-a-texture-to-a-singe-face-of-a-box/12590/6 "2020-11-15T21:38:24Z")

</div>

Ok Thanks, in this case if i use uScale and vScale to make a tile texture what’s the effect? For example i use a texture for the floor that i replicate to make the illusion of tiles. Is it still possible even with UVimages?

---

<div class="post-metadata">

**Author:** ![JohnK](https://sea2.discourse-cdn.com/flex024/user_avatar/forum.babylonjs.com/johnk/32/26764_2.png) [@JohnK](https://forum.babylonjs.com/u/JohnK)\
**Post date:** [November 15, 2020, 11:33pm UTC](https://forum.babylonjs.com/t/how-to-assign-a-texture-to-a-singe-face-of-a-box/12590/7 "2020-11-15T23:33:38Z")

</div>

For more flexibility make your room with 6 planes and a texture for each

---

<div class="post-metadata">

**Author:** ![Mercurio](https://sea2.discourse-cdn.com/flex024/user_avatar/forum.babylonjs.com/mercurio/32/23383_2.png) [@Mercurio](https://forum.babylonjs.com/u/Mercurio)\
**Post date:** [November 16, 2020, 8:23am UTC](https://forum.babylonjs.com/t/how-to-assign-a-texture-to-a-singe-face-of-a-box/12590/8 "2020-11-16T08:23:45Z")

</div>

I’d like to use a box because i really like the feature for hiding walls (side orientation = backside).  
Anyway thank you for the suggestion 👍

---

<div class="post-metadata">

**Author:** ![JohnK](https://sea2.discourse-cdn.com/flex024/user_avatar/forum.babylonjs.com/johnk/32/26764_2.png) [@JohnK](https://forum.babylonjs.com/u/JohnK)\
**Post date:** [November 16, 2020, 9:46am UTC](https://forum.babylonjs.com/t/how-to-assign-a-texture-to-a-singe-face-of-a-box/12590/9 "2020-11-16T09:46:42Z")

</div>

You can get the same result with planes. Here is a starter, need to add roof and floor

> **[Babylon.js Playground](https://www.babylonjs-playground.com/#316IKG)**

Tiling on one wall [https://www.babylonjs-playground.com/#316IKG#1](https://www.babylonjs-playground.com/#316IKG#1)

Could also use tiled planes [Creating A Tiled Plane | Babylon.js Documentation](https://doc.babylonjs.com/divingDeeper/mesh/creation/set/tiled_plane) or tiled box [Creating A Tiled Box | Babylon.js Documentation](https://doc.babylonjs.com/divingDeeper/mesh/creation/set/tiled_box)
