Preventing Light Reflections Through Walls?

I’m not sure this is the right forum for this. Let me know if it’s not. Here’s my situation: I have a house. I have lights in certain rooms of this house. Those lights’ reflections are visible on the ceiling and floor when there’s a wall between my camera and the light. I need to know how to fix this. I would just turn off the light when it’s not visible to the character, but then I lose the light those lamps project into other rooms that are visible by the character.

The lamp:

The wall between me and the lamp, notice the lamp’s reflections on the ceiling and floor

What options do I have for dealing with this?

Lights without shadows will always ignore the geometry around it and leak through it, so try turning on the shadows for that point light. If the shadows are weird after that you might want to click the lamp and set “Cast Shadows” on it to Off. You might also want to consider using a Light Cookie on the point light to make it fit in nicer, but that’s another topic.

There is no other solution to this as far as I know, you just need to be strategic about the placements of your lights and use the shadows whenever it’s really worthwhile to do so or can fix something like this. Consider the performance cost though, shadow casters get expensive after a while even in Deferred.

You can use layers, where different rooms are on different layers, and make lights only affect the desired layer.

–Eric

Oh my god, I’m an idiot. I didn’t have shadows turned on. Actually, I guess I just thought shadows would be on by default. I’ve never used point lights before.

No worries, now you know :smile:

Oh right, that’s true. I blocked that from my mind because it’s been my experience to behave very buggy when doing that. I tried it a few times before and it always would work at first, but after a while some (not all) those lights would refuse to work at all - seemingly at random - and complain about too many layers being excluded to the point that even setting the culling mask back to the default “Everything” would not restore it. I’ve never been able to reproduce that consistently for a bug report unfortunately, but I sure don’t recommend using culling mask for Lights (or at least use with caution)

I haven’t seen any bugs with layers. I definitely recommend using them. Using shadows can work, but they are fairly resource-intensive.

–Eric