Custom reflection maps!


For those unfamiliar with reflection maps:

Reflection mapping is an efficient image-based way to get the effect of reflection. The shiny surface is linked to an image similar to a skybox, which is projected onto it and distorted according to where the camera is and the shape of the surface.


As far as I know, Roblox already uses reflection maps to create the Reflectance effect. It just uses the sky as a reflection map. However, this makes indoor parts with Reflectance > 0 a bit ugly since their color changes to the sky color and parts of the sky could be seen inside. So there’s no way to elegantly create a glossy-looking part indoors or in any space with other parts around it. I propose allowing us to upload and attach reflection maps to parts.

For implementation, if Roblox already uses reflection maps then it probably shouldn’t be too difficult give the rendering engine a different reflection map when it calculates reflectance for a certain part. What’s probably hard, though, is creating the reflection maps in the first place. Ideally, there would be a feature built in to Studio that takes a given part and renders an image looking out of each of the six faces. The rendered image doesn’t have to be that fancy. The equivalent of level 10 in-game graphics should be just fine. Reflection maps could also be made in an external program, but the result will probably look weird since it probably won’t match Roblox’s aesthetic.

An idea of how this would work out in terms of existing Roblox objects is parenting a Sky to a Part. That Sky could then be used to calculate reflection instead of the Sky in Lighting.

What’s the point of doing all this work? I think that custom reflection maps give us developers an opportunity to create a completely new look that’s at once realistic, attractive, and blocky. As of now, it’s impossible to create a floor like this

but the biggest thing that differentiates that floor and a plain white block like this one

is reflection. There are so many new directions we can go in with the ability to make true shiny/glossy/polished parts. We could also do some creative tricks like putting a ghost in a mirror’s reflection map.

Please consider!

30 Likes

You are asking for a feature from professional 3D rendering program.

I haven’t even seen this see in games yet. I’d imagine it’s very CPU/GPU intensive.

1 Like

Reflection mapping is used in games everywhere, most likely on Roblox too. Please read the whole post :stuck_out_tongue:

11 Likes

I’ve played a lotttttttt of games and haven’t seen uses of this. I play on ultra.

I could be wrong, but just a guess.

1 Like

Isn’t that what this is?
Might be hard to see, but there is a reflection there.

4 Likes

If you’re referring to the picture I posted, that’s a raytracing rendered image. I just included it to show what effect reflection could have. Here’s another example (the water)

I was thinking of this the other day.

To put this in very few words, to make it clear:
Reflection uses the skybox and its six faces right now. This is suggesting we replace those six faces specifically for reflections on specific parts. It is further suggesting we have an easy method to generate those faces.

You could, for example, generate a ‘skybox’ from the visuals of being in a room, apply it for all reflections of parts in the room, and the reflections would almost look proper and accurate except for dynamic details, since the reflection map is static.

2 Likes

…Do you know what you’re talking about?


All modern game engines support this. - Its one of the lesser intensive methods of reflection actually. Its a cheat method.

7 Likes

Would love to see something like this. In Unity you can use Reflection Probes to create a similar effect. It allows you to make a box around an area which then uses the surrounding environment and reflects it on everything within the box. This can be real-time (RIP FPS), but it also has an option to ‘bake’ the surrounding environment to a reflection map. So yes, it should definitely be possible.

2 Likes

Go into a game you own and go look at a reflecting pane of a background building or something. You’ll probably notice that the reflection space is just an empty box with a texture applied to the inside walls instead of being a real reflection, this is basically what this request is. It’s really used a lot in games, it’s not performance-intensive.

Or just try it on a ROBLOX part with reflectance, it also reflects using the skybox as reflection map.

EDIT: I think OP put you on the wrong track with the images in the OP, these are not reflection maps, you’re correct on that.

Just wanted to point out, these kind of effects cannot be accomplished with reflection maps unless you never move the camera:

The reflections here are related to objects in your scene. If you would move 1m to the right, then the objects in your scene will have moved 1m to the left on your screen, but the reflections are still in the same places on the screen.

Therefore I don’t think you should be using reflection maps for reflections on big surfaces in the centre of detail such as this one, it won’t really look pretty. It works fine for smaller surfaces though. I just wanted to point out that even with reflection maps, you will not be able to get reflections of objects like this that will look good when you move around.

7 Likes

True, we’d need PBR for that.

Source engine has world reflections, Fallout NV has plenty of ENBs for this and Fallout 4 on ultra also has the option to reflect world (skybox) or all (like a mirror).

Portal has it too…

Portal is source.

The way source does world reflections is by pre-computing the reflections based on a single point, then everyone around that point uses that reflection cube as the world reflections. If the player moves closer to another reflection point, the reflections change to that one. If you play as Sniper in TF2, you can see when the reflections change because of the reflectivity of the scope when zoomed out.

1 Like

Well, sorry, but you are wrong.

This is a reflection map. You might be thinking of computing this in real-time from an object’s surroundings. Most modern games, especially those made with Unreal Engine 4, do have the ability to fake this with the concept of reflection probes. To be completely* accurate you’d have to render the scene from the persective of each rendered fragment/pixel, but just using the nearest probe’s rendered image is good enough for a lot of games.

* worth noting that nothing about current rendering techniques can be 100% accurate

3 Likes

My apologies for necrobumping this, but can we have a word on if this could be implemented?

I think having what Source Engine currently has would be good enough for “realistic” reflections. Having skybox reflections in-doors looks really offputting.

Also, for everyone here saying that Real-Time reflections aren’t possible with today’s technology, play Serious Sam: The First Encounter on the level “Valley of The Kings.” There’s a floor that has an accurate representation of everything in the level from item pickups & weapons to enemies and the player itself.

14 Likes