Design 1, Design 3 (Computer and Video Games)
Unit 10 - 20th November 2001

H ow to Create a Skybox

It is importatnt for the creation of outdoor levels to have a sky which does not look like a box with a wallpaper glued upon the inside of the box, but to rather create the illusion of an infinitely distant all-surrounding sky.

This can be accomplished with the technique of the skyboxes. Create or download a seemless panoramic sequence of files first. (Click here to download the textures of this example.) You should now import the .pcx files or .bmp files into your textures. Import

and ,the neighbouring file aso.

First thing to do is to create a new level with two boxes, a small one (256 x 256 x 256) which is called the skybox and a large one containing your complete walkable terrain.

There are no clouds or mountain peaks to be seen yet. In order to achieve that, we have texture the skybox (the small one) with the panoramic tiles we downloaded in the beginning. Then we have to add a ZoneInfo from the Actor classes/ Info subclasses. Put this Zoneinfo called "Sky ZoneInfo" in the middle of the small box and control the horizons coordinates by shifting the ZoneInfo upwards and downwards.

In certain cases you might have to flip the panoramic tiles horizontally. You can achieve this by selecting them all ("Select all adjacents") and right-clicking on one of the surfaces. The surface properties dialog shows a checkbox for flipping the surfaces in "U" direction, i.e. horizontally.

The skybox should now contain a seemless panoramic texture which can be watched 360 degrees around.

One last thing regarding the skybox: We want to avoid the cube that contains the skybox to show any shadows or lighting peculiarities. We therefore have to set the surface properites of all the surfaces of the skybox to be "Unlit".

 

In the perspective view window we move to the large box now, which does not show the panoramic view yet. A simple thing changes the affair however.

Select the walls and ceiling of the large box, let the "Surface Properties" dialog appear and check "Fake Backdrop" on. This causes the ZoneInfo in the small skybox to work like a videocamera which projects its recorded imagery upon the walls of the large box's walls having the property "Fake Backdrop".

Unfortunately a problem arises at the edges of the box. Watch carefully! There is a 1pixel line in between the tiles, which seems to be an UNREAL bug as far as I know. If you patch the sqare tiles together in Photoshop, there is no poblem of that kind, but as soon as you import them into UNREAL, the messy line appears.