Home Unreal Engine

How efficient are interior mapping materials?

polycounter lvl 10
Offline / Send Message
Pinned
supremedalek925 polycounter lvl 10
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

  • sprunghunt
    Offline / Send Message
    sprunghunt polycounter
    It's more efficient than having geometry and transparent windows. And you can use a LOD to switch to a non-interior mapped shader at distance. 

    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
  • supremedalek925
    Offline / Send Message
    supremedalek925 polycounter lvl 10
    It's more efficient than having geometry and transparent windows. And you can use a LOD to switch to a non-interior mapped shader at distance. 

    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
    Perfect! Just what I was looking for. I didn’t even think of mip mapping the material, but that would definitely boost performance over rendered interiors! Thanks for the tips.
  • supremedalek925
    Offline / Send Message
    supremedalek925 polycounter lvl 10
    By the way, does the number of meshes this kind of material applied to make a difference?

    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?
  • supremedalek925
    Offline / Send Message
    supremedalek925 polycounter lvl 10


    Update:  I got my system working on flat meshes!
  • Zablorg
    Offline / Send Message
    Zablorg polycounter lvl 6
    Making some progress on mine, but there's some strange UV stretching behaviour near the start of the virtual window that I can't seem to account for. It stretches out seemingly infinitely before starting to recede as you'd expect.

    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.
  • supremedalek925
    Offline / Send Message
    supremedalek925 polycounter lvl 10
    Zablorg said:
    Making some progress on mine, but there's some strange UV stretching behaviour near the start of the virtual window that I can't seem to account for. It stretches out seemingly infinitely before starting to recede as you'd expect.

    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.
  • Zablorg
    Offline / Send Message
    Zablorg polycounter lvl 6
    I'm curious as to what the paper means when it says the furniture plane is not geometrically correct and prone to artifacts when placed in curved geometry. It'd seem to me that you'd calculate the position of the furniture plane as you would any of the other planes, and so it would be similarly perfect?

    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?
  • LTS3D
    Offline / Send Message
    LTS3D polycounter lvl 5
    The Robo Recall windows are all done this way. That's how I learned how to do it from there. Their material has a lot of extra stuff that you'll have to get rid of, but it works fine. You can download their full project from the Epic Launcher. I even "ported" it to Unity and used it there.
Sign In or Register to comment.