• 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 Weird Lighting Patches

Dziga Vertov

Grizzled Veteran
Mar 22, 2013
165
1
Hey, I was just going through some maps that I was working on earlier this year, and came back to one that was fine except for lighting issues. The lighting takes many hours on account of a large number of trees, and when it finished it left some weird square patches on the terrain that did not get properly lit. Seeing as the WF guys could really use some more maps, I'd like to quickly finish this off and release an alpha, but I still don't know what is causing this issue. Any guesses?
 

Attachments

  • Screenshot 2015-06-05 14.10.32.jpg
    Screenshot 2015-06-05 14.10.32.jpg
    81 KB · Views: 0
can you post a list of the materials in the terrain as well as the number of instructions?
Main guess is that it has to do with the TMATS or light mapping the terrain. I've had stuff like this happen before, a lot. probably 300 hours of my time in the SDK. I have so many finalized terrain w/ BSPs that they take up over 2-5gb of storage, without lighting.
 
Last edited:
Upvote 0
Dirty Ice M- 72 instructions, 3 texture samplers
Snow Dirty _4_Chunky M - 52 instructions, 2 texture samplers
Snow dirty 2_ROF_M - 77 instructions 4 texture samplers

In retrospect, this does seem rather high, what is the maximum I should shoot for? I had just assumed that you could only use about 3 terrain materials, not that you had to watch out for how complex they are which now seems obvious. Do you think this is also contributing to the extremely long lighting builds? I guess I will try one with just a very simple mat only.
 

Attachments

  • Screenshot 2015-06-05 14.59.11.jpg
    Screenshot 2015-06-05 14.59.11.jpg
    84.5 KB · Views: 0
Upvote 0
Dirty Ice M- 72 instructions, 3 texture samplers
Snow Dirty _4_Chunky M - 52 instructions, 2 texture samplers
Snow dirty 2_ROF_M - 77 instructions 4 texture samplers

In retrospect, this does seem rather high, what is the maximum I should shoot for? I had just assumed that you could only use about 3 terrain materials, not that you had to watch out for how complex they are which now seems obvious. Do you think this is also contributing to the extremely long lighting builds? I guess I will try one with just a very simple mat only.

If it is the lighting that is taking a long time look into the build afterwards to see what is eating up the memory and CPU, optimize those meshes.
Terrain materials can be as many as you want, you just can't have several high instruction materials in the same place.
3-6 is best, after that performance drops, and you can't use all of the materials in the same quadrant due to instruction complexity, you'll see a rainbow pattern, which is letting you known that you have gone past the instruction limit.
Instructions in a material over 100 will cause problems, more often than not.
Do any of the materials share textures?
How long is your build?
Mind telling me what your Ram, Cpu speed (not cores, SDK doesn't support multi-core processors) and Read write speed on your HDD/SSD?
Make sure your terrain is locked, and doesn't have duplicates, weird graphics on the terrain like that can cause stuff like this to occur. I'm fairly sure it has to do with light maps. If you've built the map multiple times, delete them, and re-build, has happened to me before, and that fixed it. Then again a lot of stuff happens in the SDK that can have the same consequences.

If any of them have the same textures, remove said texture from the material that is laid above it, this will reduce some load on instructions, as you will be able to remove instructions related to the texture.
I've learned a lot of techniques, mostly from screwing around in the SDK. If you want more tips on terrain let me know, and I'll be glad to help.

It's either the terrain materials or the lighting that I can tell you for certain.
 
Last edited:
Upvote 0
Build time is still around 12 hours or so, maybe 14. I think it was just as you said, too complicated terrain and there was overlap, so although I lost the lighting build I just ran overnight due to a power supply issue, I'm pretty sure that has fixed it. I'll probably rerun it tonight and find out for sure, but already the wierd patchiness is gone from the lower quality build I had previously. Thanks!
 
Upvote 0
Build time is still around 12 hours or so, maybe 14. I think it was just as you said, too complicated terrain and there was overlap, so although I lost the lighting build I just ran overnight due to a power supply issue, I'm pretty sure that has fixed it. I'll probably rerun it tonight and find out for sure, but already the wierd patchiness is gone from the lower quality build I had previously. Thanks!

No problem!
 
Upvote 0
Strangest thing. I did what you suggested, removed some materials, and swapped out the complex one for a simple one, then did a build that took about 20 hours, but still resulting in those patches. Then I tried to run another build just on the terrain to see how long thatd take, but since it was taking too long I just quit out. But when I did the patches were gone and everything was fixed. SDK is an odd beast.
 
Upvote 0
Strangest thing. I did what you suggested, removed some materials, and swapped out the complex one for a simple one, then did a build that took about 20 hours, but still resulting in those patches. Then I tried to run another build just on the terrain to see how long thatd take, but since it was taking too long I just quit out. But when I did the patches were gone and everything was fixed. SDK is an odd beast.

That's an understatement if anything....
I've had moments where I'm about to get a sledgehammer and use it on my computer.....
Turn off lightmapping, I bet it has something to do with it, if I had to guess, seems just like an ultra-contrast version of lightmaps.
 
Last edited:
Upvote 0