2Bit's Mapping Corner on www.PythonOnline.co.uk
ET Mapping Tutorial

Lesson 25


Back to main menu
Intro [Top]
A skybox is a device to make it appear that there is more terrain in the far background around your map.

You don't need one if your map is entirely indoors with no distance view outside.  Its use is optional if you have outdoor areas or views.

If you don't use one, your sky will look like the sky texture you've chosen.  If you do use one, the sky faces will instead show the distant background.  This works best if the sky ceiling is 512 units high.  If it gets hugely high, like 3000+, the projected image gets so elongated vertically that it starts to look bad.  In which case you may be better off without a skybox.

To create one you will place a self-contained hollow cube somewhere outside your map volume, ie out in the void somewhere.  The inner faces of the cube refer to the image to be used as distant background, and a special camera entity is placed in the middle of the cube so that the compiler knows it is being used as a skybox.

You will need to add a skybox definition to your <yourmapname>.shader file.

Making a skybox texture is a bit of an art, and not easily done by the uninformed like you and me :)

Happily, people create skybox images and make them freely available.  One such excellent chap is Amethyst7.  You can get a number of great skybox textures from him at: http://amethyst7.gotdoofed.com/env.htm.  If you do use one of his, please credit him in the ReadMe that you'll create for your PK3.

Skyboxes [Top]

So you won't have to create one from scratch, download this file: prefab_skybox.zip

This is the Siege skybox, one of Amethyst7's.

  • Create an empty text file in the etmain/scripts folder called <yourmapname>.shader.
  • Create a folder called "skybox" in the etmain/textures/<yourmapname> folder.
  • Open the zip file.
  • Put the .map file into your etmain/maps/prefabs folder.
  • Put the .shader file into your etmain/scripts folder.
  • Put all of the .jpg files into the etmain/textures/<yourmapname>/skybox folder.
  • Edit the prefab_skybox.map file and change all references of <yourmapname> to "tutorial" (no quotes) or whatever map name you are using.
  • Do the same with the prefab_skybox.shader file.
  • Copy the text in prefab_skybox.shader into the <yourmapname>.shader file.

Make sure you have "<yourmapname>" eg "tutorial" added to the shaderlist.txt file.

Run Radiant and open the map.  Import the prefab_skybox.map into it, and move the cube without resizing it until it is outside your own map volume, that is, it doesn't come anywhere within your own map space.  I always put it near the bottom, off to the left.

Compile your map and go take a look in ET.  You should see some nice snowy hills in the background with clouds scudding across the sky :)

Next lesson