How to Add a Procedural Skybox

Unity Level Design

Dennisse Pagán Dávila
4 min readAug 1, 2022

Unity is equipped with a Procedural Skybox Shader that has the capacity to generate a skybox without the need for Input textures — instead, it uses the Material Inspector. This type of skybox is highly customizable and organic, not to mention it works the same way whether you’re using a standard project template or the URP!

Note: I’ll take a look at the HDRP in a seperate article later on

How to Add the Skybox

  1. Go to your project folder then Create →Lighting Settings.

2. Bring out the Lighting window and dock it beside your Inspector.

3. Add your new Light Settings from your Project folder into the Lighting menu.

4. Adjust the Lightmapper in the Lightmapping settings, you can experiment with different settings, but for now, I will stick to Progressive GPU.

You can find more info on the Lightmapper Types down below.

3. Tweak the Auto-generate box, this will allow you to actively see whatever changes you make to the lighting in real-time.

Note: Your experience with auto-generate may vary depending how porwerul your graphics card is — You could experince lag when the auto-generates attemps to update the changes in the Editor.

4. Create a Material and name it Skybox, then add it to your Skybox Material in the Environment tab of your Lighting.

Creating Material
Adding Material

5. After adding the Skybox Material, your scene might turn completely dark, and you will get a warning.

This is because we are yet to assign a Skybox shader, therefore it’s being read as an incompatible material.

Got to Inspector (while the material is selected) → Shader → Skybox → Procedural

Now, your scene should be lit up and the warning message should be gone.

How to Customize the Skybox

Let’s take a look at the procedural skybox we just added, there are a few new elements for us to manipulate and this can get pretty overwhelming when you’re new to lighting.

Image Provided by Unity — Manual

The Unity Manual and Unity API are excellent tools for learning, but they can be extremely lacking in visuals — this entices us to test things on our own or do further research, but right now I’m just going to show you what each of these options looks like.

Atmosphere Thickness

I know this is one of the last options on the list, but I wanted to start with this one because it will make some of the other examples more apparent.

Sun Size and Sun Size Convergence

Sky Tint

Ground

Exposure

Your Directional Light in a Skybox

If your Directional Light hasn’t already been added to the Skybox(either by default or manually), proceed to do so.

Being able to use directional light to manipulate the Skybox can actually allow us to create a day-night cycle. Of course, this could require some scripting, which won’t be a part of this article, but I look forward to discussing this in the near future.

With this, your Procedural Skybox should be properly added! In the next article, I will be taking a look at the different types of light in Unity.

Follow me for more Unity Dev articles!

--

--

Dennisse Pagán Dávila

Software Engineer that specialize in Game Development. Currently looking for new opportunities. LinkedIn: https://rb.gy/xdu8nu