[Solved] How to fix this buggy lighting?

Discussion in 'Mapping Questions & Discussion' started by MrFlovi, May 2, 2019.

  1. MrFlovi

    MrFlovi L2: Junior Member

    Messages:
    65
    Positive Ratings:
    0
    So I have one light (constant brightness: 4), and a light_spot pointing down (quadratic brightness: 800).
    What can I do to fix this glitchiness? (The raster pattern)
     

    Attached Files:

  2. Da Spud Lord

    aa Da Spud Lord Occasionally I make maps

    Messages:
    1,295
    Positive Ratings:
    858
    That "raster" pattern you're seeing isn't a bug, it's simply the way lightmaps work in Source. Select the face in the face editor and reduce the lightmap scale value to increase the "resolution" of the lightmaps, which should produce more detailed shadows.
     
    • Thanks Thanks x 1
  3. MrFlovi

    MrFlovi L2: Junior Member

    Messages:
    65
    Positive Ratings:
    0
    Ok so I changed the value to 2 and 32, and sadly it gives the exact same result. I have also tried to put the faces in the same smoothing group, but doesn't work either. What's the next step?
     
  4. henke37

    aa henke37

    Messages:
    2,045
    Positive Ratings:
    490
    Check the value of the console variable mat_filterlightmaps, it controls if the lightmap is interpolated or not.
     
  5. Pocket

    aa Pocket Naylte ven, naylte yen.

    Messages:
    4,583
    Positive Ratings:
    2,427
    To be clear, are we talking about the visible horizontal bands or the vertical seam? Because if it's the horizontal bands, upping the lightmap resolution (by lowering the number) should have at least produced a visible result even if it was just higher resolution banding. But if it's the seam...

    Did you make sure the faces' textures are aligned? I'm guessing you just selected the faces and applied the texture, which defaults to world alignment—this makes the texture stretch more as the angle approaches 45 degrees, flips it on north- and west-facing sides, and creates seams at the northwest and southeast "corners" if you're making a cylinder or other curve.

    If this is two walls that have a rounded corner, I recommend using the alt+mouse2 trick: Select one of the two flat walls the corner is joining, then alt+mouse2 on the next face over. Then select that face, alt+mouse2 on the next one, repeat until you've hit the other flat wall.
     
  6. MrFlovi

    MrFlovi L2: Junior Member

    Messages:
    65
    Positive Ratings:
    0
    Mat_filterlightmaps is on 1, and all of my textures are alignement. It also seems like my smoothing groups don't work anywhere in my map (might be because of my lack of knowledge in hammer). I also included my hammer image from above and another image, where I changed my light_spot to lineair lighting. The border between light and dark seems to also be the border of my light_spot, so maybe that has something to do with it?
     

    Attached Files:

    Last edited: May 3, 2019
  7. Kill_the_Bug

    aa Kill_the_Bug

    Messages:
    1,776
    Positive Ratings:
    374
    You need to soften out your lightmap values even more (try 64 or higher) you can tell in this instance because of the way the light brightness on the walls still has visible angles and it looks like rectangles - you can also try making the walls displacements and smooth out the wall and say treat face as one.
     
    • Thanks Thanks x 1
  8. MrFlovi

    MrFlovi L2: Junior Member

    Messages:
    65
    Positive Ratings:
    0
    Oh yeah I should clarify that I fixed the issue two days ago by indeed going back to lightmap value 16 (instead of the previous 2) and fixing all of my leaks in my map.
     
  9. Kill_the_Bug

    aa Kill_the_Bug

    Messages:
    1,776
    Positive Ratings:
    374
    Nice to hear you got it fixed! Can you change the tile to [Solved] How to fix this buggy lighting? It helps in two ways:
    1] peeps know you issue is solved and more importantly,
    2] if peeps looking for similar they go to your post for the solution < which is also why you have a great post above - you told people the solution to your issue < doing this for all questions really helps others out :)
     
    • Thanks Thanks x 1