Unity3D : Adding an Environment Skybox Effect

This tutorial assumes you have carried out the tutorial on creating and texturing a basic terrain: Unity 3D: Creating and Editing a Terrain.

This activity will show you how to create an environment skybox effect that encompasses the entire 3D world.

1. Start a new Unity3D project and name it SkyWorld

2. Create a new terrain. Set the terrain resolution length and width values to 1000. Create and position a directional light. Add a Hill Grass texture

In creating 3D environments, the horizon or distance is represented by the addition of a skybox. The skybox encompasses the 3D world continuously and as with the real horizon, it is not an object the player can ever visit.

Unity uses a basic material that acts as a starting point for skybox effects.

For this tutorial you will visit the Unity Asset Store and download some existing free skyboxes.

3. Launch your favorite browser and navigate to the Unity 3D homepage.

4. Select Asset Store in the top right of the homepage.

5. In the search window enter Sky5X One – this should find the free skybox package Sky5X One – select the icon and then choose Open in Unity

(if your browser displays a warning dialog window – carry on and choose Launch Application).

6. Select Import from the top left of the Asset Store window - You will need to enter your Unity userid and password to access the store, or create an account.

7. In the import dialogue select import, once the import has completed there should now be a sky5x folder in the Assets folder in the Project Window.

8. Select the sky5X_skyboxes subfolder to reveal five skybox effects. To use an effect in your scene simple drag an example skybox effect into the Scene Window.

9. Drag the sky5X2 skybox into your environment.

10. A skybox normally has a lit area to represent the Sun. Using the transform tools, you will need to reposition the directional light in the scene so its position corresponds to the position of the skybox’s sun position.

11. Create a First Person Controller in the scene and explore your world.

12. Use alternative skyboxes to see how they appear. Try the sky5X5 skybox, you may need to adjust the directional light settings to better convey a night scene.

13. Try adding a skybox to the world you created in the Creating and Editing a Terrain tutorial.