Light specular reflections visible through walls

Hi, I am working on a map that has some houses on it and in the houses I have noticed that all of my inhouse and also street lights have their specular visible through walls. Now I have seen and read the topic posted in 2016 Specular reflections visible through walls but my issue is a bit different as I don’t have any baked information and all of my lights are movable. So no reflection captures at all on the scene.
The walls that I am using have enough thickness so thin walls are not the issue here.

I have noticed that turning on/off shadow casting on the lights has no effect on this issue

The workaround I’m thinking about would be to use different light channels for different rooms but that can’t be used in a situation where you have a light let’s say in a bedroom that has to light up the hallway floor and walls you are standing in when you open that bedroom door (image 2)

Is there a way to fix this or another workaround?

As you mentioned, turning off shadow casting won’t affect this, it only turns off the shadows not the light (or specular reflection).

However, you can still build Reflections captures even if you don’t have baked light. You can have multiple reflection captures in the level so the reflection is different from when you are outside vs inside.

Are your walls “two-sided”? There should be a checkbox for that somewhere. Also, I know you say your walls are thick but what happens if you try to build even thicker light blockers (using simple shapes) around the walls AND floor? Also check your indirect lighting intensity settings. Good luck!

If you are using Lumen then some of that geometry might be taking information from probes outside of your room. If thats the case you can try and increase the density of your probes. Or you can try and seal off the holes with blocker geometry.

If that is a proper light causing the spec hits make sure that light is casting shadows.

Thank you @XxpiingyxX , @EnterstellarAJ and @comlys for the responses. My whole scene is movable with all movable lights inside houses as every house can be destroyed. So no baking and no reflection captures, my walls are thick and I have tried two-sided option. I am not using Lumen, this is None or SSGI scene but the issue is persistent even with Lumen.

The thing is, as my research showed, that UE doesn’t occlude specular values with geometry. Specular values are rendered per pixel so if the light is on screen (even behind the wall), the specular WILL be visible. Using reflection captures could solve this as it gives exact reflection information to the engine, but in movable/non-baked cases it will just be there.

The expensive way to fix this is to use hardware raytracing and turn on the raytraced shadows for the light. That is the most expensive solution. The other cheaper solution was actually using light channels where possible and inside of the houses I have figured out that those specular reflections were made from fill lights so I just turned off specular for those and the problem was solved.

This is incorrect.

Cast shadows will occlude specular specular highlights normally, why that is not happening in your case I do not know, but this is not normal for Unreal and I’m unable to reproduce this.

This is with regular shadowmaps, lumen disabled, static lighting disabled, fully dynamic geometry, and no hardware raytracing:

It might be a limitation of the shading model or shadow method you’re using, SLW for example can only occlude specular highlights from directional lights, and translucency cannot occlude specular highlights in reflections.

Hardware raytracing is not required, because specular highlights are not solved by tracing rays into the scene, it is computed directly by knowing the surface normal, light position, view vector, and surface properties, and because they are by nature directly visible to the light, any cast shadow method should occlude them whether they’re hw raytraced or not (except in the case of translucency)

That’s very interesting to see. Is your light source attenuation radius behind the cube or is it overlapping the cube and going a bit more out?

It’s covering the cube and the entire groundplane, if it was not overlapping you would not see a specular highlight (or a shadow for that matter) because direct specular is only computed for pixels within the attenuation radius. Also you can see the attenuation at 0:08 in the video

Oh yeah sorry I missed that detail with attenuation when watching the video. That’s weird because in a lot of different cases and projects I have the same issue when not baking the lights and reflection captures. I have noticed that same issue in Resident Evil 3 remake as well, you can clearly see it in this video https://www.youtube.com/watch?v=0IHfmocV-HY&t=532s from 1:40:53 when Jill enters the house on the table right in front of her where that doll is destroyed. I know that RE3 remake is not using Unreal Engine but that is the example where it also happens. The real mystery for me is that I’ve noticed that in some small projects where I’m using Lumen I don’t have that issue but in some of them I do. And in every that small project I was using only the default settings but it behaves differently. There is also this post Specular reflections visible through walls where it is fixed by baking the reflection capture

You need to understand that there are two kinds of specular reflections in Unreal (and just about all game engines) and they are solved separately using different methods:

  1. Direct specular (or specular highlights). These are reflections from lightsources. This is the brightest part of the specular, the “hotspot”. This is what (I assume) your problem is. Unreal computes direct specular inside of the shading model, because it’s dirt cheap and trivial to compute, it doesn’t require raytracing and can be solved analytically. Importantly, because they are just 1 bounce of specular reflection, they can be masked by cast shadows. So any light with cast shadows should have it specular highlight masked by the shadow. This consequently also means any unshadowed light will leak its specular highlight, and is a problem you do see in a lot of games where unshadowed lights do a lot of heavy lifting.
  2. Indirect specular. These are reflections of the scene. Unreal has a half dozen different reflection methods dedicated to solving (or faking) these, one of which is reflection captures.

Indirect specular is much more difficult to solve because it needs some way of intersecting the scene to do accurately. Historically (and still to this day in some ways) it has been way too expensive to do this for anything but a single bounce with planar reflections and even that is really expensive… Instead it has been crudely approximated by using cubemaps, in Unreal these are called reflection captures. Usually, they’re projected into the world with no parallax or occlusion, and so they leak like crazy. You can see this in practically any game made in the last 20~ years. Elden Ring for example has it virtually everywhere (it’s especially bad on the floor in the Raya Lucaria Academy), and this also looks like what’s happening in your RE3 video. If your problem is with the direct specular, then this is not relevant to you, because cubemaps/captures are not used for direct specular.

If you want to better understand how all of this works I HIGHLY recommend going through this series of videos by Cem Yuksel: https://www.youtube.com/watch?v=esC1HnyD9Bk&list=PLplnkTzzqsZS3R5DjmCQsqupu43oS9CFN&index=8

2 Likes