• Please make sure you are familiar with the forum rules. You can find them here: https://forums.tripwireinteractive.com/index.php?threads/forum-rules.2334636/

Level Design Problems with lightning

K-2

Active member
Jun 24, 2011
31
23
Ukraine
killingfloor.ru
Hello! I have some problems with lightning. I tried to resolve it by myself but I didn't find anything. Lights leave colored spots on surfaces after lightning build. I don't know how to explain it correctly, here is a scrennshot.
Spoiler!

After moving any light lighgtning become normal, but there are also problems with shadows from specimens.
Spoiler!

I hope somebody knows how to fix it... :confused:
 
The problem with the colored spots has nothing to do with the light radius, but with the compression of the lightmaps. When they're compressed their color information is less precise and this leaves those colored spots.
People, for the most part (aside from experts who actively look for this, but they know the deal and they know it's caused by compression and is generally a healthy trade-off once a level reaches a certain size) won't notice it as something bad when they view the textured level, but you can still get rid of them if you want to.

Open the Build options and set the lightmaps to be saved in the uncompressed RGBA8 format instead of saving them as the compressed DXT formats. This will eliminate the colored spots. Doesn't matter what you do with the Dithering tickbox then, because dithering only applies for compressed textures. It's a means to break up ugly bands that appear when color information is lost. Since nothing is lost in RGBA8 there will be no dithering either way.:)

Btw. There are people on the Internet that will insist that RGBA8 both looks better AND offers smaller file sizes for the lightmaps for some reason and thus better performance! This is incorrect. This opinion is based on a test someone made years ago where she tried the different Build options in a tiny one-room test-level and made screenshots of how the settings affect the visuals and also checked how they affected the file size of the level. It turned out that RGBA8 lightmaps both looked smoother (obviously) AND produced smaller file sizes!
The findings are correct, but they only apply to tiny maps that don't have a lot of lightmap information!
If you compress a tiny bitmap to a compressed format the compressed format may be bigger than the bitmap itself. This is what was happening with the lightmaps. Obviously once you're past a certain size the compression will help make the file smaller and if the test had been done in bigger levels this would have showed.

I haven't done concrete tests myself, but I found that performance was noticeably better in KF-NorthSea (a map with a LOT of BSP, a lot of it set to be lit by high resolution lightmaps, so it really made a difference!) with compressed lightmaps!

Do whatever you want with the options. It probably won't affect you much either way so chose what looks better to you, but when you run into performance problems later on, particularly with machines that have a low amount of video-ram, this is something you might want to have another look at later.

The second problem looks like a badly cut up BSP surface. The game cuts BSP. If you set your viewport to Zone View you'll see the cuts. Normally cuts don't produce this problem though, so you're probably dealing with flawed BSP cuts. Either because the scene got too complex, BSP-wise, or because you worked with unclean BSP (e.g. slightly non-planar BSP), or because the surface we're seeing in the picture is just one huge surface.
Single huge surfaces won't look good for various reasons. A high likelihood of bad BSP cuts if they meet with a lot of other brushes is just one of them. Another would be that the lightmap, even high resolution ones, are spread out across the whole surface so even a high resolution lightmap will only have light information every couple of inches/feet.

I suggest you either use a terrain for the floor there and use that to make it look more interesting in the process, or to cut up the brush that forms this surface into smaller, more managable pieces. Say, 1024*1024 or even 2048*2048 or something. Up to you. Doesn't have to be tiny, just not too huge.
 
Upvote 0
I can barely see the problem, but I think I know what you mean. In the future, I think screenshots of the lighting-only view would more illustrative. Anyway, these bright spots on a raster are likely caused by using a radial light with a huge radius, like Fel said earlier (where'd his post go?). Past a certain radius they start acting weird. You get these grid-like spots, sometimes huge black circles under the lights, etc.

I suggest you light your huge outdoor area with sunlights instead and only use regular lights for situations where you can keep their radius below 128. Preferably below 64.
You can, of course, use more than one of these "small" radius lights to light a bigger area.
 
Upvote 0
What I do is simply build all, then select a light or corona, dublicate it, then remove it, and save the map. So basically you dont build lights again after the map is done, so they stay uncompressed.

Depending how and where you do it, there might be some messed up shadows though so be careful. Also this will probably increase map size.
 
Upvote 0
Why would you do that?:confused:

Why not? It gets rid of the horrid colorful spots in the map and its worked perfectly for me so far. Altho I wasnt the first one to do this, I learned it from another mapper.

This is what it looks like at first, notice the colorful (purple) spots:

Spoiler!


This is what it looks like after my method:

Spoiler!





Your method is probably better but I couldnt be bothered to read that wall of text :)
 
Last edited:
Upvote 0