Light Blocker Primitive / Material

Hi Guys,

Looked around for an answer to this but didn’t find anything useful.

I remember this back from my Half Life 2 (Source) modding days. There was a Light Blocker material that you could apply to solids (aka primitives / meshes) and that solid although invisible would block light from being cast on object behind or inside it.

I got a room that is surrounded by walls and got a single door. The room has no lights inside … so it’s dark :slight_smile:

The area outside the room is well lit.

The door into the room lets in light a bit unrealistically and because the walls are really made up of meshes (think tileset) they also let some light through.
But not as if the light is coming through the gaps. If an object, say a box, is positioned so that it’s behind a joining seam of two wall meshes it is lit as if the walls weren’t even there.
The floor however is dark as if there is no light coming through.

So, my question is how can i seal off the room from outside light sources without any mesh hacks since the tileset bit cannot be helped and the construction of the room must remain as is.

Is there an equivalent shader solution to the one used in Source.

A push in the right direction would be greatly appreciated.

Regards
Alex,

Unity lights are equipped with a culling mask that restricts the light to objects on certain layers. You just need to set the room so that all objects within it are on the same layer and then set the lights’ culling masks to ignore this layer.

Hey andeeee,

Although it would solve the problem in some cases it’s a highly impractical solution in general.
Having to keep track of layers for the purposes of lighting would make level design a rather unpleasant task.
I guess we will need to figure out some other way of solving these problems.

In any case thanks for your assistance mate. I really appreciate it.

-Alex