Guide to Making a Beautiful Game: Lighting in URP

Hello all!

Today, I will be going over how and where to add lighting in URP!

Finished lighting. Look at those test tubes glow!

The Different Kinds of Lights

Directional:

This is used to add light to everything in a scene, kind of like a sun. It pierces through everything, so you will need to cull some objects if you don’t want them lit up.
From my Skybox article, you can link these kinds of lights to a procedural skybox and the sun will follow its rotation!

Point:

This light is like a lamp and will illuminate a sphere-shaped area.

Spot:

This light is like a stage light or flashlight. It’s a light that can be pointed.

Area:

This kind of light is not useful in URP since it needs baked onto the scene. But this can be used to light up a floor or wall in a certain area.

Light Culling

Light culling is used to have certain objects ignore lighting. In my case, I had the directional light ignore my ceiling objects, so it doesn’t cast a shadow on everything. To do this:

  1. Select the objects you want to be culled.
  2. At the top of the Inspector tab, click the Layer dropdown menu.
  3. Click Add Layer…
  4. Name it something that makes sense.
  5. Select the light you want them to ignore.
  6. In the Inspector tab, click the Culling Mask dropdown menu.
  7. Deselect the Layer you put them under.

Lighting Advantages

Lights can be a great way to show the player where they should go in any scene. Say they need to access a computer terminal in the scene above, add a little more light around it and the player will be drawn to it.

They can also be used to draw players away from areas if they don’t need to be there. But there are always adventurous players that look at everything so you can add secret powerups or easter eggs in darken spots!

However, the best way to use lighting in a game is to make it look awesome! Try various lightings and see what works best in your scene.

That was Lighting in URP! Now when I look at games, I’m probably going to see what kind and where the lights are coming from.

Next up, I will talk about altering pre-built texture maps!

Thank you for your time!

--

--

Get the Medium app

A button that says 'Download on the App Store', and if clicked it will lead you to the iOS App store
A button that says 'Get it on, Google Play', and if clicked it will lead you to the Google Play store