After playing the new Spider-Man game for a little while, I was inspired to try replicating the interior mapping effect used on buildings in the game.
It looks a lot more convincing than the parallaxing texture techniques I’ve used before (though my setup still needs some tweaking) but I was wondering just how resource intensive this kind of material is. It uses 5 texture unputs for each fake interior wall, floor, and ceiling.
A problem with my setup now is that the fake interior only has depth if the bounding box of the mesh the material is applied to has enough depth, and doesn’t work on flat planes like I want. I’ll post images demonstrating this later.
Replies
if you read this paper on interior mapping they have a graph showing the relative performance of interior mapping (figure 9, on page 6)
http://www.proun-game.com/Oogst3D/CODING/InteriorMapping/InteriorMapping.pdf
Is it better to have a cube inside the building with a tiled interior material, or is that no different from each wall piece having this material applied to the window geometry?
Update: I got my system working on flat meshes!
I can't really account for this. It does remind me of traditional art vanishing point weirdness, though. Anyone have a gut sense of what might be causing this?
Edit: so I've noticed that as world position of the plane gets closer to camera position, the virtual position that appears warped gets closer and closer to the virtual window. I still can't figure out what I'm doing wrong, though. Here's how I'm getting the UV coordinates to use:
EDIT 2:
So I seemingly fixed it, quite by accident- That subtraction node needed to have its terms reversed, otherwise the UV coordinates increase in real space but don't uniformly increase in the virtual local space.
Here's how I did mine. The parameter on the far left was my solution to offsetting the fake walls the way I wanted.
EDIT: Ah, in their example it's actually calculated in the first place by projecting from the surface normal. I wonder how much worse for performance it would be to just add another geometric plane and test for insersection?