Unity 6: How to Use an HDRi Panoramic Image as a Skybox Background

Опубликовано: 06 Октябрь 2025
на канале: Francesco Milanese
103
5

Hello everyone! In this short beginner tutorial on Unity 6, we’ll see how to set an HDRi panoramic image, in the so-called Equirectangular format, as a Skybox, meaning as the background of the virtual universe. The process involves three simple steps: importing the image, creating a Skybox Material, and finally assigning this Material to the Skybox field of the Environment.

First, we need to choose the image we want from disk and import it into the Project. I’m doing this by dragging the image from its source folder. I’m also renaming the image to World Panorama so it’ll be easier to find later.

With the image selected in the Project, let’s take a look at its Inspector to adjust some settings. We need to make sure that the Texture Shape is set to 2D and the Texture Type is set to Default. Then we can change Alpha Source to None, since these images don’t have transparency, and Wrap Mode to Clamp, because we want to map the whole image without repetitions. Let Unity decide the most suitable format by choosing the Automatic option, then select the compression quality we prefer and, once all these operations are done, click Apply to confirm the new settings for the Asset.

Now we need to create the Skybox Material we want to use, where we’ll set the panoramic image we just configured. By right-clicking in the Project, I create a new Material, which I’m naming My Skybox.

In the Inspector of this new Material, we change the Shader to Skybox Panoramic, then set the World Panorama image in the Spherical HDR field. The Mapping mode should already be Latitude Longitude Layout, with Image Type set to 360 degrees; if not, we’ll set it manually. In the Material tab you’ll also find the Exposure and Rotation settings, but we’ll look at those later.

To set this Skybox Material as the background of the virtual universe, we first need a Lighting window, which we can add from Window Rendering, and we can place it next to the Inspector.

In this new window, open the Environment section and assign our Skybox Material in the corresponding field. Then make sure Skybox is selected as the Source under Environment Lighting, so that our Material is also used for ambient lighting. The purpose of this tutorial is to show you how to set an HDR panoramic image as a background, so I won’t cover how to set Reflection Probes and other tools here, as those are topics for separate tutorials.

We can now also go back to the Inspector of the Skybox Material and adjust the Exposure and Rotation parameters to achieve the results we want.

Alright, that’s it for this short beginner tutorial on Unity 6 Skybox! I hope it was helpful! See you next time!