Game Development | Working On Lighting On My Worst Map

working on lighting cover.png

Lighting is one of those things that can take a while to get right since you have to bake it and that can ages. Some of the maps I have in my game are caverns and stuff like that where I’m fine with it being hard to see in certain areas. Then you have indoor buildings where it’s so dark you don’t even notice you passed a door. That is a bit of an issue so I started working on my worst map that suffers greatly from how dark the lighting is.

A couple of months back I created Soldier Quarters map. It was quite a simple map and one of my smallest to date. While I have been back in there a few times to add in monsters, doors, and some other things. Lighting I’ve not touched.

Unlit old.png

This is the map’s starting area. Back before I had any lighting sources in it among a few other things. I also have the game developer’s unlit option enabled in Unreal Engine 4(UE4) just to see in there. Otherwise, it would be pitch black.

Not Enough Light.png

After I had put in some lighting a few months back I had quite a few spots that were like the one in the above screenshot. You might not even notice what is on the right. It had some externally dark spots even though light sources were slightly overlapping as it was. The light was just not getting to the edges.

While it was tempting to just spam the area with more light sources I’m glad I didn’t. I would not have any issues at the time with them all being set as moveable. Once I had learned more about lighting and did some optimization I switch them over to stationary to take advantage of light baking. There would have been too many light sources to close together and UE4 would have disabled some. While that can be overridden in a file there are some performance reasons for not doing so.

lighting 1.png

This is one of my first attempts while playing around with some settings. One thing I do have an issue with overall is high contrast in several maps. This is quite easy to see on the wall next to the torch.

While I was on this map I also redid my light importance volumes. With this being one of my earlier maps and the smallest I just had a single one around everything. This covered a lot of dead space that did not need any importance for lighting being rendered in areas. As a result, I ended up adding 24 light importance volumes throughout the map only covering areas that players would see.

lighting 2.png

One thing I did to combat the high contrast was add in a post-process volume. While that kind of volume can add a significant amount of time to building lighting and is far more advanced than I have the knowledge or external tools to fully utilize it. It did the trick with some help of finding online numbers for settings things like film: slope, toe, and shoulder. I’m not even going to pretend to fully understand those.

The biggest issue now is it did its job a little too well. While it did lighten the darkest areas with some exposure changes to how the lighting was set up. The scene overall got darker than I would have preferred. Making it somewhat hard to see and move around in on this level.

lighting 3.png

I started playing around with the number of light bounces, static lighting levels, and quite a few other settings regarding lighting. What I was expecting to take half an hour to compute and build new lighting it took well over two with all the things I was adding on. It also did not have as big of an effect as adding in a post-process volume did.

While I could have saved a lot of time setting up an even smaller map with just a couple of tiles for a hallway to test things out. This map has quite a few different size rooms, hallways, and even lighting situations. It allowed me to go through the entire map and see the results which were well worth the waiting time.

lighting 4.png

At this state of things, I finally worked out why my bounce lighting being set to 10 was having very little effect if any. Even in the amount of research I did into lighting, watching videos in the UE4 learning center, and reading some documentation. There was not a heavy emphasis unless I missed it on the setting called indirect lighting intensity. That was quite a game-changer to work out by changing it.

lighting 5.png

I ended up reducing quite a few numbers once I was getting some global lighting like I wanted off my light sources. I even reduced the intensity of my lighting by over 40%. Along with dropping the number of times light bounced in half.

While this did present some other issues like the way the light was having a noticeable effect on individual meshes as we can see on the wall, ceiling, and floor. This was at least moving in the right direction. The meshes also don’t have high resolution for lighting. Everything is also up to this point being built on preview quality lighting.

One of the bigger impacts for the time I believe came from undoing my changes to static lighting level. Reducing that number increases the quality and heavily increase build times. I went from two hours and five minutes in build time down to just fifty-four minutes. What a time savings!

lighting 6.png

This final one I was going be gone for a few hours so I made some final changes and set light to be built at high quality. It took almost six hours to complete. This is in part why I don’t do that kind of thing normally. This is also my smallest map so I can only imagen how long other maps are going to take for a final build one day.

Final Thoughts

final lighting dark spot.png

The cover image for this post should have been the spot I was in before where it was too dark to see anything. One last look without any text around it at a higher resolution I felt was in order. Quite the improvement from where I started I feel.

It’s tempting to turn lighting up just a tad more in intensity and some other stuff. That would resolve the lower resolution issues that are apparent on the meshes unless I wanted to up them more. Then again waiting 6 to 12 hours is not so appealing and while it would be close without rebuilding I would need to anyways. So, for now, I’ll leave it as it is.

Still not mind-blowing amazing as my computer would need to handle building it without catching on fire. Along with the fact I don’t have third party professional tools for bumping it up to the next level. Nor would I know how to use them. The crazy things people can do with lighting in UE4 is mind-blowing some times.

Other Posts:

Information

Screenshots were taken and content was written by @Enjar. Screenshots are from Unreal Engine 4.

H2
H3
H4
3 columns
2 columns
1 column
16 Comments
Ecency