Was reading somewhere here the solution to fix why some lights light threw like a wall. Hope you understand. But now i cant find it. Dont really know how to search for it eaither. So i was hoping someone know how to fix it (A)
I presume that you are using blender multi-texture as the game engine setting. This doesn’t support shadows. You can fake them with transparent objects or you can use GLSL as the setting.
Ofc im using GLSL but it aint shadow thats the problem. We say if i have a wall. and a light sorce on one side at the wall. it will still light everything on the other side of the wall. even if it dosent see it.
If you’re a beginner you need to do some experimenting to gain understanding. You know that a lamp will cause a cube to be shaded so that some of it’s faces will be darker than others (unless it is set to shadeless in Materials). In the game engine the cube will only cast shadows onto other objects if it is lit by a spotlight. And you can experiment by joining a wall to a floor to become a single mesh and see how that effects the way a scene appears to be shaded when illuminated by various lamps.
Dont think you guys understand what my problem is xD If you check on this image. The light is on the right side. And it got 2 walls before it gets to the left side. But still everything on that side is litt up by the light.
He did understand your question, you just didn’t read his answer right.
The lamp you have there creates diffuse and specular lighting, which doesn’t take into account shadows (objects getting in the way of the diffuse + specular light).
Try replacing your lamp with a spot light, then shine it at the wall, you will see it only highlights the wall you aimed at. Unfortunately lamps cannot have shadows (yet), so you will have to make do with spotlights if you don’t want them to do through walls.
Although you could make the spotlight have lots of falloff so it doesn’t look so much like a spot light, or arrange lots of spotlights so they make a sphere, but that is very inefficient.
okey… damn… Not as easy to get a good looking effect then…
Thx for all replies
If it wouldn’t light everything on the other side of the wall it would be shadow. So, the best solution is either a spotlight with buffered shadows (that would require a bit of tweaking if you want to fake a pointlight) or baking shadows to a texture.
Edit: Moffboffjoe beat me to it.
yeah. An object shading itself is a different thing to an object casting shadows on another object.
yeah i think i will bake the light and shadow on almost everything that wont be moved by physical and that stuff. Gives allot more performance but a bit lower reality.