turn off panel_light

Avatar
toaster
28 Posts
Posted Mar 24, 2012
Hello,

I'm trying to make a room with the nice startupish feeling, and I was wondering if it's possible to turn on/off the panel light surfaces behind the glass_lightcovers. I've tried to kill the brush, but it keeps emitting light. Is there a way to do this?

Toaster

Advertisement
Registered users don’t see ads! Register now!
Avatar
Another Bad Pun
516 Posts
Posted Mar 24, 2012
Replied 47 minutes later
In Source, most of the lighting is static. The lights are rendered during compile. Because of this, even if the light emitting brush is taken away, the light will still shine because the lights are not dynamic. However, you can still use I/O to turn light entities on and off. Instead of using a brush to emit the light needed, I recommend switching out for a light entity. (If you need help matching up the colors, there should be some light cover instances that have light entities with the correct settings.) After you have the lights set up, create a white brush, like you would normally do, and place it behind the light cover. This next step is important. You need to place a brush with the texture 'blocklight' directly in front of the white brush. You will still have the white color in the glass, but the 'blocklight' texture will block any light before it can reach outside the panel. Then, you can create the illusion of the light panel turning off by disabling the white brush and the light entity both at once. The block light will make sure no light comes out of the white brush, even when you've disabled it.
I hope this helps. :thumbup:
Avatar
HammerHead
42 Posts
Posted Mar 24, 2012
Replied 8 hours later
Couldn't you just enable/disable a block light textured func brush with the "light_panel" texture behind it?
Avatar
Another Bad Pun
516 Posts
Posted Mar 24, 2012
Replied 12 minutes later

HammerHead wrote:
Couldn't you just enable/disable a block light textured func brush with the "light_panel" texture behind it?

Since source lighting isn't dynamic, (unless you use env_projected texture which btw probably wouldn't work very well for this situation,) it would just stay the same. That's why I recommend using a light entity for the actual light instead, because you can turn that on and off. The blocklight would just make sure the brush light dosen't get mixed up with the light coming from the entity.

Avatar
Lpfreaky90
2,842 Posts
Posted Mar 24, 2012
Replied 3 minutes later

HammerHead wrote:
Couldn't you just enable/disable a block light textured func brush with the "light_panel" texture behind it?

Negativ:
from the wiki: > Quote:

Casts shadows artificially. Only used at compile time by VRAD. Does not seal leaks.

Aka: Can't be enabled/disabled;
If you want to have on/off light you need to give the light a name (like abp said) and turn it on/off in game. Lights with a name will be compiled twice: once for their on state and once for their off state. This is why having a lot of lights with names is a bad idea: it's a lot of work for VRAD :wink:

Avatar
mtxd
5 Posts
Posted Mar 25, 2012
Replied 45 minutes later
Func_brush can be enabled/disabled, it's just that that unfortunately doesn't affect the lighting.

What valve did for the surprise map (where wheatley breaks you out) is teleport you to an almost exact copy of the chamber with the lights turned off, so I guess if all the lights are turned on at once or something you could give that a shot. Otherwise aside from sets of named lights, I'm not very sure.

Avatar
HMW
806 Posts
Posted Mar 25, 2012
Replied 10 hours later

lpfreaky90 wrote:
Lights with a name will be compiled twice: once for their on state and once for their off state. This is why having a lot of lights with names is a bad idea: it's a lot of work for VRAD :wink:

That's correct; actually, if you have more than two lights with different names shining onto the same surface, it won't even work!
On the other hand, lights with the SAME name have their lighting calculations merged, so it's treated as one big switching light by the game. As long as you only need one "on" state and one "off" state for the whole room, you should be OK.

mtxd wrote:
What valve did for the surprise map (where wheatley breaks you out) is teleport you to an almost exact copy of the chamber with the lights turned off, so I guess if all the lights are turned on at once or something you could give that a shot.

If you can get this to work in your situation then do it! It will look way better than dynamic or switching lights.

Advertisement
Registered users don’t see ads! Register now!
Avatar
toaster
28 Posts
Posted Mar 25, 2012
Replied 2 hours later
Thank you for your very usefull replies. Another Bad Pun's solutions works fine.

Toaster