# How to use textures with multiple maps? (basic texture mapping question)

**URL:** <https://forum.babylonjs.com/t/how-to-use-textures-with-multiple-maps-basic-texture-mapping-question/20348>\
**Category:** Questions\
**Created:** [April 27, 2021, 5:18am UTC](https://forum.babylonjs.com/t/how-to-use-textures-with-multiple-maps-basic-texture-mapping-question/20348 "2021-04-27T05:18:23Z")\
**Posts on this page:** 10\
**Page:** 1

<div class="post-metadata">

**Author:** ![splash27](https://avatars.discourse-cdn.com/v4/letter/s/76d3ee/32.png) [@splash27](https://forum.babylonjs.com/u/splash27)\
**Post date:** [April 27, 2021, 5:18am UTC](https://forum.babylonjs.com/t/how-to-use-textures-with-multiple-maps-basic-texture-mapping-question/20348/1 "2021-04-27T05:18:23Z")

</div>

Hello,

I am sorry, my questions is very basic, but I am trying to understand how to use textures with multiple maps.

My downloaded texture package contains 5 files:  
ao  
diffuse  
edge  
height  
normal.

I believe that ‘diffuse’ should be set as `StandardMaterial.diffuseTexture` and ‘normal’ should be set as `StandardMaterial.bumpTexture`. Correct me if I am wrong.

How to use the others?

The original texture package: [download](https://undeadpixel-gamestudio.itch.io/u-g-brick1-texture).

---

<div class="post-metadata">

**Author:** ![Evgeni\_Popov](https://sea2.discourse-cdn.com/flex024/user_avatar/forum.babylonjs.com/evgeni_popov/32/4432_2.png) [@Evgeni\_Popov](https://forum.babylonjs.com/u/Evgeni_Popov)\
**Post date:** [April 27, 2021, 8:46am UTC](https://forum.babylonjs.com/t/how-to-use-textures-with-multiple-maps-basic-texture-mapping-question/20348/2 "2021-04-27T08:46:11Z")

</div>

AO is Ambient Occlusion and is only supported by PBR material. So you will need to use a `PBRMaterial` instead of a `StandardMaterial`.

`ao` should go to `ambientTexture`, `diffuse` to `albedoTexture`, `normal` to `bumpTexture`. Babylon.js does not support height map textures and I don’t know what is a `edge` texture.

See [Mastering PBR Materials | Babylon.js Documentation](https://doc.babylonjs.com/divingDeeper/materials/using/masterPBR) for more info on PBR materials.

---

<div class="post-metadata">

**Author:** ![splash27](https://avatars.discourse-cdn.com/v4/letter/s/76d3ee/32.png) [@splash27](https://forum.babylonjs.com/u/splash27)\
**Post date:** [May 1, 2021, 3:49am UTC](https://forum.babylonjs.com/t/how-to-use-textures-with-multiple-maps-basic-texture-mapping-question/20348/3 "2021-05-01T03:49:51Z")

</div>

Something is wrong. My brickwall is completely black in this case.

---

<div class="post-metadata">

**Author:** ![Evgeni\_Popov](https://sea2.discourse-cdn.com/flex024/user_avatar/forum.babylonjs.com/evgeni_popov/32/4432_2.png) [@Evgeni\_Popov](https://forum.babylonjs.com/u/Evgeni_Popov)\
**Post date:** [May 1, 2021, 9:23am UTC](https://forum.babylonjs.com/t/how-to-use-textures-with-multiple-maps-basic-texture-mapping-question/20348/4 "2021-05-01T09:23:43Z")

</div>

You should setup a repro in the Playground so that we can help more.

---

<div class="post-metadata">

**Author:** ![splash27](https://avatars.discourse-cdn.com/v4/letter/s/76d3ee/32.png) [@splash27](https://forum.babylonjs.com/u/splash27)\
**Post date:** [May 2, 2021, 2:45am UTC](https://forum.babylonjs.com/t/how-to-use-textures-with-multiple-maps-basic-texture-mapping-question/20348/5 "2021-05-02T02:45:15Z")

</div>

How to upload assets (images) to playground?

---

<div class="post-metadata">

**Author:** ![inteja](https://sea2.discourse-cdn.com/flex024/user_avatar/forum.babylonjs.com/inteja/32/22553_2.png) [@inteja](https://forum.babylonjs.com/u/inteja)\
**Post date:** [May 2, 2021, 4:26am UTC](https://forum.babylonjs.com/t/how-to-use-textures-with-multiple-maps-basic-texture-mapping-question/20348/6 "2021-05-02T04:26:40Z")

</div>

You can’t upload your own textures directly to the playground but you can reference external textures that are stored on dropbox, github etc

> **[Using External Assets In the Playground | Babylon.js Documentation](https://doc.babylonjs.com/toolsAndResources/tools/playground/externalPGAssets)**
>
> Learn how to use external assets in the playground in Babylon.js.

---

<div class="post-metadata">

**Author:** ![splash27](https://avatars.discourse-cdn.com/v4/letter/s/76d3ee/32.png) [@splash27](https://forum.babylonjs.com/u/splash27)\
**Post date:** [May 2, 2021, 7:17pm UTC](https://forum.babylonjs.com/t/how-to-use-textures-with-multiple-maps-basic-texture-mapping-question/20348/7 "2021-05-02T19:17:19Z")

</div>

Here is the problem: [https://www.babylonjs-playground.com/#WLSDFW#1](https://www.babylonjs-playground.com/#WLSDFW#1).  
The wall is black.

---

<div class="post-metadata">

**Author:** ![Raggar](https://sea2.discourse-cdn.com/flex024/user_avatar/forum.babylonjs.com/raggar/32/20672_2.png) [@Raggar](https://forum.babylonjs.com/u/Raggar)\
**Post date:** [May 2, 2021, 7:29pm UTC](https://forum.babylonjs.com/t/how-to-use-textures-with-multiple-maps-basic-texture-mapping-question/20348/8 "2021-05-02T19:29:42Z")

</div>

PBR needs an environment with light information(Lines 13-14):  
[https://www.babylonjs-playground.com/#WLSDFW#2](https://www.babylonjs-playground.com/#WLSDFW#2)

You can play with metallic/roughness as well

---

<div class="post-metadata">

**Author:** ![splash27](https://avatars.discourse-cdn.com/v4/letter/s/76d3ee/32.png) [@splash27](https://forum.babylonjs.com/u/splash27)\
**Post date:** [May 6, 2021, 2:44am UTC](https://forum.babylonjs.com/t/how-to-use-textures-with-multiple-maps-basic-texture-mapping-question/20348/9 "2021-05-06T02:44:52Z")

</div>

And while I am here.  
If I try to apply the same material to the shorter wall, the texture shrinks. Of course, I can create new material with different uScale, vScale, etc. But is there a way to tile the boxes universally, using the same material? I want my bricks have the same size on all boxes with any size. Is it possible to do using the only one material?

[https://www.babylonjs-playground.com/#WLSDFW#3](https://www.babylonjs-playground.com/#WLSDFW#3)

---

<div class="post-metadata">

**Author:** ![Evgeni\_Popov](https://sea2.discourse-cdn.com/flex024/user_avatar/forum.babylonjs.com/evgeni_popov/32/4432_2.png) [@Evgeni\_Popov](https://forum.babylonjs.com/u/Evgeni_Popov)\
**Post date:** [May 6, 2021, 7:23am UTC](https://forum.babylonjs.com/t/how-to-use-textures-with-multiple-maps-basic-texture-mapping-question/20348/10 "2021-05-06T07:23:20Z")

</div>

If you want to use the same material, you will need to update the texture coordinates of both walls instead of updating the uScale / vScale properties.
