November 2020

Monthly Archives

Lighting/Level Design for The Caretaker

I originally did the lighting for this game in Unity around 2016, and it was terrible result back then but it was my first commercial stylized lighting. Since then the company has been wanting to port, expand and improve the game. I was therefore asked to relight it again, since I obviously improved a lot by then. And since then I had also learned to use Unreal Engine. So first I would like to show what I did in 2016 in Unity Engine.

Basic Progress Report

Unity 2016

Below is how it looked like for the Unreal Version when I got the project.

Unreal Early 2019

Below is the first draft where I figure out the placement, technical limitation and issues that can arise by placing out light sources with custom lighting setup.

Technical analytical round up until Mid 2019

Once I realized I needed more colour and a different level design to put it into practice, I was allowed to change the level design enough to improve the lighting even further. However, I needed to test out different colours in case I wanted fantasy fire.

Made higher openings on roof and expanded hallways a bit.

In the image above you can see I am trying to decide on the ratio of the light, the colours and expand the level design to support the vision.

Created elevation that went up in some key places

In the image above you can see that I thought straight corridor needed to be broken up a bit, so I added some dead end rooms that went up.

Kept the high ceilings in specific places around the level

In the images above you can also see I am avoiding skylight and instead opting in for manually adding bounce lights.

Tested the different lights and range

In the image above you can see I am checking exposure to get an idea of how dark I can push it, and how big the dark areas can be before it disrupts gameplay. I eventually got an idea of the base lighting, level design and mood I wanted so I started pushing it for the first dungeon. I also added vents and magical green glowing lights to walls. Below are some changes to the lighting on the last iteration.

High ceiling has blue light while ground has orange yellow
The range of the torches are limited to allow for dark transitions
Making sure that torch light bleeds out a bit in the darker area and allowing blue light to bleed into the torch light areas a bit.
Creating bright, dark and bright lighting flow to lead the player.
This is one way exit from top once you walk up. It is dark to be a bit unsafe.
This is one of the larger I put together and is also one of the brightest areas.
I created an area that went down to break up the patterns a bit.

So far the above images are for Dungeon 2 that could use some more work, so I will quickly show you images for Dungeon 1, where I established the guidelines. And also why I started adding elevations and brighter areas in Dungeon 2. Part of it is to keep player interest.

So, you can see the changes that has happen both in terms of level design and lighting. Where I also use fog to create the depth and mood needed. But let us explore a bit in detail why these choices are made and what are the limitations here.

Technical Limitations

Originally there were real time lighting on the torches, and they were placed pretty close to each other. That means it was very expensive. Too bright. And no bounce lights. To deal with this I created a default torchlight setup with a specific intensity and range, which I could tweak individually if needed.

You see two lights now doing the job.

Point light is set on static to create enough fill. The spot light is set on stationary to cast shadow when items are spawned randomly in front, and on the spiders climbing on top. Together they create the minimum I need for illumination around the torch areas. However, I had to carefully test and place those lights to avoid overlapping lights. As you might know the overlapping stationary lights become either real time or static (I forgot), when there are 4 of them overlapping. This resulted in a lot of work and thought on where to place the lights, and how to create the desired effect and mood. This also made everything too yellow, so I created a higher roof with exterior blue light coming in to balance things out.

I used rect stationary light and emissive box to create the blue lighting.

As you can see in the image above I created a larger ceiling and placed those near doors, corners or half way through the corridors to break up the yellow dominant light everywhere. This is expensive so I tried keeping it within a certain range. The reason for that is because for Dungeon 2 the areas are sometimes bigger, more corners and thus more likely to have overlapping lights coming through the wall. To counter this I reduced some of the ranges and added fake lighting. Whether I keep it is another test for another time.

Dungeon 2 has static lighting to help spread light further out.

As you see in the image above I have more static lighting in the bigger dungeon to deal with the stationary overlap limitations. And you can see I utilize it to push more light into the darker areas of the hallway, because I had to cut down the range for the lights.

This is the other side of the image above and its stationary light.

What does it mean? And why is this important? If I kept the original stationary light there would be around 6 overlapping lights thus forcing me to go either to real time or static. The other solution would be to move the lights around. So the solution for now was to add in fill lights manually.

This is stationary overlapping lights. Green is perfect.

As you can see I have manage to optimize the game cost by keeping the amount of real shadow being cast to minimum, and overlapping stationary light within green. As discussed earlier the seemingly innocent looking lighting job required some careful thoughts in optimization while developing the look for it. Further more I had to ensure that the real time cost around the map stayed out of red. We can see that using lightmap complexity view below.

Blue is super good, green is good and red is bad!

In the above image you can see red occurring due to it being close to the starting area, which has a big fire pit and particles.

Considering the amount of light in this room this is fairly optimized.
Similar to the first image but away from starting room.

As you can see the reason lights are placed the way they are, the level is designed the way it is and the thought that has to go into such a straightforward game is in fact a bit more complicated than simply dragging out lights. As for Lightma^p density I have kept it within green as seen below.

Lightmap Density

I hope this article showcase some of the important mindset and decisions that goes into lighting. Sometimes things might look straightforward and you might think you do not need a lighting specialist, but I improved the visual quality and frame rate using these methods.

%d bloggers like this: