Skybox

From Mod Wiki
Revision as of 11:40, 9 November 2007 by MoP (talk | contribs) (skybox page from SD wiki)
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)

A skybox is a set of images used to create an exterior sky. These can be added to an atmosphere using the Atmosphere Editor.

Creating A Sky Box

Make The Image

  • Create a sky image that tiles horizontally. Make it 4 times wider than it is high (eg. 2048x512).
  • Save the image as <span style="padding: 0 0.5ex; background: #def;" title="A file or folder named '/base/atmosphere/skies/<mapname>.tga'">/base/atmosphere/skies/<mapname>.tga.

Convert The Image To a Skybox

Once you have created your sky image, load ETQW and use the halfSphereToSkybox console command to convert your image into a distortion-free skybox that can be used by the game.

  • For example, type halfSphereToSkybox atmosphere/skies/<mapname>
  • This will output <span style="padding: 0 0.5ex; background: #def;" title="A file or folder named '<mapname>_side.tga'"><mapname>_side.tga and <span style="padding: 0 0.5ex; background: #def;" title="A file or folder named '<mapname>_top.tga'"><mapname>_top.tga images into the same folder.

Here is an example showing what happens to your source image to get the skybox textures: Before and after converting a skybox image

Create A Material

Create a material for your new skybox. These are very simple since they're set up from a template. In general these materials are stored in /base/materials/atmospheres/skydomes.mtr. Example material:

// used by <mapname>
material atmospheres/skydomes/<mapname> {
	useTemplate material/skybox< "highquality atmosphere/skies/<mapname>" >
}

Save the material file and type reloadDecls in the console to load the updated material. Your sky material should now be available to choose in the "Layer Material" section of the "Skydome & Clouds" tab of the Atmosphere Editor.