# Triplanar Mapping in PBR material

**URL:** <https://forum.babylonjs.com/t/triplanar-mapping-in-pbr-material/3930>\
**Category:** Questions\
**Tags:** material\
**Created:** [June 17, 2019, 1:07pm UTC](https://forum.babylonjs.com/t/triplanar-mapping-in-pbr-material/3930 "2019-06-17T13:07:29Z")\
**Posts on this page:** 7\
**Page:** 1

<div class="post-metadata">

**Author:** ![laurent](https://sea2.discourse-cdn.com/flex024/user_avatar/forum.babylonjs.com/laurent/32/51107_2.png) [@laurent](https://forum.babylonjs.com/u/laurent)\
**Post date:** [June 17, 2019, 1:07pm UTC](https://forum.babylonjs.com/t/triplanar-mapping-in-pbr-material/3930/1 "2019-06-17T13:07:29Z")

</div>

What would be the best way to customize the PBR Material to add triplanar mapping ?

My need : Albedo/Metallic/Roughness/Normals values will come from the interpolation of 3 textures in a mesh without UV.

I have a GLSL/Three.js implementation and I am considering switching to Babylon.js for my next project.

I don’t mind writing a new material from scratch for that (I did that in my Three.js project) but I wonder if there is a better way to enhance the PBR Material without duplicating all its features.

I have read about the upcoming node system : [https://github.com/BabylonJS/Babylon.js/issues/6012](https://github.com/BabylonJS/Babylon.js/issues/6012).  
Is-it something I will be able to use ?

Thanks !

---

<div class="post-metadata">

**Author:** ![Vinc3r](https://sea2.discourse-cdn.com/flex024/user_avatar/forum.babylonjs.com/vinc3r/32/25340_2.png) [@Vinc3r](https://forum.babylonjs.com/u/Vinc3r)\
**Post date:** [June 17, 2019, 1:38pm UTC](https://forum.babylonjs.com/t/triplanar-mapping-in-pbr-material/3930/2 "2019-06-17T13:38:35Z")

</div>

> [@laurent](#):
>
> I have a GLSL/Three.js implementation

Just by curiosity, have you a demo about it?

---

<div class="post-metadata">

**Author:** ![laurent](https://sea2.discourse-cdn.com/flex024/user_avatar/forum.babylonjs.com/laurent/32/51107_2.png) [@laurent](https://forum.babylonjs.com/u/laurent)\
**Post date:** [June 17, 2019, 3:43pm UTC](https://forum.babylonjs.com/t/triplanar-mapping-in-pbr-material/3930/3 "2019-06-17T15:43:17Z")

</div>

> [@Vinc3r](#):
>
> Just by curiosity, have you a demo about it?

The code is part of a product I can’t disclose but it looks similar to what this guy achieves on Cinema4D [Triplanar Mapping in C4D on Vimeo](https://vimeo.com/224288357)

If I go ahead with Babylon.js, I will share a generic demo and the source code.

@Deltakosh Do you think I will be able to use the node based system for materials to achieve this or should I go with my own custom GLSL shader ?

---

<div class="post-metadata">

**Author:** ![Deltakosh](https://sea2.discourse-cdn.com/flex024/user_avatar/forum.babylonjs.com/deltakosh/32/26635_2.png) [@Deltakosh](https://forum.babylonjs.com/u/Deltakosh)\
**Post date:** [June 17, 2019, 4:00pm UTC](https://forum.babylonjs.com/t/triplanar-mapping-in-pbr-material/3930/4 "2019-06-17T16:00:11Z")

</div>

This will be exactly the goal of the node material 🙂  
If you want to have a EARLY pre alpha full of bug version:

Material with two lights:

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

Material with morph target, two textures and fog:

[https://www.babylonjs-playground.com/#E3730T#1](https://www.babylonjs-playground.com/#E3730T#1)

---

<div class="post-metadata">

**Author:** ![Klm24](https://avatars.discourse-cdn.com/v4/letter/k/2bfe46/32.png) [@Klm24](https://forum.babylonjs.com/u/Klm24)\
**Post date:** [June 17, 2019, 4:32pm UTC](https://forum.babylonjs.com/t/triplanar-mapping-in-pbr-material/3930/5 "2019-06-17T16:32:26Z")

</div>

Fantastic! when do you expect to release it?

I can’t wait! I want it!

---

<div class="post-metadata">

**Author:** ![Deltakosh](https://sea2.discourse-cdn.com/flex024/user_avatar/forum.babylonjs.com/deltakosh/32/26635_2.png) [@Deltakosh](https://forum.babylonjs.com/u/Deltakosh)\
**Post date:** [June 17, 2019, 4:38pm UTC](https://forum.babylonjs.com/t/triplanar-mapping-in-pbr-material/3930/6 "2019-06-17T16:38:09Z")

</div>

You can TRY to use it now 😃  
It is planned for 4.1 (end of november)

---

<div class="post-metadata">

**Author:** ![Florin\_Dumitru](https://sea2.discourse-cdn.com/flex024/user_avatar/forum.babylonjs.com/florin_dumitru/32/22899_2.png) [@Florin\_Dumitru](https://forum.babylonjs.com/u/Florin_Dumitru)\
**Post date:** [March 8, 2024, 11:58am UTC](https://forum.babylonjs.com/t/triplanar-mapping-in-pbr-material/3930/7 "2024-03-08T11:58:16Z")

</div>

Hi, I just tested the default triplanar material, but there are a few issue with it. Is there a pbr triplanar shader available from babylon side? To my understanding the node material here [https://nme.babylonjs.com/#GD8DSL#15](https://nme.babylonjs.com/#GD8DSL#15) is pbr triplanar, but also does some other things, I’m quite new to the node material editor.
