Multiple light_enviroments in a map?

SnickerPuffs

(*single chuckle*)
aa
Apr 10, 2014
1,315
1,857
I'm planning a map with three distinct, themed areas, and I want to have the lighting in each area reflect that. Can I have multiple light_enviroments that each effect only certain parts of a map, or do I need to flub it with other light entities?
 

fubarFX

The "raw" in "nodraw"
aa
Jun 1, 2009
1,720
1,978
With Hammer and Vbsp, absolutely fucking not (and don't try to flub it with light entities, for the love of god).

However, it may be possible. I've been kind of in the process of researching this and we may be able to patch a .bsp after compile to modify lighting in different closed off areas. This requires a lot of technical knowledge and no one has ever done it before. But I'm looking to change that in the near future-ish. Patching static lighting is not going to be the only problem tho...

Then you have to figure out what to do with the skybox texture. You may be able to edit the skybox material dynamically with proxies but I have not tried this, I don't even know if the skybox shader accepts material proxies (I don't see why it wouldn't but you never know).
-A frame based material proxy where you can completely swap the skybox would be very costly but probably possible.
-A material proxy based on the $color property could get you a long way in getting different times of day (that would likely require a sunless skybox tho).

Then you have to figure out what to do with your 3d skybox, you're not going to be able to switch static lighting in there as it's going to be shared between stages. Your best option is probably to swap out models with pre-baked lighting to compose your 3dskybox

if you're going to bypass all that and try to flub it, you should instead look into color correction, you can skew toward cold colors for night and warmer colors for daytime. This will not change the angles of your shadows however, you'd have to use very soft shadows everywhere.
 

SnickerPuffs

(*single chuckle*)
aa
Apr 10, 2014
1,315
1,857
With Hammer and Vbsp, absolutely fucking not (and don't try to flub it with light entities, for the love of god).

However, it may be possible. I've been kind of in the process of researching this and we may be able to patch a .bsp after compile to modify lighting in different closed off areas. This requires a lot of technical knowledge and no one has ever done it before. But I'm looking to change that in the near future-ish. Patching static lighting is not going to be the only problem tho...

....

if you're going to bypass all that and try to flub it, you should instead look into color correction, you can skew toward cold colors for night and warmer colors for daytime. This will not change the angles of your shadows however, you'd have to use very soft shadows everywhere.

Thanks for the reply!

My map is going to be single-staged, but set in a series of bio-domes. I can use a single light_enviroment for the alpha/beta builds (and try your color correction idea), but when I get closer to the final versions I really want separate lighting for each dome. Your .bsp patching idea sounds almost perfect, so keep me updated!
 

Freyja

aa
Jul 31, 2009
2,994
5,813
Multiple light_environments per map that you can switch between are possible, but having different ones used in different areas is probably going to require the madness fubarFX is talking about. If all the players move between one are and the next and can't be in both at the same time, it should be possible with I/O