In this article, the goal is to outline the key points we need to consider when dealing with lighting and reflections in EEVEE for interior scenes. For cycles, we had the luxury of plug and play with an HDRI. Often that is enough to get a good base lighting for a scene. In Eevee, it is not so simple. We will try to demystify the relevant check boxes and sliders that come with the benefit of a real-time render engine.
Since this is the first time in history, we have a ray-traced engine like cycles working with the same shader system as a rasterized render engine for real-time like Eevee. We do not yet know exactly how workflows will evolve in the coming years. Most certainly, workflows will be faster for shading, but the lighting in the two engines are quite different at least at this point.
Let’s list some main terms and tools that Eevee uses for lighting and reflections.
These are the main terms and tools we will look at. We will not cover every setting for every area of interest. We will dive deeper into some areas and stay shallower in others. The main goal is to get a good starting point for interior lighting in Eevee and to combat some errors we may encounter.
The main problem we will encounter when working with interior scenes and Eevee is light bleed. This is when light leaks in at the edges of our interior even if there is no gap in the geometry. We may also run into some reflection issues and other artifacts we can solve with the settings and tools we will discuss. But not always. Sometimes we can need a little extra tweaking and intuition.
When lighting in Eevee, there are some restrictions to keep in mind we did not have in cycles. We do not use emission shaders on geometric objects. They can only make reflections right now. Instead, we use the good old trusty light objects. Another limitation is that we do not have access to node-based materials for lights as we do in cycles. We also do best in avoiding HDRI maps, since they may create light bleed at the edges of our interior. In fact, most light that comes from outside our interior scenes create light bleed. But we will look at a way to deal with that.
Let’s talk about some settings. By default, all the post-processing effects in Eevee are turned off. In the properties panel, go to render settings and turn on Ambient Occlusion and Screen Space Reflection. In the screen space reflection, tick the box refraction if you are planning on using glass shaders and remove the checkbox “half res trace” if you have a mid to high-end graphics card and your scene is not too complex.
Go to the render settings; We will turn up the samples in the sampling section at the top. In my case, I usually have the samples of the viewport to 256 and for the final render at 512. This is to clean up the soft shadows as much as possible. For rendering animations, I may turn the render samples down to 256 as well if I am in somewhat of a hurry.
Under the shadow settings, we will also make some changes to help us reduce light bleed later. Change the method from ESM to VSM, tick high bit depth and soft shadows. Set the cube size to 512 or higher for best results.
The cubesize setting applies to all kinds of light objects except the sun lights where "cascade” is the shadow map type instead. When lighting an interior from the outside, however, a point light is less prone to giving us issues with light bleed than sunlamps, therefore we will omit using sunlights all together so cascade shadow maps will not matter in this case.
Keep in mind that all these settings are heavy on memory. VSM uses twice the amount of memory as ESM. High bit depth also doubles the memory usage of shadow maps and soft shadows need more samples to get rid of noise which requires more computing power from your graphics card. If you have a problem with a slow viewport after changing these settings, consider changing them only when preparing the final render. For a middle ground, use only high bit depth and VSM for now. VSM may have artifact problems when "high bit depth” is inactive.
Lighting from the inside is usually not a big issue and seldom lead to lighting artifacts so if you can keep all lights within the room that will probably be a painless experience. The problems start when you try to light a scene from the outside. When lighting from the outside with Blenders default settings in Eevee you will most likely see artifacts in the form of light slipping through at the edges of the room. That is what we call light bleed.
To combat this, we have a few changes to make. The first thing we should do is to add thickness to the walls of our room. If your room is set-up like a simple cube, you can add a solidify modifier and adjust the thickness and see how the light bleed have less and less of an effect.
For best results, make sure that the only light outside the room comes from point lights, area lamps, and possibly spotlights. Use the point light instead of a sun. Also makes sure that your new point sun has these settings in its shadow settings.
With these settings on a point light instead of a sun together with the general settings we did earlier we should be able to handle most artifacts as long as our walls have some thickness.
To add some skylight to this, go to your world settings and instead of adding an HDRI to light the scene, stick with a background color to fill the scene with ambient light. For instance, tint the color towards a light blue and set the strength to somewhere around 4-10 to simulate some skylight.
If you want to light without the directional light from a point light, acting as the sun, you can also light with area lights right outside the windows of your scene. Keep in mind it is important not to put the lights inside the wall or that can also result in light bleed.
So far, we have the direct light in our scene, but what about indirect light? In cycles, indirect light is calculated as we render. However, in Eevee, indirect light is calculated beforehand. To get indirect light, we use an irradiance volume. An irradiance volume is a grid of points that capture indirect light during a baking process. When the bake is done, the irradiance volume works as light itself and light the scene with the indirect light captured during the bake. At least in theory.
The irradiance volume will use the closest point of captured light for indirect light. This means that if we have capture points outside of our interior or inside the walls or other objects in our interior, we will capture light either from the outside or from inside one of our interior objects. In those cases, we will have different artifacts depending on our light setup because if a capture point of our irradiance volume is just outside a wall it will cast indirect light coming from the outside on the inside of our wall.
It is therefore essential that all our capture points are inside our interior, capturing the indirect light we want to capture and as long as we do, it might help to think of them as lights.
To add an irradiance volume, hit “shift+a” and go to light probe. There you will find irradiance volume. You can move, rotate, and scale the volume just like any other object. Position it so it fits within your interior. If your interior had an L-shape or other shapes that a single irradiance volume can’t occupy, then add as many volumes as you need and put them into place. The dots capturing the light should not be overlapping but place the volumes so that together they form a continuous even grid for the entire area where you want to capture light.
To change the number of dots in an axis of the irradiance volume, go into the settings and change the resolution. Fewer dots will cause fewer problems and even light. I usually go with about 1 dot per 1.5-2 meters of space. Sometimes fewer. Now, let’s bake the indirect light. Go to the render settings and find the indirect light section. Hit “bake indirect lighting”. This will also bake any reflection probes. More on those later.
When baking is complete, you can preview what each point has captured in the general render settings. Go to the indirect lighting section and find the display subsection. Tick the eye icon next to the slider for irradiance size and increase the size of the preview. Just right above you can preview reflection probes.
If you experience problems after the bake, maybe one or more of your dots may be inside one of your furniture or other objects inside your scene. If this is the case, put those objects in a separate layer and disable them for rendering in the outliner. Try to bake again and bring the objects back after the bake has finished. The objects will still get indirect light cast onto them, but they will not cast any indirect light themselves. This workaround will most likely be good enough for most scenarios if you can’t adjust the position of your irradiance volume probes.
Sometimes several probes for an area can create light bleed. Therefore, if you have light bleed with no clear reason, try to decrease or increase the resolution of the irradiance volume one or two steps in either direction and bake again to see if you get rid of the light bleed.
For windows and glass materials, if we don’t need the reflections on the glass, removing it completely is a reasonable way to go. If we want the reflections and roughness on the window, however, this is a usable node setup for the glass.
It is not physically correct, in Eevee, what is? It gives you some entry points to work with roughness and reflections of the window. To change how much or how little reflection you want, adjust the curve and to change the roughness, plug in any texture to the roughness of the glossy node or use the slider for a uniform roughness. When using a window, make sure we also turn it off while baking the light and cube maps. Also, keep in mind that the geometry for the window has some thickness to it and uses flat shading.
We have covered both direct and indirect lighting for interiors. Now it is time to think about reflections. We have a few options to work with. The first one is screen space reflection. It will reflect anything visible on our screen. If it is not visible, it will not reflect. For things are not within our view, we will need a light probe. The light probes concerning reflections are the reflection cube map and the reflection plane. We can set the reflection cube map to either a sphere or a box. For most interiors, we have rooms that are square shaped and therefore we use the box alternative for most of our interiors. For outdoor scenarios, a sphere will be more likely to work.
Screen space reflection need not be baked. It is the primary means for us to get reflections in Eevee. Just like any of the reflection objects, (cube/sphere or plane) it works for any material with a reflective property and will reflect anything we can see directly on the screen. Probes are the secondary means of reflection and will complement any reflection from screen space. The reflection objects, however, need to be baked.
In the render settings, we can bake reflections independently from indirect light. This is useful if we need to remove or hide objects in our scene to bake the indirect light without issues and then bring the objects back for baking the reflections.
Screen space reflection may be enough for some of our scenes but when we have objects reflected, that is not on the screen, perhaps behind the camera or around a corner or just behind an object is in the scene, the reflection probes become handy. They will make a mirror from their location and use that mirror as the reflection for any object within their range. It is not 100% accurate, but it gives us a close approximation.
A reflection cubemap has a few properties. What we need to keep in mind is the distance. The distance determines what objects will be influenced and therefore reflects the data that the probe collects. Then we need to keep track of the clipping start and end. This is where the probe will start and end its collection of surroundings to reflect. The start can be important if we place the probe inside another object. In those cases, the “start clipping” could be adjusted to just outside that object. When dealing with interiors, the clipping should end beyond any walls to have the probe reflect anything within the interior.
We will mostly use reflection planes for mirrors or highly reflective flat surfaces. In look dev viewport mode or rendered viewport mode, move the plane closer and closer to the reflective surface until it looks correct. At that point, the plane will reflect as intended. The distance value will determine how far away from the reflection plane a reflective surface could be to be affected. Normally you use one plane for every highly reflective surface you have. Also, scale the reflection plane slightly larger than the surface, rather than slightly too small.
We have taken a technical look at settings in Eevee that are important for lighting and reflections in interior scenes. These are some key takeaways to keep in mind.
Lighting from the outside is prone to light bleed. These settings on a point lamp together with a light blue ambient world color are a good starting point for daylight lighting from the outside.
I hope you learned something new about Eevee lighting.
Much of the information in this article come from this thread on blenderartists.org