Multiple light_enviroments in a map?

Discussion in 'Mapping Questions & Discussion' started by HolySnickerPuffs, Jul 31, 2019.

  1. HolySnickerPuffs

    aa HolySnickerPuffs

    Messages:
    1,027
    Positive Ratings:
    1,403
    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?
     
  2. fubarFX

    aa fubarFX The "raw" in "nodraw"

    Messages:
    1,675
    Positive Ratings:
    1,871
    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.
     
  3. HolySnickerPuffs

    aa HolySnickerPuffs

    Messages:
    1,027
    Positive Ratings:
    1,403
    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!
     
  4. fubarFX

    aa fubarFX The "raw" in "nodraw"

    Messages:
    1,675
    Positive Ratings:
    1,871
    Not going to lie, doing it in contiguous spaces is going to be pretty difficult and I may not take things this far. But we'll see how it goes.
     
  5. Freyja

    aa Freyja It hurt itself in it's confusion!

    Messages:
    2,916
    Positive Ratings:
    5,322
    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