вторник, 3 июля 2018 г.

Fake interior shader for cheap windows

How to create material to simulate interior through window in Unreal engine.

In many outdoor environments like cityscapes there are a lot of different buildings. You’d probably want to show that buildings are not empty box-like objects. Instead, they have various rooms interiors visible through their windows. This could be expensive as long as you need to model all exteriors, texture them and set-up lights. It became even more expensive if you need use some glass shader to make windows looks more material. The glass could probably reflect some light or be dirty. And at the same time it should be transparent. Transparent objects are expensive.

But in case when such interiors are part of background, what means that its is not mentioned that player can be near enough to explore them, there is some hacks.

Parallax Texture

The first is to use parallax texture.
This approach was used such games as Bioshock Infinite and many other:




Cubemap Texture

The more accurate approach is to use a cubemap. This method gives you more realistic result.