Eevee lighting interiors

Eevee lighting interior

Goal

In this article, the goal is to outline the key points that we need to consider when dealing with lighting and reflections in EEVEE for interiors scenes. For cycles, we had the luxury of plug and play with an HDRI. A lot of the time that was enough to get good base lighting for a scene. In Eevee, it is not so simple. We will try to demystify the relevant checkboxes and sliders that come with the benefit of a real-time render engine.
​​​​​​​
Since this is the first time in history that we have a raytraced 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 are going to 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.

Overview

Let’s start to list some of the main terms and tools that Eevee uses for lighting and reflections.

  • Light probes
    • Reflection cube map
    • Reflection plane
    • Irradiance volume
  • Screen space reflection
  • Ambient Occlusion
  • Shadow settings, both global and lamp settings
  • Indirect lighting settings and baking

These are the main terms and tools that 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 of the errors that we may encounter.

The main problem we will encounter when working with interior scenes and Eevee is what is known as 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 that is most of the time solved with the settings and tools we will discuss.

When lighting in Eevee there are some restrictions to keep in mind that we did not have in cycles. We do not currently use emission shaders on geometric objects. They are only capable of making 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 tend to create light bleed at the edges of our interior. In fact, most light that comes from the outside of our interior scenes tend to create light bleed. But we will look at a way to deal with that.

General settings

Let’s talk about some settings. By default, all the post-processing effects in Eevee are turned off. In the properties, panel go to the render settings and turn on Ambient Occlusion and Screen Space Reflection. In the screen space reflection, you may want to tick the box refraction if you are planning on using glass shaders and untick half res trace if you have a mid to high-end graphics card and your scene is not to 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 form ESM to VSM, tick high bit depth and soft shadows. Set the cube size to 512 or higher for best results.

The cubesize setting is applicable 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 won’t matter for us 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, in turn, 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.

Eevee lighting the interior

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 quite 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 sipping 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 simply add a solidify modifier and adjust the thickness and see how the light bleed starts to have less and less of an effect.

For best results, make sure that the only light available 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.

  • Turn on shadows if it’s not already on
  • Set clip start to 0.1
  • Softness to 0.0
  • Bias to 0.001
  • Exponent can be left at 2.5
  • Bleed Bias set to 0.1
  • Turn on contact shadows
  • In the contact shadows set softness to 2.0

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 that it is important not to put the lights inside the wall or that can also result in light bleed.

Indirect lighting using irradiance volumes

So far, we have the direct light in our scene, but what about indirect light? In cycles, indirect light is calculated as we render. But 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 will work 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 that we actually do 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 that it fits within your interior. If your interior happened to have an L-shape or other shapes that can’t be occupied by a single irradiance volume, 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 a given axis of the irradiance volume, go into the settings and change the resolution. As a rule, fewer dots will cause fewer problems and more 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 that you might have. More on those later.

When the baking is done 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 that you can preview reflection probes as well.

If you experience problems after the bake it might be that 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 a given number of probes for an area can create light bleed. Therefore, if you have light bleed with no apparent 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.

Windows and light

When it comes to 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 that it is also turned 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.

Reflections

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 that is visible on our screen. If it is not visible it will not reflect. For things that 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. The reflection cube map can be set 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 does not need to 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 that we can see directly on the screen. Probes are the secondary means of reflections 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 in order 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 that 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 quite few properties. What we need to keep in mind is first the distance. The distance determines what objects will be influenced and therefore reflect 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 surrounding to reflect. The start can be important if the probe is placed inside another object. In those cases, the start clipping could be set just outside that object. When dealing with interiors the clipping should end beyond any walls to have the probe reflect anything within the interior.

Reflection planes will mostly be used 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 that you have. Also, make sure to scale the reflection plane slightly larger than the surface, rather than slightly too small.

Summary

We have taken a quite technical look at settings in Eevee that are important for lighting and reflections in interior scenes. These are some of the key takeaways to keep in mind.

  • Use ambient occlusion and screen space reflection.
  • Use VSM rather than ESM for interiors.
  • High bit depth and soft shadows together with a sample of 256 or 512.

Lighting from the outside is prone to light bleed. These settings on a point lamp together with a light blue ambient world color is a good starting point for daylight lighting from the outside.

  • Turn on shadows if it’s not already on
  • Set clip start to 0.1
  • Softness to 0.0
  • Bias to 0.001
  • Exponent can be left at 2.5
  • Bleed Bias set to 0.1
  • Turn on contact shadows
  • In the contact shadows set softness to 2.0
 
  • An irradiance volume stores indirect light prebaked.
  • It is important that the individual sample points of the irradiance volume are inside our interior scene.
  • Use transparent shader instead of glass shader for windows
  • Screenspace reflection is a good start for reflections but reflection probes will help fill in the spots we can’t see directly from the camera.
I hope you learned something new about Eevee lighting

Much of the information in this article come from this thread on blenderartists.org

Share on facebook
Facebook
Share on twitter
Twitter
Share on linkedin
LinkedIn
Share on reddit
Reddit
Share on email
Email

Other content you may like

Got stuck when creating 3D art?

Our workflow cheatsheet will help you to know what to do next! Get it by subscribing to our newsletter!