Indoor Dynamic Environment Maps Beta

Hello devs,

We have just released a public beta for Indoor Dynamic Environment Maps!

Since Roblox started supporting PBR materials, we have been using the skybox for information on how reflections should look and the sliders in Lighting (EnvironmentDiffuseScale and EnvironmentSpecularScale) control the amount of indirect lighting received by objects in the scene.

This works reasonably well outdoors! However, we can’t exactly use the skybox when someone is indoors, since it’s… you know, indoors :sun_with_face:

Indoor reflections are usually solved in games by rendering the scene into environment probes (basically rendering your own “skybox” at the position of the probe) and then using those probes for the reflections. In the past, we have tried to solve this differently by using light stored in a light grid and combining it with a noise texture.

Today, we are replacing the hack with a true environment probe!

How does it work?

Typical, the way to implement environment maps in games is that there are many of these probes, which are carefully placed by artists, and they usually have volumes that represent the area covered by the particular probe.

We do not want to introduce a special instance that has no basis in the real world, so we are not going to go in this direction. This keeps some doors open for the future where we eventually want to have a system for reflections that:

  • Takes no effort to set up
  • Automatically works with dynamic environments

For now, we have only one probe and we place it carefully at what we assume could be the center of the “room.” If we reason that the EnvMap needs to be updated, we create a new one in the background and smoothly blend between the old one and the new one. The speed of the blend is also based on the speed of the camera.

In future, we would like to create a system that would place “just the right amount” of probes in the world automatically for the creator.

How do I get the beta?

Enable it via Studio beta features and make sure that you set Lighting.EnvironmentDiffuseScale and/or Lighting.EnvironmentSpecularScale to 1.


We look forward to seeing how you use the new indoor environment maps!

Special thanks to @programeow and @ConvexRumbler






Edit 1: Reply to the feedback
First I think that there was a misunderstanding. My bad!
This feature is not a mirror and this feature should not be viewed as env map per say. In retrospect I should not have called this announcement an Environment map, but indoor lighting improvements. But that is too late for that now … isn’t it? Sorry!

What is it then?
This could be viewed as a first step of FIB4 - global illumination. We are improving the specular indoor reflection for metallic objects. (all of the objects actually! But metallic really benefits from it)

This is not a new feature. This is not envmap in the sense of the environment mapping that you may know from other engines. This is not a new creative feature.

It is only meant as a quality improvement. Ideally You should not really notice this, unless saying “ugh it looks more realistic then before”

What does it improve?
With the introduction of PBR materials to Roblox we were facing a slight problem. In the PBR lighting model metallic objects needs reflections. In very simplified terms: Metallic objects in the PBR model relies on the IBL (image based lighting) to provide the color, which is coming solely from the reflection of the surrounding environment. If the material is smooth it is a mirror like reflection. And the rougher the material is, more “blurier” the reflection gets. For non metals we use analytic computation.

Example of progressively rougher metallic material in Roblox Engine:


To get those “Blurry” samples in an efficient way, we precompute all of the possible levels of roughness for a particular env map first before using it.
That is (also) why EnvMaps are not real time. Btw environment maps are usually not real-time in other engines as well.

Outdoors we use skybox for now and till now we used a noise texture with some creative hacks to represent the environment map indoors. Finally we are replacing it with the dynamic solution.

The general goal of the PBR is to make content created once to look great in ANY lighting conditions.

And with the indoor env maps we are one step closer to it. Image based lighting is a important step towards games looking more realistic and is necessary for metallic objects.

Example of object with PBR material with and without IBL (image based lighting):



Important tips:

  • Use PBR materials, not reflections (reflectance)
  • Set lighting->ambient to very low or zero values
  • Use lighter albedo (part color)
  • Turn off eager bulk execution
  • Use future lighting

Do not use reflectance
Reflectance is legacy and we are not planning on supporting it with env maps. If you use reflectance you won’t be able to to see env map.

Well you kinda could if you blow up exposure as many did over here. Bottom line:
If you want to use env map, use material service and metallic object

why you had to crank up brightness. You do not need to do that :slight_smile:

Use low ambient:
Ambient is a hack. There is no ambient light in real world. Environment maps are an attempt to replace the ambient with something more correct (more correct, not correct! :)). Envmap shines better in low or no ambient light set

Use lighter albedo (part color):
Albedo is multiplied with the envmap reflection so dark parts won’t have much of the reflection visible.

Turn off eager bulk execution
Eager bulk execution is the studio only setting that allows to process all the computation that might be distributed over many frames in real game, to be done in a single frame. This could lead to some unexpected flickering of the envmap that your players would not see.
(We might fix eager bulk execution and envmap, but for now, turning it off is the way)

Use future lighting
Envmap really does shine with the future lighting. That is because in Future we compute per pixel lights and in very simplified terms: those are designed to work with the EnvMap … in fact: they are part of one system.



FAQs:

Why can’t devs place env maps?
Roblox highly believes that instances used in the engine should represent the real world. There is no such thing as a “lighting probe” in the physical world, so we cannot add such concepts.

I understand that this may sound highly inconvenient, but you can always just decide to not use the IBL system until we improve it to your liking.

We plan on improving the automatic placement based on your feedback. Please provide more concrete cases where automatic placement failed You. Send us (@convexRumbler or @programeow ) rbxl files with repros and mark spots where you would expect the probes to be placed!

We want to improve the system before shipping it.

In future we want to have a very robust system in which you won’t even need to think about probes. Lighting will just work. It will take a while to get there. In the meantime we want to start with this system: one probe and automatic placement.

