How do I deal with these lighting issues?

Discussion in 'Mapping Questions & Discussion' started by Fluury, Aug 27, 2019.

  1. Fluury

    Fluury L3: Member

    Positive Ratings:
    The map I am working on has a lot of lighting issues. I tried fixing a lot of them with methods suggested in the Discord or just ideas I had on my own, and yet it always ends up the same, or sometimes worse. I figured the forums would be a good place to ask, so pardon if some of these are noob-tier questions.

    A heads-up: I am compiling using these settings:


    I seek help in fixing these issues; Any ideas on fixing them would be greatly appreciated, any other info I will provide on request. I really just wanna get rid of these issues so I can stop having to think of them in the back of my mind!
    A lot of these will be commentless, but I will number them.

    For anyone that's gonna help; thank you!
    Here we go.

    1. upload_2019-8-28_1-45-32.png
    Strange shadow behavior - the upper platform with the two support beams is a func_detail.
    2. upload_2019-8-28_1-47-46.png
    Strange shadow behavior again.
    3. upload_2019-8-28_1-48-9.png
    4. upload_2019-8-28_1-49-7.png
    Vent looks very out of place.
    5. upload_2019-8-28_1-49-53.png
    Once again strange lighting.
    7. upload_2019-8-28_1-51-21.png
    This one actually has quite a story behind it. Initially, I used the normally-in-tf2-available industrial pipes! With those, the entire set of pipes inside the support tower would be black. As recommended by the Discord, I decided to use Fubar's pipe set instead. (
    This only fixed the issue partly. As you can see, some of the pipes are oddly enough still entirely dark!
    A different perspective. Only some are properly lit, despite all of them having the same settings.
    But looking at the back quickly shows that even those which have some lighting going from them, seem to work properly.
    8. upload_2019-8-28_1-54-54.png
    Shadow doesnt seem to transition well at all.
    The "beams" or "wall details" are all func_detail.
    func_door that has lighting leaking through it.

    I know this is a whooole lot but I simply can't get these fixed, increasing, decreasing, vertex off, vertex on, smoothing groups yes or no, the results are just not good.
    Thank you in advance!
  2. MegapiemanPHD

    aa MegapiemanPHD Doctorate in Deliciousness

    Positive Ratings:
    Source sometimes has wonky shadows. Some of it is due to some props using vector lighting while others don't. Vector lighting uses more than 1 source for deciding lighting or something like that.

    As for textures, try selecting the ones the ones around a problem area at the same time and click the check-mark for "treat as one" as well as looking into assigning them to "smooth groups" and see if that helps. Unfortunately, sometimes, there isn't really anything you can do about it :/
  3. Narpas

    aa Narpas Takes way to long to make and update maps

    Positive Ratings:
    Shadows can be wonky moving between world brushes and entity brushes (like func_detail). They can also be wonky going between world brushes and displacements. A sure-fire way of fixing shadow problems is to make all the connecting brushes with weird shadow into displacement, but this could cause even more shadow problems and also affect optimization (though you can fix disps not affecting vis by simply placing a nodraw brush in the same place as them; the nodraw will block vis, while the disps will show the texture)
  4. Fluury

    Fluury L3: Member

    Positive Ratings:
    I will look into tinkering with the vertex lighting of things.

    I have already tried smoothing groups, and they sadly didn't do anything. If they did something - they'd make it worse by creating a big... shadow void.. thing.
    The "treat as one" option however sounds very promising!

    So unless I was to turn them into displacements, I am just beaned?
  5. Startacker!

    aa Startacker! Dissociating in the Five Guy’s backroom

    Positive Ratings:
    I've had a similar issue with Brugge, with adjacent faces of a wall receiving different lighting information on LDR, despite being the same wall, but different brushes. Ended up fixing it by setting all of the faces on the wall the same Align check in the Face Edit window. Check your walls to see if they use the same Align checks.

    As for func_details creating weird shadows, you'll have to nodraw faces that would normally get culled if they were a worldbrush to prevent lightmaps from generating behind the func_details.
  6. Fluury

    Fluury L3: Member

    Positive Ratings:
    While the alignment stuff actually *did* fix a few issues (which I am really grateful for!) I'm afraid the func_detail stuff sadly remains as problematic as ever. Shadows still "leak" through the "support beams" of the respawn room walls.
  7. tyler

    aa tyler

    Positive Ratings:
    You should probably check out this page to learn more about the lighting techniques you're using. This also might be useful. Some of your props are probably casting shadows on themselves and some need shadows disabled, like the resupply cabinet, because dynamic shadows look weirdly sharp. Be aware -textureshadows only does something if you pass it a lights.rad file. I'm sure some people in Discord can help you with that. A few issues (such as vents) might simply require another light entity without a source (sometimes called a phantom or ghost light). Pipeline has a lot of these.

    I can tell from your brushwork and texture alignment that you've not worked on the grid in the most ideal way either. Hammer automatically cuts visleafs every 512u (you can see this on the grid). These visleaf cuts can sometimes affect lighting in negative ways. This is one of a zillion reasons it's smart to work at large grid sizes during alpha and use extremely standard measurements when creating details.

    The image of the vents you posted, as well as this corner, are particularly and obviously bad in that regard:


    There's probably nothing to do except learn that lesson for your next map. You might be able to fix some weirdness using blocklights though.

    Although most of this guide is about gameplay direction, you might find some of the technical bits toward the end informative, and you'll see what to look for in official maps in terms of fudging lights. Lighting is a long and time consuming process, and unless this map is approaching final stages I don't recommend bothering with nearly all the problems you list here. It will just eat your time up any time you change anything.
    • Thanks Thanks x 2
  8. Fluury

    Fluury L3: Member

    Positive Ratings:
    Suffice to say the map is very much in it's final stages, which is why I am wrestling with the issues listed.

    And yeah. I realized that I worked on a poor grid size... a bit too late. It's the price I am forced to pay, I suppose - and will certainly be a great reminder for the future.

    However this post is incredibly helpful - hopefully this'll help me deal with these issues, so thank you a bunch!
  9. ics

    aa ics

    Positive Ratings:
    Sometimes indoor details are best to be left as is, not as func_detail if you want proper shadows on them (aka not to stand out with weird shadows). It will just increase compile time, unless its complex detail. Those pilars you have problems with, arent that complex so it should be fine.

    For some models, i've found out that you just need to do info_lighting, name it and put that as a light source on the model. Helps a lot for some models that appear too dark.
  10. Fluury

    Fluury L3: Member

    Positive Ratings:
    Alright. Thanks to a lot of advice here and a lot of fiddling, I was able to eliminate a lot of lighting issues!

    However, there are a few left which I just can't get fixed. These are the only few which are standing between me and my satisfaction with this map.

    This entire room is cursed. The entire upper section of it - I do not get it.
    everything about this is just incredibly problematic and no amount of tinkering seems to deal with the issue at hand, to the point where I am considering simply changing the lights - however I still expect the issues to prevail...


    the backside of these fences is fullblack. I don't get why, because compiling in FULL - LDR didn't leave me with these issues....
    I'm assuming this has to do with the "texture shadows" - How would I go on to hand RAD a file that tells it to compile texture shadows for these fences?

    And that's it, really. All the other issues I either;
    - Accepted (Such as the door one; I could block it with a light block tool texture, however that would make it look incredibly strange if it was open, which is why I opted in for the first instead.)
    - Fixed

    I mostly care about fixing up the nightmare that this room produced. Any help would be appreciated, because I tried just about everything from aligning it all to the same thing to smoothing groups to whatever that it doesn't seem to end up looking solid.

    I fully expect the solution to be something simple I overlooked, but that's why I am asking here afterall!
  11. tyler

    aa tyler

    Positive Ratings:
    Except -staticproplighting will supersede this. An info_lighting is most useful only as a temporary workaround for dark/black props in alpha and beta.

    In addition to -textureshadows, you need to put -lights lights.rad (or whatever you want to call your file, some people make one for each map) into your compile arguments. It's probably easier to ask for one that someone has already made. More on how it works here, but basically all you need to do is something like this, one per line:

    forcetextureshadow props_alpine\whateverthatwoodenfenceis.mdl
    forcetextureshadow props_gameplay\security_fence_256.mdl
    Obviously use real model paths. Since there's a lot of these, I really recommend seeing if anyone has one already prepared you can work from.
    • Thanks Thanks x 1
  12. Fluury

    Fluury L3: Member

    Positive Ratings:
    While I was able to fix up the broken fences, this issue sadly still persists despite changing lighting and it is awful!


    Every single side of this room is problematic, yet all are aligned to the same thing and the upper brushes are not func_detailed and the non-visible faces are all nodrawn. Also already tried the "treat as one" option.

    ...Just wanted to be sure, if I were to be using smoothing groups for this, I'd select all the faces of a wall, and then add them to a smoothing group - that's it, right?
  13. Fluury

    Fluury L3: Member

    Positive Ratings:
    Well, for anyone that has to wrestle with something like this in the future, here is what I did:

    - Changed orientation specifically to world
    - Moved lightmap scale from 16 to 8
    - Individually added smoothing-groups to each wall (Make sure the lightmaps line up!)

    This fixed the room. Hooray!
  14. Pocket

    aa Pocket Naylte ven, naylte yen.

    Positive Ratings:
    I would recommend taking a look at your portal file (Map > Load Portal File) for that "cursed" room, because usually the reason a surface gets broken up like that is that the game thinks they're all in different visleaves. My guess is you have a lot of detail brushes in that room (and possibly the map in general) that you forgot to turn into func_detail.