Darkening the map in game

Discussion in 'Mapping Questions & Discussion' started by Snowbat, Aug 14, 2015.

  1. Snowbat

    Snowbat L4: Comfortable Member

    Messages:
    165
    Positive Ratings:
    61
    Okay so I'm very satisfied of my nuclear detonation on my map. There's a flash, a bang and a mushroom cloud after the flash.
    The only thing I'm trying to do now, is to darken the map after the explosion. At the moment, the detonation acivates a color_correction that makes the map look a bit more reddish and grayish but not darker.
    I know it's impossible to change the light_environment settings mid-game so I think I'm gonna have to simulate darkening with color_correction? I just don't exactly know how in the ColorCorrectionUI I can achieve that effect.

    Any suggestions?
     
  2. Freyja

    aa Freyja ¯\_(ツ)_/¯

    Messages:
    2,841
    Positive Ratings:
    4,765
    This is not true. You can switch light_environments in game. Light_environment is built off a light_spot entity which means it can be named (the targetname field just isn't in the fgd) can have the flag "Start Off" (the flag just isn't in the fgd) and can recieve the outputs TurnOff and TurnOn. You just can't fade between them, and it doubles the lightmap size of your map.

    Just set up your two light envs and turn off smartedit to add the names, inputs and spawnflags.
     
    • Thanks Thanks x 2
  3. Dr. Orange

    Dr. Orange L6: Sharp Member

    Messages:
    362
    Positive Ratings:
    271
    Or use HDR lighting tonemap to darken the map. It will only be visible to people using HDR, but I assume most people do.
     
    • Thanks Thanks x 1
  4. Lampenpam

    aa Lampenpam

    Messages:
    1,019
    Positive Ratings:
    337
    There are quite a lot fo people with fps configs which have hdr disabled.
    I also disabled it because for some reason my game loads for 3 minutes when I swap from or HDR map to a LDR-only map or the other way around.

    ANd also recmmend only naming your light_env if it covers only a minor part of the map since doubling the entire light map data is quite the file bloat :/
     
  5. YM

    aa YM LVL100 YM

    Messages:
    7,099
    Positive Ratings:
    5,741
    would it not quadruple the size? Each one needs an on and an off state -> 00,01,10,11 four states
     
  6. Freyja

    aa Freyja ¯\_(ツ)_/¯

    Messages:
    2,841
    Positive Ratings:
    4,765
    Probably. I haven't actually tested it beyond a small text box map.
     
  7. MoonFox

    MoonFox L10: Glamorous Member

    Messages:
    735
    Positive Ratings:
    72
    technically speaking you could have a logic auto: switch or timer, that switches the light sources
    Initial + flash -(final) -> Initial +(flash) - Final

    side note, your still gonna have to wire up the final env_light to use the grey colors and probably use a spread of 40, and a brightness of about 50-100.
     
    Last edited: Aug 14, 2015
  8. tyler

    aa tyler snail prince, master of a ruined tower

    Messages:
    5,032
    Positive Ratings:
    3,978
    This kind of lighting effect isn't really practical to do in Source, especially TF2's old branch, which is why it's rarely seen.
     
  9. MoonFox

    MoonFox L10: Glamorous Member

    Messages:
    735
    Positive Ratings:
    72
    typically it works to a degree with the effect of lightning, which is possible with some basic light entities and a timer. So what I said above is possible, its just going to take time to wire and get working.