Achieving Interior Mapping

For the past week I’ve been trying to figure out ways to make my game more immersive by adding depth, thats when I realized I could use interior mapping, and since I never found any posts on how to create it I decided why not make one myself!

  • For those who don’t know, interior mapping is a technique used in video games to illusionize 3D spaces in buildings. For example, rooms in a building:
    image

It’s done using a combination of textures and an inverted cube. The end result is a fake 3D room with just one mesh & texture.

If you want to find your own images or create your own images, take a flat image of a 3D space from where you’d like it to be seen, like the ones below:

If you would like a mesh that is already made for you I created one for you:
InteriorMappedCube.rbxm (10.4 KB)

This isn’t a very commonly used technique used in Roblox which sucks because it’s pretty cool to see in games, especially ones realistic. This method only really works in buildings & windows, but it can add immersion & depth to games. Hopefully, we can see it being used in more games!

16 Likes

It’s not commonly used because what you have isn’t really interior mapping as this isn’t a shader. The issue is that you can’t have fine control over it. It’s still affected by light, which will be an issue in night maps. And you’re expected to stop rendering this once it gets out of range. Sure, you can just disable it with transparency, but that kinda throws out the performance benefits when you have to change hundrends of them, unless you’re ready to build your entire map in Blender or something. Still pretty cool.

3 Likes

That doesn’t really entirely explain how to do it though. While you’re saying part of what it is and giving a file, you’re not explaining why or how the textures work for someone to make a model by themselves.

From what I can roughly tell, the images are laid out in a way that a UV map for the cube can be placed to match the shapes of the room’s sides, giving the illusion of a 3D room.

(i used a Subdivide modifier because i was not able to get the UV map to not freak out on the sides, so i might be doing it entirely wrong)

Not a perfect representation, but I hope it might get the point across. Usually in game engines, I think a shader is used to do this outside Roblox games as the previous comment said for better performance, but it still has some potential within Roblox and performance may vary.

4 Likes

I understand that this isn’t the actual way of ‘interior mapping’ but this is quite basically the only option we have since Roblox doesn’t allow us free reign over shaders. Also, you don’t have to hand-change hundreds of them, just do it by a script.

I won’t lie, it may take up performance a bit but at the end of the day for more immersion in a showcase or smaller maps it will still look great compared to being empty neon yellow squares. Furthermore, this mesh can literally be placed at any window, so I’m not exactly sure why everything would have to be made in Blender.

3 Likes

You really should read more carefully… The whole point of true interior mapping is that these simple rooms only exist when you’re within a range and looking at them. The effect itself is expensive, but it isn’t affected much by how many rooms are present. To achieve the same in Roblox, you’d have to change hundreds of them through a script for a single building. Multiply that with the number of buildings that you have and add overhead from all other unrelated scripts, then you’ll quickly notice the limits. You could counteract this by implementing some kind of a chunking system or by making the whole building and its fake rooms a single mesh in Blender or some other software, but that’s a whole other level of redundant complexity. Additionally, if you’ll also have to replace them with some other neon like blocks as making them transparent would just leave holes where the windows are.

Not gonna lie, this is an interesting bypass that I might consider if OCD hits hard enough. But at that point, the amount of work you’ll be doing would be about the same as learning some other game engine.

2 Likes

This is a really cool idea! Later I’m going to try making a render distance for this and see how it looks and performs in mass. Thanks!

1 Like

I think this is a good tutorial but I would use V.I.E.W.P.O.R.T F.R.A.M.E.S as they exist, but still, cool tutorial :D

1 Like

too many viewport frames and you will lag your game

3 Likes

bro I have a laptop which is so broken that it can’t even handle a single viewport frame, I even have goofy internet

3 Likes

This is awesome @Druiren, dont let nooneisback tell you otherwise, he has a really bad take.

2 Likes

I apologize. I thought you were familiar with rendering & how Roblox handles memory but unfortunately, it seems you do not understand. I am not one to go into detail. However, I can assure you that these meshes have very few triangles and polygons which shouldn’t lag your game at all. The effect itself is not expensive as it is only a few extra textures and one script that runs at launch. You might have to change hundreds of them on the fly, but as you are a scripter you should know how easy that would be. Any simple loop can work. I am unsure why you bring up overhead, since a script that only runs at launch would barely cause any memory spikes. I have yet to become aware of the limitations you bring up.

It seems that you are unaware of how Roblox’s rendering system works, as you would know that this most likely would not require a chunking system unless you’d really like one. In this case, the mesh is about the same as ~4 parts if not 3. I don’t know why anybody would require one as they are not demanding at all and can count as just a couple of extra parts in a build.

I apologize to you this seems like learning another game engine. However, I can assure you that it is probably one of the easiest things to learn in your career. Hope this clears it up!

2 Likes

And I thought you were familiar with programming, but this says otherwise. If you knew anything about how rendering on modern hardware works, you’d know that polygon count doesn’t matter that much.

For that matter, are you sure you don’t need a more detailed checkup? Who ever said about anything running 1 time at launch? You keep throwing this “script that only runs at launch” twice already, yet nobody even mentioned anything about that? The whole point of interior maps is to use shaders as a very simple method of LOD. This isn’t a “script that only runs at launch”. You need to use some kind of an LOD system like octrees or chunks, otherwise this doesn’t make any advantage performance wise over just making these rooms part of the building mesh. That’s checking every frame if there are new rooms to load, and whether there are any rooms to unload.

Stop trying to assume you are some kind of a developer extraordinaire when you clearly can’t even distinguish a run once script from a per-frame loop and expect a passive aggressive response in return if that’s how you want things to be.

1 Like

Hello! To clear some things up: I am unsure why you doubt my programming knowledge, as I have been doing it for years. Nonetheless, modern rendering techniques and frameworks are constantly changing and evolving (as you know!) Although times have changed, polygon count & texture quality still play a very crucial role in rendering today. However, other factors such as lighting, shaders, and post-processing are becoming increasingly relevant, which unfortunately Roblox limits our ability to customize accordingly.

I’m unsure what you mean by me requiring a checkup. However, I did mention running a script at launch to change the textures of the interior-mapping meshes. As you said someone would have to change hundreds of textures, which is obviously redundant and unnecessary. I am aware that this type of interior mapping isn’t REAL interior mapping. Instead, it’s a solution to the fact that we can’t have it legitimately. I am unsure if you know, but Roblox does not let us configure shaders to achieve this level of interior mapping in our games. Nor does it give us LODs or chunk-loading systems by themselves.

This does in fact have a performance and redundancy advantage though. This is the same as 2-3 parts, which an entire room interior would need at least 20-40 to be aesthetically pleasing! As much as I wish I was, I am not exactly an ‘extraordinary’ developer. However, I do know the difference between a run-once script and a loop. I am unsure why I wouldn’t. I apologize if my responses seem passive-aggressive. I am just trying to clear a few things up and figure out why you dislike this system so much! Hope this helps.

1 Like

I agree. I was might have pushed this a bit far, but mostly because I hate the limits Roblox imposes (and because I was a bit on edge after working with some weird SharedTable behavior for 4 hours). As I said before, cool and useful concept, but it might require a bit of work to pull out its entire potential.

1 Like

i recently made a module which lets you use legitimate interior mapping and incorporated these textures; feel free to use it here