Good way to make an entity a light source?

Blitz3D Forums/Blitz3D Beginners Area/Good way to make an entity a light source?

Chad(Posted 2006) [#1]
Is there a good way to make an entity produce a light that will only glow up within another entity?

Say I have a room and I want a light to glow up just that room, but there's no door and outside the room there's another room with a light.. How can I make it so the one doesn't go through the walls but can mix well with the light from the other room?

If it's just playing with the LightRange just tell me and I'll do that..

Thanks!
Chad


octothorpe(Posted 2006) [#2]
Vertex lighting?

Loop over all the vertices in your room and calculate the distance between the vertex and any lights. Colour the vertex accordingly.

You only need to do this once, during initialization - assuming your lights won't be moving around.


Stevie G(Posted 2006) [#3]
Use the LightMesh command. Don't use it myself but it can probably do what your after.


jhocking(Posted 2006) [#4]
I'm assuming you are talking about dynamic lighting? Because if you want static lighting for scenery, use lightmaps. Take a look at gile[s] or Slim Shady (free, but not as good.)