-staticproplighting and why NOT to use it

Discussion in 'Mapping Questions & Discussion' started by Icarus, Jan 27, 2009.

  1. Icarus

    aa Icarus

    Messages:
    2,246
    Positive Ratings:
    1,182
    -staticproplighting effectively doubles file sizes. The other settings, -staticproppolys -textureshadows -final have no bearing on the file size and are OK to use!

    I've always wondered how some maps get massive file sizes despite a rather small amount of custom content, so I set out an experiment to discover the truth.

    I've hypothesized that it was something in Youme's VRAD compile settings that greatly increased the filesize.

    First, I cordoned a room of pl_waste that has lots of chain link fences and payload tracks. The compile used hammer's Normal compile settings (-both). Then, I compiled the same map with youme's settings (-both -final -staticproppolys -staticproplighting -textureshadows), one effect at a time. These are my findings:

    Column 1 Column 2
    Setting Filesize
    Normal 4910KB
    Youme 8877KB
    -final 4910KB
    -staticproppolys 4910KB
    -staticproplighting 8877KB
    -textureshadows 4910KB


    WOW! That's nearly DOUBLE the file size!

    Personally, I don't really notice if a certain prop has just the right lighting in certain places. What I do notice is the sometimes ridiculous file sizes some maps come to be. Not for any good reason, IMO, to double the file size. We are not Valve, so we cannot make downloading mandatory. We must do our best to keep our maps at a reasonable size.
     
    • Thanks Thanks x 4
    Last edited: Feb 3, 2009
  2. Altaco

    Altaco L7: Fancy Member

    Messages:
    485
    Positive Ratings:
    121
    Yeah, if something's got nasty shadows just disable them.
     
    Last edited: Jan 31, 2009
  3. Icarus

    aa Icarus

    Messages:
    2,246
    Positive Ratings:
    1,182
    IIRC, -staticproplighting only affects the lighting on the prop itself. It is -staticproppolys' job to cast shadows onto the world
     
  4. Nineaxis

    aa Nineaxis Quack Doctor

    Messages:
    1,767
    Positive Ratings:
    1,404
    The problem is with outdoor areas, where 90% of props have their origins inside displacements (and therefore are near pitch black in a very bright environment).
     
  5. eerieone

    aa eerieone

    Messages:
    1,009
    Positive Ratings:
    569
    There is a simple trick to correct that, you place an info_lighting near the opject that is badly lit due to being inside a displacement or sort, give the info_lighting a name and set the objects lighting origin to that info_lighting
    [​IMG]

    edit: corrected
     
    • Thanks Thanks x 5
    Last edited: Jan 27, 2009
  6. Icarus

    aa Icarus

    Messages:
    2,246
    Positive Ratings:
    1,182
    Last edited: Jan 27, 2009
  7. Sgt Frag

    Sgt Frag L14: Epic Member

    Messages:
    1,443
    Positive Ratings:
    294
    Wow, that's a huge difference. Info_lightings are easy too.
     
  8. YM

    aa YM LVL100 YM

    Messages:
    7,099
    Positive Ratings:
    5,745
    OK so its nearly double the filesize, but its 100% worth it. (well, unless your map looks rubish to begin with...)
     
  9. GrimGriz

    GrimGriz L10: Glamorous Member

    Messages:
    774
    Positive Ratings:
    133
    Anyone want to take the time for some comparative screens?
     
  10. YM

    aa YM LVL100 YM

    Messages:
    7,099
    Positive Ratings:
    5,745
  11. Icarus

    aa Icarus

    Messages:
    2,246
    Positive Ratings:
    1,182
    Personally, I believe the costs outweigh the benefits. Especially if it causes your map to be +100MB
     
    Last edited: Feb 2, 2009
  12. Sgt Frag

    Sgt Frag L14: Epic Member

    Messages:
    1,443
    Positive Ratings:
    294
    Honestly in both of those cases I think that there are work arounds that are better overall than the expensive lighting.

    1- the metal sheets. True, they do look somewhat better with expensive lighting.
    But the shadows on the backside make them look like crap imo anyway. So to double the filesize to make one side of them look better isn't worth it.
    You also mention Youme that info_lights are broken but they have been working great for me (maybe they were fixed at some point?)
    Anyway. I believe the best overall solution for those pieces would just be to use an info_lighting outside of the wood planks in a spot where they get light but not overly dark or bright.
    They wont have the good shadows but wont have the bad either. And much better file size.

    2-The chainlink. Yeah, those shadows look great. But that's the texshadows and lightmaps scale isn't it? Does that have to do with the expensive lighting?
    In any case, it depends more on the situation. For example having a chinlink fence right in front of a wall seems a little odd. ( I know it's just for the example but...)


    But to me that's still one of those optimizing things, as a map maker you gotta weight the benefits and the negatives.
    I feel that the shadows are a smaller benefit compared to the larger negative of double file size when most players wont notice the shadows in game but all players will notice the large file size and long DL times.
     
  13. Icarus

    aa Icarus

    Messages:
    2,246
    Positive Ratings:
    1,182
    -staticproplighting only affects the lighting on the props themselves. It has no bearing over the chainlink fence effects.
     
  14. YM

    aa YM LVL100 YM

    Messages:
    7,099
    Positive Ratings:
    5,745
    Yeah thats the texture shadows one and that wont change filesize at all, but it will make the shadows look better at a cost of a longer compile time.
     
  15. JoshuaC

    JoshuaC L7: Fancy Member

    Messages:
    446
    Positive Ratings:
    145
    arena_watchtower_b4 - fast compile HDR/LDR no cubemaps = 13.3MB
    arena_watchtower_b4 - final compile HDR/LDR -staticproppolys -staticproplighting no cubemaps = 14.8MB
    arena_watchtower_b4 - final compile HDR/LDR -staticproppolys -staticproplighting built cubemaps and packed materials = 17.3MB

    Makes quite a visual difference. Personally I've never seen it double the file size.

    I was always under the impression that lower lightmap scales = bigger file size.
     
    Last edited: Feb 5, 2009
  16. Nineaxis

    aa Nineaxis Quack Doctor

    Messages:
    1,767
    Positive Ratings:
    1,404
    I think the extra lighting settings add the polish a map needs. Maybe the visual difference isn't blatant and obvious, but it is there, and really makes a map look much nicer.
     
  17. Icarus

    aa Icarus

    Messages:
    2,246
    Positive Ratings:
    1,182
    It probably affects larger maps more than smaller ones, so arena should be fine.

    Or, at least, maps with lots of props.
     
  18. JoshuaC

    JoshuaC L7: Fancy Member

    Messages:
    446
    Positive Ratings:
    145
    I've compiled maps chock full of static props on a different project I'm working on and never have seen a map double in size with -staticproplighting on.
     
  19. dirtyminuth

    dirtyminuth L5: Dapper Member

    Messages:
    221
    Positive Ratings:
    14
    Has anyone taken the time to explore the last three, vertex lighting-related fields in prop_static and how they might affect file size? Exploring the "Disable Vertex Lighting" option might be of more notable interest.

    If there is an option to selectively control which props receive more accurate lighting, it could go a long way in cutting down on file size.
     
  20. YM

    aa YM LVL100 YM

    Messages:
    7,099
    Positive Ratings:
    5,745
    Well yes, those last three options alter how rad does lighting, if you set most of your props to disable vertex lighting then you're filesize is going to be smaller