Adding lighting to our URP scene

GameDev Dustin
3 min readFeb 11, 2022

Two days and many headaches later, I’m ready to (re)write this article.

First thing’s first, do not use a non-LTS (Long term service) edition of Unity.

I thought that since 2021 LTS was just around the corner, the current 2021 builds would be pretty close to stable.

Well, any game engine that can’t do GPU lightmapping without crashing is pretty much a no-go unless you love wasting your time waiting for the CPU lightmapper to take its place.

It didn’t help that I had a dozen or so light sources.

As it turns out, you just want a few general light sources in a room, especially when you have as many emissive light sources as I have to fill in the gaps.

Lighting > Scene Settings

We want to change our settings to use the GPU lightmapper (working in 2020 LTS), reduce sampling rates, and make use of denoiser software.

It’s probably best to use the smallest lightmap size you can get away with, but it has to be big enough to hold everything as well!

General Light Sources

I have two point lights, one in the hallway and one in the main room.

Once emissive light sources are added, one of these may become unnecessary but for now it helps to be able to see the room you are working in.

I also have two more point lights to enhance my rafter lights.

These could become unnecessary once the emissive on these light fixtures is in place, but for now I’m happy with the placement.

Future Emissive Light Sources

Beyond the previously mentioned rafter light fixtures, I have a few other light fixtures scattered about and some game objects that will be emissive due to their nature.

These sci-fi tanks for instance will have an emissive glow to them.

Additionally the power cores are emissive and there are light fixtures above the two wall terminals as well as above the entry doorway.

In the next article, we’ll look into modify existing game object textures so that we can add emission to game objects whose artists did not provide and emissive texture.

--

--