-
Notifications
You must be signed in to change notification settings - Fork 62
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Light "seams" in corners at high lightmap resolution #98
Comments
It's hard to use this test map, as many textures are missing even with jk2 installed, and it's so huge, that >20GB of ram is required with suggested settings. |
Oh sorry about the textures. The map and required textures is this one: https://jkhub.org/files/file/3065-b-mountain/ Only thing I changed is the .map file and the .shader file which I forgot to include before, here it is: Sadly I don't have a smaller file to reproduce and tbh I don't even know how to map at all or how to even use Radiant so I would be pretty challenged to come up with one. RAM usage was about 120 GB (most of it swapfile naturally) with these settings haha. But I imagine you could just cut off parts of the map? The parts where it is most noticable are in dark areas like those dark narrow corridors with few/dark lights in some places. For what it's worth, I made a little tool that post-processes the lightmaps to remove the seams. https://github.com/TomArrow/q3map2_lightmapSeamFixerHDR It detects strips of fixed width that are at least 4 pixels long. The fixed width was set at 3 pixels at first and already got rid of a lot of them, but a few were left, so I changed it to 1 to 5 pixels and now it seems the lightmaps are relatively clean. So it's not actually always 3 pixels I guess. But obviously it's not a very elegant solution. But they are always at borders of surfaces it seems. Not sure if any of this helps. |
I remember I had issues compiling it initially because I needed to add the shader file to the shaderlist.txt or something. As for them not working ingame, I had to modify the engine code because jk2 normally doesn't support external lightmaps. The parts you show are fine, no issues there. The outline I mean is always bright, and it's always in corners/at edges of surfaces. For another example, in the very top of the map, there's little blocks sticking out of the wall and in the edge where the cubes connect to the wall, there's that light seam. Here's a whole lightmap file demonstrating the issue (it's one out of 49 files): You can see it all over the image, those bright thin yellow lines at edges of surfaces. |
This gives no usable info on the issue, these areas are likely legitimately lit. |
Hmm okay. I don't know if I'll be able to create a smaller version of the map that demonstrates the issue. If I manage to do it, I'll post the results here for further analysis. |
@TomArrow fixed by mapping with proper MITRE in mind and providing a shell of func_usable with start off spawnflags as a black shadow blocker for example - that way your sky will not leak onto slim trims such as the outsides of brushes touching the void where it's still being reached by for example sky light or other light entities. |
When I output very high resolution lightmaps (in this case 4096*4096), I start getting random light seams in corners, which is very irritating and makes the lightmaps almost useless. Looking at the lightmaps, it looks like it's almost always exactly 3 pixel wide/high strips.
Is there any way to fix this?
These are my compile settings:
I'm also attaching the .map file (not my own work) for debugging purposes
b-mountain.zip
As a general rule, it seems that the higher the lightmap resolution, the more places suddenly have those light strips/seams in the corners. At 1024x1024 it's only a few places, at 2048x2048 it's starting to be in many places and at 4096x4096 it's (I'm exaggerating) on every other corner. It's especially irritating in very dark corners that suddenly have bright strips along their edges, ruins the atmosphere and suspense of disbelief.
The text was updated successfully, but these errors were encountered: