Fun with Skybox’s in Unity

The Sky Box Material and changing the lighting settings

This is for Built-in Render Pipeline, and the Universal Render Pipeline (URP) that use the skybox Shader. The High Definition Render Pipeline (HDRP) it does not support skybox Materials and instead includes multiple sky generation solutions.

What is a Skybox? According to the Unity Manual:

A skybox is a cube with a different texture on each face. When you use a skybox to render a sky, Unity essentially places your Scene inside the skybox cube. Unity renders the skybox first, so the sky always renders at the back.

A cube has six sides so in order to create a sky box you need six textures that fit together seemly to create the sky box.

Start of by creating a new material that uses one of the skybox shaders. The shader that you choose depends on the asset that you have for the sky box. In my case I will be using the 6 sided as I have 6 textures.

Place your textures in the correct order.

Now open the Lighting Window.

In the Environment Tab change the skybox to the new material.

One thing that you may want to pay attention to is if the skybox texture that you are using has a sun or moon in it. If it does you should have your directional light placed so that it is casting light from the direction that the sun/moon is located. Your scene will look strange if the sun is in one spot in the sky yet your shadows are coming from a different location. If you are using Fog make sure to set the fog color to a color that matches your sky. Also note that if you are using the High Definition Render Pipeline (HDRP) it does not support skybox Materials and instead includes multiple sky generation solutions.

Excited about changing my hobby into a new carer with GameDevHQ course.