Lighting dark rooms through open doors

Hi all

I have a scene in a horror game which is a dark room (aside from a very dim flickering light). At a certain point in the game, the door opens slightly (up to about 30degrees), allowing an outside light to leak in - before slamming shut when you approach it.

I’ve played around a bit with lighting, baking, etc (mostly blindly - just to see what things do! Baking is on “auto”). I made the room mesh Static, and the door Static. I put a point light outside the door. When I open the door (editor mode), the scene looks fine. When I open the door, the lighting shines through just fine - no oddities, and exactly how I want it.

The problem: the door cannot be static, as needs to open/close during the game. If turn the Static option off on the door, the scene bakes as if the door wasn’t there - it doesn’t cast any shadows.

So, I’m after either of these options:

1, As the door will be behind the player when it creaks open, and closes very quickly, the ability to switch between an “open” bake and a “closed” bake

2, Some pointers on the type of lighting and the setup of the lights/meshes, etc to get the lighting to work as good as possible. There are so many settings etc that I’m probably just getting a bit lost.

Any tips to get me on the way would be great !

Thanks
M



2850716--208329--door closed - not static - not fine.png

You can have things be lightmap static only and not static for everything.

Also, you probably want to use a light that doesn’t have GI for this (turn bounce light all the way down to zero). If you want to fake some bounce light, maybe add a low intensity point light at the floor and animate the intensity as the door opens?

In short, this is a case where you can’t rely on the GI, you need to fake it.

I’m still a bit of a dummy to Unity, so some clarifications:

  • If i make something lightmap static, then sure - I can move it. But its imprint will remain on the baked lightmap, so this isn’t feasible.
  • What would be the purpose of turning down the bounce light?

Turns out that if I go into Player settings and change rendering path to Deferred, I can sort of get what I need. Just wondering though if this is the right approach or whether it will cause me trouble later - it’s a weird place to find this setting!

Cheers
Mark

If your door isn’t lightmap static and you have a light with bounce light, indirect light will go though the door and into the room, even if the door is closed. If you have the light without bounced light then just by using shadows, you can block the light with the door and then have some direct light show up as you open the door.

Ahh I see. The odd thing is though, regardless of settings I was using for the pointlight, the light always showed through the door if it was non-static - even with bounce setting turned off (turning it off cleared up some of the mess when I tried with a static door).