Realtime lights

Can you set the falloff for the realtime lights in blender? The distance setting doesn’t seem to do anything. Am I missing something? Also can you turn the realtime lights on and off in the game engine? Thanks for your help.

TorQ

:-? falloff… well… I think I know what you are talking about, but… like the world settings, there are some things in the light settings that work in realtime, and some that don’t: your best bet would be to save a copy of your work so far, and mess with the lighting buttons until you learn what each thing does… at least… thats how I learn stuff; if that doesn’t help, there are several cool indivuals around here that can tell you exactly what does and doesn’t work in gameblender.

Now. As far as turning lights on/off goes, try this; put 8 different types of lights into another layer, in other words, not the one you will play the game on. now, lets say you want turn on some lights in your next area; there are logicbricks that let you add and delete objects, called the editobject actuators. Make emptys at each area were you want a light to appear, and make them so when your character approaches them, the empty creates the light you want, out of the selection of eight lights.

To turn off the lights, program the lights that will appear with an end object actuator triggered by an inversed near sensor: this means that instead of deleting itself when you approach it, it will delete itself once you reach its reset distance ( a smart move would be to make that delete distance just a few units higher than its falloff range, if you ever get falloff fixed)

I hope that made sense: if not, tell me, and I’ll scrounge up a demo for you to use.

You can use Lamp and Spot Lights in the game engine.
To switch on/off a lamp use the Energy Ipo curve animation
Clear??
António

I’ve had problems with realtime lights too. Specificly the area the light effects. No matter what settings I adjust, the light seems to shine an infinate distance.

Yeah, I think lights are just used as a direction, and there is no real distance value applied. The lighting model is highly simplistic and quite buggy and weird at times. Like it will light the ceiling of a room up great, but the walls and floor are not lit. Or you put a light close to the ceiling, and the ceiling gets darker than when the light was further down. Hopefully this is one thing that will be fixed in the future, if there is any more gameblender development, the lighting and physics are the two areas which need the most work I think. I haven’t found many workarounds for lighting, except that it works best if you don’t use lighting at all, and instead apply the lighting beforehand and save the lighting as vertex coloring instead. Not as flashy, but easier to get it to look right.

Cheers

I thought somebody once had the idea to use radiosity (on a low level of course)…

Yes, radiosity does work, and that makes for even better (fake) lighting effects for your environment; but it also increases the poly count of your scene. In my opinion using vertex paint for lighting is probably the best way to go, but play around and try as many things as you can think of!

In pooland, I had to use realtime lighting for the day/night effects, but it comes out looking very odd. It would be way better with realtime shadows, but oh well. Maybe in blender 4.0. Or 5.0.

OTO mentioned animating the lamp’s energy. I tried but I can’t seem to figure out how to add keys to create an ipo animation for a lamp. Anyone know how to do this? Thanks.

TorQ

Put the mouse in the lamp property window, and hit I. Choose energy, and it will add an energy key. So say on frame 1, set the energy to normal, and hit I energy. Then on frame 2 set the energy to 0 and hit I energy. Then whenever you want it to turn off just play the ipo from say 1 to 3, when you want it on play it from 3 to 1.

(Sometimes ipos dont work right if it’s just two frames.)

Thanks so much Saluk!