> For the complete documentation index, see [llms.txt](https://steijn.gitbook.io/devlogs/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://steijn.gitbook.io/devlogs/devlog-client/lighting.md).

# Lighting

#### What is the problem I want to solve?

Our client wanted the game to reflect real life closely so it gives a better reflection of the users opinion as well as being easier to give their opinion on how it should look. The items they'd place down would eventually be real furniture.

To achieve this, we need to implement lighting. This is a requirement because it has to reflect the eventual product they would receive outside of the game and not have many differences between their given opinion and the actually used chairs/desks etc.

#### How will/did I solve this?

To start i went looking for some tutorials on how to implement lighting with the URP \
i used these two: \
<https://www.youtube.com/watch?v=WFye3k4bvEc>\
From this one i took the main directional light setup, area lights and skybox. \
<https://www.youtube.com/watch?v=zmF29YGEMUU>\
i used the tips in this one to adjust the postprocessing.

While adjusting and baking the lighting i ran into an issue with our building,&#x20;

![](/files/-Mcn-S2wEnDdl9Sj7mL-)

After chatting with two teachers about this issue we couldn't figure it out. \
eventually i managed to find an issue with SNAPS and lighting. the suggested fix was to select it all and use probuilder to "probuilderize" the meshes. this converts them to meshes from probuilder which take the lighting properly.&#x20;

After changing a lot of the settings around i could bake the lighting and add postprocessing effects.&#x20;

![](/files/-Mcn0JmwnMH67GHlpqyw)

These are the settings i ended up with.&#x20;

The bloom and motion blur were annoying in building mode so i had to make it so we use two profiles which change around depending on what mode you're in.

#### How will/did I solve this?

Below you can see the result images. i also put a before image to showcase how much of a difference lighting can make.&#x20;

![Before/after lighting](/files/-McmzHOOgC_uOWUaPWG5)

![](/files/-McnSyg4X10J9hBMPWxI)

#### What is the quality of the result?

It looks a lot more realistic this way, in first person the bloom really makes a great touch on the sunlight in the window frame. \
The group was happy with the results as well as some of the people outside of the project/college that i use for testing and opinions. the unanimous vote was that it looks good and can stay this way after lowering the motion blur a bit.

It was pretty difficult to implement due to the issues i had along the way however with some researching i managed to find and solve the issue. other than this the implementation of lighting is pretty simplified

#### What is the next step now I have this result?

After getting the client's feedback we're adjusting the building and the environment.&#x20;
