[ < ] | [ > ] |  | [ << ] | [ Up ] | [ >> ] |  |  |  |  | [Top] | [Contents] | [Index] | [ ? ]

### 5.6.10 Generating Skybox Textures

If you don't like the idea of keeping the player always inside a building and never allowing him to look outside, then you need a skybox. A skybox will give the player a good illusion that there is an outside to your level. A skybox is a huge box with textures that shows what is outside. However, creating these textures is a bit tricky, otherwise, it might just look like the inside of a textured cube.

But there is good news, because there is a free tool that is great for making these textures. It is called Terragen.

http://www.planetside.co.uk/

Please consult the terragen documentation about how to create a world, as I will only explain, how to export the map file to Crystal Space.

#### Exporting to Crystal Space

When you are done creating your world perform the following steps:

Open the "Rendering Controls" panel.

1. Move your camera to the desired point in your map.
2. Disable the "Fixed Height Above Surface" switch.
3. Set "Detail" to Maximum.
4. In the "Camera Settings" dialog set "Zoom Magnification" to "1".
5. Set "Image Size" to 512x512 or 256x256.

Now create six images and store them. Use the following settings for these images:

> Texture Name Suffix | Camera Head | Camera Pitch | Camera Bank
> `_f` | 0 | 0 | 0
> `_r` | 90 | 0 | 0
> `_b` | 180 | 0 | 0
> `_l` | 270 | 0 | 0
> `_u` | 0 | 90 | 0
> `_d` | 0 | 270 | 0

Convert the generated bitmaps to a format readable by ``map2cs'` (TGA, JPG, JPEG, BMP, WAL).

Then you need to add a setting "skybox" with the value of your basename in the general world properties. (For example, if your textures are called ``sample_f.bmp'`, ``sample_r.bmp'`, you will set "skybox" to "sample"). Now every brush you assign a key "sky" with a value of "1" will look like your skybox.

In addition, faces whose texture is "sky" will also let you see the skybox.

Now you have to let map2cs know where ``sample_f.bmp'`, ``sample_r.bmp'`, etc. are located. We will put all the ``sample_*.bmp'` files on a single ZIP file. Launch WinZip, WinRAR, or the program you use to open ZIP files. Create a new file, store all the ``sample_*.bmp'` files on it, and save it as ``C:\Crystal\Maps\sample.zip'`.

Open the file ``C:\Crystal\CS\data\config\map2cs.cfg'` in your favorite text editor, then add a line like this:

    `Map2CS.TextureSettings.zip1 = C:\Crystal\Maps\sample.zip'.

``map2cs.cfg'` should now look like the following example:

    Map2CS.TextureSettings.DefaultTexture = liquids/bubbles
    Map2CS.TextureSettings.wad1 = C:\Crystal\WADs\cstex_1.wad
    Map2CS.TextureSettings.wad2 = C:\Crystal\WADs\cstex_2.wad
    Map2CS.TextureSettings.wad3 = C:\Sierra\HalfLife\valve\halflife.wad
    Map2CS.TextureSettings.wad4 = C:\Sierra\HalfLife\valve\xeno.wad
    Map2CS.TextureSettings.wad5 = C:\Sierra\HalfLife\valve\liquids.wad
    Map2CS.TextureSettings.wad6 = C:\Sierra\HalfLife\valve\texpack.wad
    Map2CS.TextureSettings.zip1 = C:\Crystal\Maps\sample.zip

    Map2CS.General.Scaling = 0.025
    Map2CS.General.UseBSP = 0
    Map2CS.General.RemoveHidden = 0
    Map2CS.General.LightScale=30

    System.ApplicationID = Map2CS

Ready! Just try this out. It is a really amazing effect.

This screenshot doesn't really do justice to the skybox effect, but it looks quite nice, never-the-less. To really appreciate the effect you will need to move around a world in Crystal Space using a map enclosed within a skybox.

[ < ] | [ > ] |  | [ << ] | [ Up ] | [ >> ]

This document was generated using texi2html 1.76.