The following image shows a simple example of six images that make up a game's background panorama: you see the top (blue sky), the bottom (the ground), and four sides (a snow-covered mountain at the horizon).
The trick with skies is that you project these six textures onto the insides of a gigantic cube that encompasses your whole scene. This popular approach of faking a background is called
environment mapping. When we use a six-image CubeMap
to simulate a sky, we refer to the box as
SkyBox.
You can create your own SkyBox from a vacation photo or poster in a graphic editor:
Take six matching square snapshots of a panoramic view: one in each of the cardinal directions, plus one up, and one down.
Use the tools of your graphic editor to make the seams of the photos match.
Save them as six individual PNG files. Name them
South
,East
,Up
,Down
, and so on.
To create a SkyBox, keep your six images ready, or use the ones provided with this book in assets/Textures...