creating a removable light-blocking box

Discussion in 'Mapping Questions & Discussion' started by Bob Ross, Oct 6, 2009.

  1. Bob Ross

    Bob Ross L3: Member

    Messages:
    105
    Positive Ratings:
    9
    i am trying to create a visual indicator of how many times a team has capped the intel. i want to do this using a set of three lights on either base and have one light up each time the intel is capped. currently i have it set up so that each light has an individual name. thats six named lights. obviously it wreaks havoc on performance.

    i am wondering if there is a way to set up an invisibble light-proof box that can be removed from the map or moved into the wall on cap so that the light appears to be turning on. a func_detail with a blocklight texture can block the light but it has no inputs or parent capability. ive tried func_wall and func_brush and neither of them can block the light for whatever reason. does anyone know what i can do to acheive the desired results?
     
  2. Terr

    aa Terr Cranky Coder

    Messages:
    1,591
    Positive Ratings:
    405
    Why don't you just use glow lights/sprites which don't cast light/shadows onto walls? Do you really have to make the lights that bright, versus being just a light on a computer console? Toss on an env_lightglow to make them visible from a distance...
     
    Last edited: Oct 6, 2009
  3. Bob Ross

    Bob Ross L3: Member

    Messages:
    105
    Positive Ratings:
    9
    damn i thought of that but forgot to try it!
     
  4. Micnax

    aa Micnax I maek map

    Messages:
    2,020
    Positive Ratings:
    1,338
    It's why post-it notes were invented.
     
  5. Bob Ross

    Bob Ross L3: Member

    Messages:
    105
    Positive Ratings:
    9
    ok the env_lightglow looks horrible. any other suggestions?
     
  6. Tapp

    Tapp L10: Glamorous Member

    Messages:
    776
    Positive Ratings:
    211
    You could probably create a prop_dynamic on top of it, set it to not render or collide, and see if that works. Otherwise, I'd say that you could simply use fiddle with the env_sprite until you get it working.
     
  7. MoonQuake

    MoonQuake L3: Member

    Messages:
    111
    Positive Ratings:
    21
    Unless your map already has major performance issues, I don't see why having 6 lights that turn on and off is a problem. Especially if they're in a small, remote and enclosed room like the spawn rooms.

    Wouldn't bother with performance.
    As long as players clearly understand what's you're trying to communicate.
    You could even use light models from the library and switch their skin from 1 to 0 at the same time you turn the actual lights on and off, so it looks like they really turn on and off. That'd look great!
     
  8. A Boojum Snark

    aa A Boojum Snark Toraipoddodezain Mazahabado

    Messages:
    4,769
    Positive Ratings:
    5,521
    I think it's worth pointing out that six named lights in one room will not allow VRAD to run since it would generate too many possible lightmaps on a surface. Unless of course their brightness/cutoff is really short (and you have high res lightmaps), in which case the env_sprite method would end up looking pretty much the same.
     
  9. MoonQuake

    MoonQuake L3: Member

    Messages:
    111
    Positive Ratings:
    21
    He's got 3 switchable lights per spawn room + maybe another non-switchable so it should be fine.

    You gotta trust VRAD, it can handle more than meets the eye. Worst thing that can happen is a crash or maybe some weird lightmaps but that's it. :)
     
  10. A Boojum Snark

    aa A Boojum Snark Toraipoddodezain Mazahabado

    Messages:
    4,769
    Positive Ratings:
    5,521
    No, you can have a maximum of 6 different "styles" of light on any given face. 3 independently switched lights in one area will result in 8 styles. (I had misread as there being 6 lights in one place, but even so it's still over the limit with 3)
     
  11. MoonQuake

    MoonQuake L3: Member

    Messages:
    111
    Positive Ratings:
    21
    I'm just saying that this number is a "safe" number.
    You can use more than that and all this can do is give you an error message when you compile and generate problematic lightmaps which can be fixed most of the time... up to a certain logical limit. :)

    It's safer to stay below 6, it's possible to go above 6.
     
  12. Bob Ross

    Bob Ross L3: Member

    Messages:
    105
    Positive Ratings:
    9
    the lights arent in the spawn rooms theyre on the outside of the bases. think 2fort with three lights under the sniper windows on each side. except probably about 30% less far apart.
     
  13. MoonQuake

    MoonQuake L3: Member

    Messages:
    111
    Positive Ratings:
    21
    I see.
    So d'you need it to look like traffic lights that turn on and off?
    You want the light emitted on the wall as an indicator or can it just be a shape or texture?

    Got a screenshot? :)
     
  14. Bob Ross

    Bob Ross L3: Member

    Messages:
    105
    Positive Ratings:
    9
    sdk shot or in game?
     
  15. MoonQuake

    MoonQuake L3: Member

    Messages:
    111
    Positive Ratings:
    21
    Oh, any textured view from hammer or in-game. The easiest for you.
    Would be clearer if it was in-game though.
     
  16. grazr

    aa grazr Old Man Mutant Ninja Turtle

    Messages:
    5,436
    Positive Ratings:
    3,557
    I would seriously recommend the sprite method. Impact on performance and compile time will be negligable, and they arn't dependant on light nor cast light/shadows. They are pretty visible from any distance (provided you use reasonable scales) so if your env_glow technique isn't working, this is your logical solution.

    If you really don't want to use sprites then you need to spend time tweaking your env_glow's via trial and error until you do find something you're happy with.

    Anything else is a masochistic waste of time. There's really no need to be fancy about this.
     
  17. Mexican Apple Thief

    Mexican Apple Thief L3: Junior Member<br>LEAD FARMER

    Messages:
    345
    Positive Ratings:
    60
    Use env_sprite instead of env_lightglow.