# Fake interior in Babylon.js

**URL:** <https://forum.babylonjs.com/t/fake-interior-in-babylon-js/20830>\
**Category:** Questions\
**Created:** [May 15, 2021, 6:27pm UTC](https://forum.babylonjs.com/t/fake-interior-in-babylon-js/20830 "2021-05-15T18:27:49Z")\
**Posts on this page:** 10\
**Page:** 1

<div class="post-metadata">

**Author:** ![sokorototo](https://sea2.discourse-cdn.com/flex024/user_avatar/forum.babylonjs.com/sokorototo/32/11061_2.png) [@sokorototo](https://forum.babylonjs.com/u/sokorototo)\
**Post date:** [May 15, 2021, 6:27pm UTC](https://forum.babylonjs.com/t/fake-interior-in-babylon-js/20830/1 "2021-05-15T18:27:49Z")

</div>

I just saw this really cool video for a fake interior made in Unity, [video](https://youtu.be/HLhbsTpZCPs).I am kinda _really_ dumb in shader programming and plan on getting better. In the meantime any help with this would be **much** appreciated.

---

<div class="post-metadata">

**Author:** ![simon](https://sea2.discourse-cdn.com/flex024/user_avatar/forum.babylonjs.com/simon/32/45590_2.png) [@simon](https://forum.babylonjs.com/u/simon)\
**Post date:** [May 15, 2021, 9:52pm UTC](https://forum.babylonjs.com/t/fake-interior-in-babylon-js/20830/2 "2021-05-15T21:52:23Z")

</div>

Usually effects like this creating with help of parallax mapping, or with interrior mapping:

Interrior mapping:  
[https://www.youtube.com/watch?v=1n2NRSLe8Ko](https://www.youtube.com/watch?v=1n2NRSLe8Ko),  
[https://www.youtube.com/watch?v=juI9Q\_xgjh8](https://www.youtube.com/watch?v=juI9Q_xgjh8) (has source file in description)

And parallax mapping:  
[https://www.youtube.com/watch?v=KkWorYsszco&t=75s](https://www.youtube.com/watch?v=KkWorYsszco&t=75s) (has source file in description)

I I tried several times to create parallax mapping node via Babylon JS NME:

> **[Babylon.js Node Material Editor](https://nme.babylonjs.com/)**
>
> Babylon.js Node material editor - shader-based materials editor for Babylon.js

But always failed because i don`t know how i can transform object coordinates to world coordinates via NME tools.

It is my drafts by this theme:

> **[Babylon.js Node Material Editor](https://nme.babylonjs.com/#Y2XELJ)**
>
> Babylon.js Node material editor - shader-based materials editor for Babylon.js

> **[Babylon.js Node Material Editor](https://nme.babylonjs.com/#HAE313)**
>
> Babylon.js Node material editor - shader-based materials editor for Babylon.js

I am also attaching a topic about parallax:

> [@Is there the way to use Parallax Mapping for node material?](https://forum.babylonjs.com/t/is-there-the-way-to-use-parallax-mapping-for-node-material/16903):
>
> Hello everyone! Few days ago i thinking that it was so cool if i have opportunity to use parallax mapping in NME. And i try to create a parallax mapping in NME but i don`t achieve success. It is that what i got: [Babylon.js Node Material Editor](https://nme.babylonjs.com/#HAE313) But you can see that it is not work correctly. I think it is because i use not right vector transform here: In blender we use vector transform that i can’t reproduce in NME: How i understand it is converting Camera view vector to obj…

To create such effects, you only need to implement a similar transformation in HME, but I have not been able to do this yet.

 ![image](https://us1.discourse-cdn.com/flex024/uploads/babylonjs/original/3X/a/d/add2e2a2c45c4e00160114d4ed74acf6889ddf55.png)

if you get any success on this topic, please write about this.

---

<div class="post-metadata">

**Author:** ![simon](https://sea2.discourse-cdn.com/flex024/user_avatar/forum.babylonjs.com/simon/32/45590_2.png) [@simon](https://forum.babylonjs.com/u/simon)\
**Post date:** [May 16, 2021, 7:25am UTC](https://forum.babylonjs.com/t/fake-interior-in-babylon-js/20830/5 "2021-05-16T07:25:05Z")

</div>

It is the way for create interior but I think that got much more performance compared with interior mapping and when we use that method for windows we can just locate box 3d model of roombehind the window.

---

<div class="post-metadata">

**Author:** ![simon](https://sea2.discourse-cdn.com/flex024/user_avatar/forum.babylonjs.com/simon/32/45590_2.png) [@simon](https://forum.babylonjs.com/u/simon)\
**Post date:** [May 16, 2021, 7:27am UTC](https://forum.babylonjs.com/t/fake-interior-in-babylon-js/20830/6 "2021-05-16T07:27:02Z")

</div>

Oops, saw that after your reply)

---

<div class="post-metadata">

**Author:** ![simon](https://sea2.discourse-cdn.com/flex024/user_avatar/forum.babylonjs.com/simon/32/45590_2.png) [@simon](https://forum.babylonjs.com/u/simon)\
**Post date:** [May 16, 2021, 7:31am UTC](https://forum.babylonjs.com/t/fake-interior-in-babylon-js/20830/8 "2021-05-16T07:31:28Z")

</div>

So I forgot to said: if you aren’t see anything here:[Babylon.js Node Material Editor](https://nme.babylonjs.com/#Y2XELJ) it is because mesh must have tangents. Switch model to cube or custom model with tangents.

---

<div class="post-metadata">

**Author:** ![blindinghues](https://sea2.discourse-cdn.com/flex024/user_avatar/forum.babylonjs.com/blindinghues/32/15289_2.png) [@blindinghues](https://forum.babylonjs.com/u/blindinghues)\
**Post date:** [May 16, 2021, 8:50am UTC](https://forum.babylonjs.com/t/fake-interior-in-babylon-js/20830/9 "2021-05-16T08:50:44Z")

</div>

I am curious, what is the use case for this? Is there any real performance difference from actually representing the interior in meshes vs. shader trickery?

---

<div class="post-metadata">

**Author:** ![sokorototo](https://sea2.discourse-cdn.com/flex024/user_avatar/forum.babylonjs.com/sokorototo/32/11061_2.png) [@sokorototo](https://forum.babylonjs.com/u/sokorototo)\
**Post date:** [May 16, 2021, 5:37pm UTC](https://forum.babylonjs.com/t/fake-interior-in-babylon-js/20830/10 "2021-05-16T17:37:38Z")

</div>

It uses only one texture and a quad + some shader trickery. It can be **really** convincing, plus what is in the texture can be very detailed (like a whole bedroom) which would be much costlier than rendering in meshes and materials. So yes it does have a perfomance benefit. Feel free to change my mind.

---

<div class="post-metadata">

**Author:** ![sokorototo](https://sea2.discourse-cdn.com/flex024/user_avatar/forum.babylonjs.com/sokorototo/32/11061_2.png) [@sokorototo](https://forum.babylonjs.com/u/sokorototo)\
**Post date:** [May 16, 2021, 5:45pm UTC](https://forum.babylonjs.com/t/fake-interior-in-babylon-js/20830/11 "2021-05-16T17:45:30Z")

</div>

Let me process this first.

---

<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 17, 2021, 7:53am UTC](https://forum.babylonjs.com/t/fake-interior-in-babylon-js/20830/12 "2021-05-17T07:53:42Z")

</div>

See [Add Parallax occlusion to the PerturbNormal node · Issue #10258 · BabylonJS/Babylon.js · GitHub](https://github.com/BabylonJS/Babylon.js/issues/10258) regarding parallax mapping in NME.

---

<div class="post-metadata">

**Author:** ![simon](https://sea2.discourse-cdn.com/flex024/user_avatar/forum.babylonjs.com/simon/32/45590_2.png) [@simon](https://forum.babylonjs.com/u/simon)\
**Post date:** [May 17, 2021, 12:34pm UTC](https://forum.babylonjs.com/t/fake-interior-in-babylon-js/20830/13 "2021-05-17T12:34:44Z")

</div>

It is sad but i`m believe it will be adding later or maybe somebody create parallax using other way 😉
