| ![]() |
A sky box is a series of six images that wrap around to form a box.
The entire map you are playing in will be encased in this virtual
box - it is as if you are inside a giant box and can see the
images 'painted' on the inside of it. It gives the illusion of
a virtual horizon, sky and ground without the need for complex
spherical calculations (that would otherwise slow down the game play).
The edges of each of the six images match up to make a seamless
wrap-around vista. The image to the left is a general template for
Heretic II sky boxes.
Note that each image does not represent a flat continuation of the scene. If it did, then you would notice the edges and corners of the 'box' you are in and the illusion would be spoiled. Instead, areas above and below the horizon curve up or down towards the corners. This counter-acts the square edges of the sky box and uses an optical illusion to make it seem as if you are within a perfect sphere instead. Needless to say, a simple box with just six static images is much easier to process than a single image wrapped around to form a sphere (which would need to be recalculated every time the player moved).
The naming conventions are simple. You can name your sky box anything you want, placing the letters LF, BK, RT, FT, UP and DN after them. They stand for Left, Back, Right, Front, Up and Down respectively. Thus a sky called Newsky would have six images, called Newskylf, Newskybk, Newskyrt, etc.
Each image has to be 256x256 pixels in size, and converted to the M8 format (see the Skinning Tutorial for how to create M8 images). Each image must have only 256 colours, and like all M8 textures the first entry in the palette must always be black (otherwise you will get random black speckles). Heretic II will then convert each sky image into its own palette, so be prepared to find that your images that seem perfect in a graphics editor may look blocky and pixelated in the game (although graphics modes other than software will smooth this out somewhat). The six M8 images are then placed in the /pics/skies/ directory. If you place them in the default game folder /base/pics/skies/, then you can display your own skies in existing maps. Simply type the command SKY SKYNAME at the console (where SKYNAME is the name of your custom sky).
I've used Terragen to create sky boxes. It only generates virtual terrain, so if you want buildings in the background you may want to experiment with a ray tracer like POVray. There is a Terragen sky box tutorial available online. Some of the tutorial deals with Quake 3, but the general principles are the same for Heretic II. The only important things are to set the ZOOM / MAGNIFICATION in CAMERA SETTINGS to 1, and to remember which directions correspond with which image. For Heretic II they are:
| Heading 180, Pitch 0 | skynameLF |
| Heading 270, Pitch 0 | skynameBK |
| Heading 0, Pitch 0 | skynameRT |
| Heading 90, Pitch 0 | skynameFT |
| Heading 0, Pitch 90 | skynameUP |
| Heading 0, Pitch -90 | skynameDN |
Note that these settings are different to those given in the Quake 3 turorial. The following is the first sky box I generated using Terragen, after fooling around with the settings for about half an hour.
