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 (
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
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.EnvironmentSpecularScale to 1.
We look forward to seeing how you use the new indoor environment maps!
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):
- 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
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.
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 ) with repros. This would really help us make this feature better!