What is indoor and outdoor?
Roblox has a pretty straightforward concept of indoor and outdoor. It is still voxel (LightGrid) based and it has its flaws. We know! It is hard to replace this system, but we are also working on it. In the meantime “Skylight term” decides what is inside and outside. It can fail sometimes (if the walls are too thin) and it also has resolution problem. Same as the rest of the voxel based lighting: 1 voxel = 4x4x4 studs.

Why no parallax correction?
The examples that you guys shared are from situations where reprojection is trivial: eg. simple analytic shapes (box, plane). These are simple to reproject. However more complex scene are quite hard to get right.
However we do not give up and have some thoughts on parallax correction. This is not closed chapter.

Why no humanoids in the env map?
This feature is not meant to be a mirror. It is to help improve visuals indoors. Since the computation of envmap takes couple of frames (to split to load and to not slow down the game) we purposely choose not to render humanoids into env maps.

Why no screen space reflections
Again: This feature is not for mirrors. It is to improve shading of (mosty) PBR metallic objects indoors where we were lacking quality. Screen space reflections typically mean a single bounce/mirror like reflection. This is not the same as a prefiltered (precomputed) map that supports objects of varying roughness. So (only) screen space reflections are not solution to this problem.

However! We as engine team are definitely not opposed to the SSR and agree that they can be really useful, maybe even combined with envmaps in the future… Maybe!



We want your feedback!
Now with lots of confusion cleared… At least I hope so! We would love to hear your thoughts and feedback. We are really curious about the cases where the automatic probe placement breaks. When does it place the probe at a silly place, where would you rather have it? When did it react to slow for You?
Does it hurt visuals of your game? How?
Please provide videos, screenshots and ideally! Provide rbxl files (not your complete games obviously :wink: ) with repros. This would really help us make this feature better!

Thanks!

563 Likes

This topic was automatically opened after 17 minutes.

Amazing update! It’s great to see the realism and immersiveness improve over time on this platform.

I’ve got a couple questions:

  • Can you give us any information about what is considered a “room”? I can think of many cases where I’d want proper dynamic environments in a room that might not be classified as “indoors”.
  • You also state that the engine will “smoothly blend between the old one and the new one” - does this mean that there will actually be some sort of transition between the cubemaps?
  • You also state that the probe starts at the center of the “room” - is this the center between what the engine thinks are the “walls”, or is it relative to the character in some way?
  • Does any of this rely on characters, or is it all based on the camera’s position?
  • “reason that the EnvMap needs to be updated” isn’t clear - how far does the camera have to move?
  • Will we get more control over these cubemaps in future, like changing how frequently the maps should be updated?
  • Will this work with rapidly changing environments? Will the cube maps update automatically if the environment changes even if the camera does not move?
38 Likes

Finally some sort of fix for this “bug”, I’ve found it really weird how it would only reflect the skybox and it was one of the negatives of making interior design but with more graphic updates like this roblox will hopefully no longer have any more visual bugs, the only negative I could get from this is the fact that it was kinda “unique” to the roblox engine but Ig that’s just me.

Good work, can’t wait to see more

Edit: replied to the wrong person, sorry

16 Likes

Absolutely stunning. This new update brings my firearms to the next level of detail.
image




80 Likes

I can’t seem to get the spheres to look the same as in the picture, it’s very faint when its trying to reflect the indoor envmap and sometimes just gives up and doesn’t even try.

21 Likes

Will we have something similar to env_cubemap - Valve Developer Community so we can actually customize the cubemaps? (or well, envmaps)

9 Likes

It’s not working so well @Roblox :grimacing:

I have the same issue as @vrs2210


26 Likes

I’m having this exact problem atm.

8 Likes

Well I’m having this issue, even though i did all the things required to do it.

2 Likes

I think it is a very very poor and foolish decision to not give developers control over where these reflection probes are placed and generated. The assumption that an automatic system will give the perfect results all the time is very mistaken.

While having the automatic system for probe generation is great for out-of-the-box experience, you really cannot predict what kinds of environments developers will have, which could (and inevitably will, on some scene somewhere) result in the automatic algorithm being completely useless/detrimental. For example, my levels are constructed entirely out of specialmeshes where the visual mesh does not at all correspond to the actual basepart objects, so if the algorithm tries to detect rooms based on position and size of the basepart, it will be utterly confused.

Edit: already, we’ve seen many examples of these probes straight up not working because the algorithm for placing the probes is finnicky, flawed, and totally arbitrary. Look here, how thinner ceilings result in rooms not being detected, but adding a few studs of thickness does the trick. These kinds of arbitrary rules should not be forced upon level designers. Instead, give us full control over probe placement. Observe:

64 Likes

Glad to see that Roblox graphics are evolving more and more. Can’t wait to see what the community manages to create.

I can practically feel this in the palms of my hands

12 Likes

Agreed, giving automatic features is good for people who want to do less work, but surely it’s best to let us disable and fine tune if we require?

10 Likes

Does not appear to be working at all for me.

15 Likes

Oh yeah,i have been waiting for this for a long time, super excited for this amazing update

It may be only a beta now but the pics already look awesome,can’t wait for the final version!
:slightly_smiling_face:

3 Likes

Best solution in my opinion is to just give us optional control to override the automated system, that way people who want to have nice looking rooms(if they’re lucky) and don’t want to bother with setting up probes can do so , but the more experienced and dedicated environment artists can do so if they choose.

May become convoluted though

23 Likes

To make this work I had to turn Exposure up to 5 to get a kinda clear envmap, but it wasn’t as much as the one in the picture.

4 Likes

I can feel my games getting more realistic! This is great for reflections :star2:!

1 Like

Man I love when I have to flash bang myself to see the sphere reflect, itself.

45 Likes

I tried that and there was barley any difference.

1 Like