Setting up a Procedural Skybox in Unity

Joshua Kroeker
3 min readOct 13, 2023

--

After installing URP, you decided that the sky in your game scene was looking a little bland…That’s no problem, as creating a custom Skybox is very simple! Today, I’ll show you how to implement, specifically, a Procedural Skybox into your game so that you can have a beautiful looking sky!

The first thing to do is create a new Material like you would with any other Material. Name it accordingly and set the type of material to Skybox/Procedural.

The next thing you’ll need to do is open up the Lighting window and in the Scene tab generate a new lighting setting, change the Lightmapper to Progressive GPU (if you have a good graphics card or keep it on Progressive CPU), adjust the Max Lightmap Size, then click autogenerate.

When it comes to Lightmap size you really don’t need more than 1024. 128 is generally a pretty good size.

Then drag the new Skybox material into the Skybox slot under the Environment tab to have it be rendered.

The rendered Skybox after dropping it into the Skybox slot.

Now that we have the Skybox rendered, we can now play around with a few settings to customize the Skybox. We’ll be going over a couple of those to get you started.

After we inspect the Skybox material in the Inspector, you’ll notice a couple settings. You’ll see Sun Size, Sun Size Convergence, and Atmosphere Thickness. We’ll mess with these settings as well as the directional lighting so you can see how we can customize our Skybox!

Adjusting the directional lighting moves the sun around in the sky. Just rotate the directional light GameObject!

Sun Size is exactly what it sounds like. You get to manipulate the Sun’s size!

Sun Size Convergence also does what Sun Size does. It manipulates the size of the Sun!

Atmosphere Thickness changes the lighting of the sky. You can make it look like sunset, nighttime, etc.

Of course, there are plenty of other settings you could mess with to make this Procedural Skybox more customized but these are the most noticeable. Hopefully, this helps you get started making Skyboxes for your games and Happy Dev-ing!

--

--