Im wondering... how hard would it be to get a light switch working so you can turn off a light or turn it on?
I know that the game uses lightmaps to precalclate lighting but would it be possible to make a function that removes the lightmap coming from a light source to make the illusion of turning the light itself off?
I don't really have any reason why I'd want to turn a light off but I was just curious about it heh
You can fake it with a shader, but that won't alter the lightmap, only fool your eye.
Lightstyles in q3map2 can make blinking lights, but tbh it looks out of place, and just hogs fps.
Hmm... but would it be possible to rewrite the code to store each lightmap generated by every light source it's own bool switch or something to flip on and off?
Code for the switch would look something like
if switch is pressed && current lightmap is on
toggle lightmap off
else
toggle lightmap on
The switches would be associated with specific light sources in the editor so it knows what lights to toggle. Much like a button connects to doors to know which door(s) to trigger.
Again, only curious about the probability of getting something like that to work.
It's really early in the morning and I have the flu so my brain may not be working yet... but would it be possible to use a triggerable shader entity and have it toggle between 2 shaders, one with a lightmap stage and one without?
That's what I was asking about actually but I suppose I really didn't make myself clear. When I was saying light source I was meaning any light emitting shader/model
Perhaps it would be possible with switching the shaders?
Interesting idea's here, but did anything become of this ? Can some body confirm whether switching between a light mapped shader and a non-light mapped shader works for changing the surface texture brightness ingame? *cough...in ( Q3 ) ?? :icon26:
"Q3" has triggerable shaders?
Once upon a time I made a map where you could switch the lights on and off - I used simple trick with doors or plats that replace one wall with another. I can't find a link to that map... Will post later.
Nothing has ever became of this topic that I know of. I never looked into it any further than starting this thread.
I've started work converting the Q3 engine from C to C++ recently and I'm thinking about doing a major alteration to the code that would allow things like this to be added by modders "easilly".
But, I haven't given that much thought heh :icon26:
I'm just focusing on getting the code converted for now.