Change Skybox During Game

Discussion in 'Mapping Questions & Discussion' started by Muggie, Aug 6, 2011.

  1. Muggie

    Muggie L1: Registered

    Messages:
    12
    Positive Ratings:
    2
    I was wondering if it was possible to change the skybox during a game without reloading the map or something, like after a round for a map with parts.

    Example:
    For a map like Dustbowl, each part would have a different skybox as if to simulate the sun setting with each new round. Dustbowl Part 1 would have bright sky, Part 2 would have an evening sky, and Part 3 would be night.

    I would also like to know if you can change the lighting during it too to make it darker and lighter.

    If it is possible, could someone explain how to do it or perhaps link me to a tutorial?

    Thank you.
     
  2. Psy

    aa Psy The Imp Queen

    Messages:
    1,705
    Positive Ratings:
    1,465
    The directional light will only use the settings from a single light_env so you cannot have multiple lighting settings like you want. As for the dynamic skybox, a work around would be to have a series of half-dome models in the 3D skybox as prop_dynamics. Then you would simple disable/enable them as you please.
     
  3. Micnax

    aa Micnax I maek map

    Messages:
    2,018
    Positive Ratings:
    1,338
  4. A Boojum Snark

    aa A Boojum Snark Toraipoddodezain Mazahabado

    Messages:
    4,767
    Positive Ratings:
    5,508
    It is worth noting, that any of those methods for making a dynamic skybox will look like crap, because the sky-object will parallax and be lower res.
     
  5. WBarton

    WBarton L1: Registered

    Messages:
    1
    Positive Ratings:
    0
    Hello. I've just recently begun looking into mapping and just joined here. I have a question about altering the skybox during play, and I spotted this post right off the bat and figured it would be a good place to ask. I was looking at an article about adding lightning to one's map, and I liked most of the ideas there, though I have some changes in mind. I'd like to make a night-time thunderstorm map at some point, and I don't think I'll have any trouble adapting the techniques I saw mentioned to my purposes (though I fear some of the changes I have in mind might make it too computationally expensive to render well on slower machines). This is the article I'm referring to, for reference:

    http://developer.valvesoftware.com/wiki/Lightning

    One thing I would like to add that I can't devise a technique to produce, however, is the way that flashes of lightning will light up parts of the sky, reflecting off of clouds and the like. The technique linked to above might suit my purposes, as the brief flashes and bright nature of the effect would likely make parallax a near non-issue, but with flashes of lightning occurring at different apparent distances and locations in the skybox, I'm afraid it would require more domes than I could feasibly place in the 3D skybox. If it were possible, I think it would be easier and more effective to somehow change the textures of the 2D skybox to simulate this effect. If anyone knows any way of doing this, I'd appreciate any input.

    P.S. I made a note of the fact that parenting the lightning to a func_rotating will not work with TF2 and have devised what I think would be a viable workaround, just to preempt any comments about how that method won't work.
     
  6. grazr

    aa grazr Old Man Mutant Ninja Turtle

    Messages:
    5,436
    Positive Ratings:
    3,557
    Valve handle lightning or similar lighting effects (portal storms) by using shaders on the player's screen, so the players screen flashes in a manner to HDR effects.

    Anything else, such as physical changes to/in the environment, requires large amounts of light data. Not to mention is rather demanding on resource budgets. Flashing lights in Source tend to suck; they cause graphics tears and cause issue with lightmaps when a face has to share numerous lighting affects.

    In short these specific effects (changing skyboxes from night to day or through seasons) are nearly impossible to produce and your best option is to try and execute some flashy screen based shaders client side for lightning. The trouble of course is that i'm not even sure if this is possible in TF2, i hear shaders are hard coded and thus there are very limited options available for quality screen effects (you'll probably be limited to a really tacky white fade in/out).
     
    Last edited: Aug 9, 2011
  7. Wander

    Wander L3: Member

    Messages:
    148
    Positive Ratings:
    42
    You can also use color corrections to fading the screen colours to make it look like the environment changes

    Though color corrections can be switched off in settings, so you shouldnt use it in a way that people without color corrections have an advantage (like limiting visibility at night)