Fake interior in Babylon.js

I just saw this really cool video for a fake interior made in Unity, video.I am kinda really dumb in shader programming and plan on getting better. In the meantime any help with this would be much appreciated.

2 Likes

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=juI9Q_xgjh8 (has source file in description)

And parallax mapping:
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:

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:

I am also attaching a topic about parallax:

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

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

3 Likes

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.

Oops, saw that after your reply)

So I forgot to said: if you aren’t see anything here:Babylon.js Node Material Editor it is because mesh must have tangents. Switch model to cube or custom model with tangents.

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?

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.

Let me process this first.

See Add Parallax occlusion to the PerturbNormal node · Issue #10258 · BabylonJS/Babylon.js · GitHub regarding parallax mapping in NME.

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