[Solved] How to fix this buggy lighting?

MrFlovi

L2: Junior Member
Jan 2, 2019
65
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)
 

Attachments

  • Buggy lighting tf2 map.png
    Buggy lighting tf2 map.png
    550.8 KB · Views: 321

Da Spud Lord

Occasionally I make maps
aa
Mar 23, 2017
1,339
994
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.
 

MrFlovi

L2: Junior Member
Jan 2, 2019
65
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?
 

henke37

aa
Sep 23, 2011
2,075
515
Check the value of the console variable mat_filterlightmaps, it controls if the lightmap is interpolated or not.
 

Pocket

Half a Lambert is better than one.
aa
Nov 14, 2009
4,694
2,579
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.
 

MrFlovi

L2: Junior Member
Jan 2, 2019
65
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?
 

Attachments

  • Hammer arch wall.png
    Hammer arch wall.png
    70.4 KB · Views: 284
  • Lighting bug 2.0.png
    Lighting bug 2.0.png
    1.5 MB · Views: 283
Last edited:
Oct 6, 2008
1,947
445
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.
 

MrFlovi

L2: Junior Member
Jan 2, 2019
65
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.
 
Oct 6, 2008
1,947
445
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 :)