Hey all, I was just making a 3d studio for my brother that you can walk around in in the game engine and I am having a hard time getting the lighting to look right. I noticed that when I have a regular lamp in a room with 4 walls, the next room still gets light from that same lamp.
It would be nice if we could set the limits of a lamp to a particular area or vertex group or something. For example I could assign vertex groups to my different rooms and the lighting in that room can be assigned to only affect that vertex group.
Or even possibly we could assign the lamp to a box that is the approximate size as the room and make it to where the light from the lamp stops at that point.
Anyway, I don’t know if this is easier and I’m still learning about lighting in the Game Engine but hey, just a thought.
The simplest answer is to turn on “layer” on the lamp, so it only lights objects on the same layer as it. Then put all the objects you want it to light on that layer (don’t forget that objects can be on multiple layers at once)
If you want to only light parts of a mesh you’ll sadly have to split the mesh into several objects. For a building this is good practice anyways so rooms you’re not in can be culled when you can’t see them, improving performance.
BGE does support real-time shadows. You just have to make sure that your computer supports GLSL, and then put blender into GLSL mode. Then you can do as BluePrint says, and use spotlights with ‘buffer’ type shadows.