My journey becoming a Unity game developer: Make a game look beautiful-URP and Skybox pt.2

Objective: Change the environment’s scene using a 6-Sided, Cubemap, and Panoramic Skybox. Also, fix the seams that can appear on the texture in the scene.

6-Sided Skybox.
Cubemap Skybox.
Panoramic Skybox.

Procedural Skybox Shader is a simple way to change the environment outside, but there are other techniques that we can use to create our environment. The next technique we will use is a 6-Sided Skybox Shader. The 6-Sided Skybox Shader gives the appearance of a Scene inside of a cube. We will have to add 6 separate textures on each face of the cube to create a seamless environment.

With the Skybox material selected in the Materials folder, change the Shader in the Inspector from Skybox/Procedural to Skybox/6-Sided. Drag each texture into the corresponding Negative or Positive X,Y, or Z axes to create an seamless environment.

Changed Skybox from Procedural to 6-Sided.

If we notice seams in our environment, there could be 2 reasons for this happening. The first reason could be that the textures need to be changed from one axis to another. If the first reason isn’t the problem, the second reason could be that the textures pixels are not equal to each other. To fix this problem, select all of the textures used in the Skybox. In the Inspector, go to Wrap Mode, then change the setting from Repeat to Clamp, and click Apply. This will clamp all of the textures together fixing pixels differences and making the environment seamless.

Removed seams from the environment by Clamping the textures together in Wrap Mode.

Another technique that can be used is the Cubemap Skybox Shader. Cubemap uses either vertical and horizontal cross layouts, or column and row faces which are supported by Unity.

Cubemap layouts supported by Unity.

Either create a new Material name Sky Cube Box or use the previous Skybox material. Select the 6-Sided texture to be used as a Skybox, change the Texture Shape from 2D to Cube, and click Apply. Select the Skybox material to be used as a Skybox, change the Shader to Skybox/Cubemap, and drag the 6-Sided texture into the Cubemap slot. Finally, select the Lighting tab and then select the Environment tab. Drag the Skybox material into the Skybox Material’s slot under the Environment setting to see the new environment in our scene.

Cubemap material used for a new environment appearance.

We can use another technique called Panoramic Skybox Shader which wraps a single texture spherically around the scene. Either create a new Material name Skybox Panoramic or use the previous material. Select the Skybox material being used and change the Shader to Skybox/Panoramic. Drag the Panoramic texture into the Spherical(HDR) slot, and observe the Panoramic texture in the Preview window.

Created a Panoramic material.

In the Preview window we noticed a seam appearing on the texture. Select the Panoramic texture, and change the Wrap Mode to Clamp. Also, turn off the Generate Mip Map under Advanced as Mip Maps are less intense images appearing smaller and blurrier the further away they’re from the camera. After clicking Apply to make the changes permanent, go to the Lighting tab and drag the Panoramic Skybox into the Skybox Material’s slot to see the new environment.

Fixed the seam and added the Panoramic material to the environment.



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