question about level lighting

Blitz3D Forums/Blitz3D Programming/question about level lighting

Kalisme(Posted 2006) [#1]
I was thinking about putting together an engine (just a simple fps one I guess) and was considering using mainly vertex lighting on levels (like Turok 2) since I don't think anyone has figured out a way of subtracting from lightmaps on 3d levels using blitz3d....
would it be worth using vertex lighting for my maps (probably mixed with my simple shadow shadow engine... like Swifts... but not as complex :( ) in my fps engine?

or am I wrong? (hopefully) has someone figured out a way of subtracting from lightmaps in realtime?
or is there another way of doing level lighting?

(oh... by the way, the lighting I'm talking about is like flash lights, gun flashes, explosions ect)

thank you for any help given
sorry for being repetitive with the real time lighting thing :(


Jams(Posted 2006) [#2]
What do you mean, subtracting from lightmaps?


Kalisme(Posted 2006) [#3]
Jams: erm... sorry... I'm bad with terms like that...
I mean to remove darkness from a lightmap, or change the color to look like lighting... like the decal lighting in Quake 3 (used when someone shoots a gun)
erm... muzzle flashes?


Dreamora(Posted 2006) [#4]
Using additive blend on the decal texture should theoretically do the trick (making it brighter, if thats what you want)


Kalisme(Posted 2006) [#5]
Dreamora: thanx, I'll experiment with it...

but how do I make a meshes texture subtract from the lightmap and not the levels textures? (bricks, gravel ect)
would it work if I had the lightmap set as a seperate object to the map with the level textures and had the light decal mesh add brightness only to the lightmap but not the other map...
how would I do that? (if it's possible)


Dreamora(Posted 2006) [#6]
I can't think of a way for that ...
Nor do I really see a reason as light applies to "shadow" as to the material of the object.
it would look quite strange if the surface would not shine bright but only the shadow disappears ...


Ross C(Posted 2006) [#7]
You could directly access the lightmap, and grab the UV co-ords from the vertices. Create a copy of the lightmap, and writepixels, brightening the lightmap where you want it. It might be slowish, depending on how many pixels you want to write and if you are doing it everyframe. To put the lightmap back to normal, simple copy the pixels back to the textures, from the copy.