r/computergraphics • • Sep 10 '18

πŸ›‹ A Tutorial & Case Study To Replicate The INTERIOR MAPPING Effects Seen In Spider-Man (Shader Showcase Saturday #9)

72 Upvotes

9 comments sorted by

8

u/AlanZucconi Sep 10 '18

Hi everyone!

TL;DR: Shader Showcase Saturday #9 is a shader tutorial and case study for interior mapping.

During the past few days I have seen hundreds of developers sharing images from the new Spider-Man game. One of the most interesting effects that has captured my attention is the fact that you can see rooms inside every window. It doesn't take long to realise that this effect is faked, and that there is no additional geometry hiding behind the glass.

So I'm dedicating this week's Shader Showcase Saturday to interior mapping, the technique that Insomniac Games has used to achieve such a stunning effect.

I have featured tutorials from:

And case studies from:

If you need some more professional assets, I suggest to have a look at these links in affiliation with the Assets Store:

If you have any question or suggestion, I would be more than happy to start a constructive discussion!

1

u/Paltenburg Sep 11 '18

It doesn't take long to realise that this effect is faked, and that there is no additional geometry hiding behind the glass.

ELI5? How are we seeing not the inside of a geometrical box?

2

u/AlanZucconi Sep 11 '18

If you are looking inside a real box, you would expect to be able to see behind certain objects, if you change perspective.

This is not the case with this effect. And is the reason why all the rooms are so "empty" inside. Because if they had large objects at the centre, you'd see that when you rotate too much you won't be able to see behind them.

Other games have this issue. In Bioshock Infinite and Destiny, for instance, the glass becomes fully reflective at certain angles. This prevents you from seeing the effect breaking when at gazing angles.

1

u/Paltenburg Sep 11 '18

So what's the ELI5 how it works?

1

u/AlanZucconi Sep 11 '18

It's parallax mapping.

Exactly like it happens in Super Mario, where the background moves slower and the foreground moves faster.

When you change your view, the parts of the room that are supposed to be "further" away from you moves less than the ones that are closer.

If you do this for the X and Y axis, using a texture that indicates what's nearby and what's far (depth texture) you get this effect.

I'm working on a tutorial.

1

u/mike_rm Sep 10 '18

Awesome stuff

1

u/AlanZucconi Sep 10 '18

I know right?

1

u/ThePrescriber Dec 03 '21

This is a silly question, but I want to add interior things in my building for ROBLOX, & I want to know if this illusion for the interior mapping would work?

1

u/AlanZucconi Mar 22 '22

I am not familiar with ROBLOX, but if you can write your own shaders, then you probably can!