L3DT users' wiki
Large 3D terrain generator


Making a skybox using Terragen

Author Aaron
Last update 10th of May 2008
PDF 332kB


The sky backgrounds in the Sapphire renderer are a static set of 6 orthogonal images projected onto a 'skybox'. This tutorial explains the process involved in creating your own images for the skybox using Terragen. You may be able to make such images in another program, but this is how I do it.

If you don't have Terragen, download it from Planetside. The unregistered free version is good enough for the purposes of making a skybox, but the full version will give better results.

Using Terragen

I am by no means an expert at using Terragen (see Ashundar Terragen Community for those), so please bear with me as I stumble through the controls.

Getting started

When you start Terragen, you should be confronted with a screen something like this:

You can close the 'Landscape' dialog, as we're not going to be rendering terrain (just sky).

Rendering control

All the excitement happens in the 'Rendering control' dialog:

The important settings are:

  • The image size is 512 x 512.
  • 'Land' is disabled.
  • The camera coordinates are in 'Terrain units', not 'Metres'.
  • The camera position is x = 128, y = 128, z = 0.
  • The 'Zoom' setting is set to 1 (click on 'Camera settings' to do this).

If you click on the 'Render preview' button, Terragen will show you a little preview. You'll note that in the above image, the preview is really blocky. You can get a better preview by increasing the 'Detail' to max.

Ahh, that's a bit better, though it's still quite small. What the hell, let's do a full render ('Render image' button):

Why is the bottom black?”, you may ask. I don't rightly remember the answer, but it's irrelevant anyhow since it can't be changed. You can however reduce the effect by increasing the sky size using the 'Cloudscape' dialog:

Cloudscape settings

To increase the sky size, click on the clouds icon on the Terragen sidebar to open the 'Cloudscape' dialog. In this dialog, you'll want to set the sky size to something large, like 8192x:

While we're here, lets set the clouds to 3D, as it makes them look prettier (using the '3-D' checkbox). It's also a good time to mess around with the other settings to get the desired cloud density. I'll set the density contrast to 100 and the density shift to 10:

Coolio, that's a good start.

Sun position, haze, etc

You can set the other various atmospheric settings in the 'Lighting conditions' dialog, which is opened by clicking on the sun-like icon on the side toolbar. I won't go into those settings here, as it's fun to experiment yourself.

Targets for images

Anyhoo, let's render some images. You will need to take 5 images with the following camera target positions:

Direction Target position Image name
North 128 256 0 front.jpg
East 256 128 0 right.jpg
South 128 0 0 back.jpg
West 0 128 0 left.jpg
Upwards 128 128 2 top.jpg

Further notes:

  • You'll need to enter these positions manually into the render control dialog, as it's very important that the camera be aligned precisely.
  • The 6th image (Downwards), should be left black, since Terragen won't render below the horizon anyhow.
  • You may need to rotate top.jpg 90 degrees to get it to match up to the other four images.

Where to put the images

Sapphire can load the skybox images from anywhere on disk, so you don't need to save them to any specific directory.

However, if you want to store your skybox textures alongside the default skybox images provided with L3DT, you may save them in the following directory:

Win XP

C:\Documents and Settings\[user name]\L3DT\[version]\Resources\Sapphire\Skybox\

Win Vista / 7

C:\Users\[user name]\L3DT\[version]\Resources\Sapphire\Skybox\

Loading the skybox in Sapphire

To load the skybox images in Sapphire, select the 'Extensions→Sapphire→Renderer settings' menu option in L3DT. This will open a settings dialog such as that shown below:


To use your skybox images, double-click on the entries under 'skybox→textures'. Your skybox will be loaded when you next open Sapphire.

tutorials/terragen/skybox.txt · Last modified: 2017/08/31 04:51 (external edit)
Except where otherwise noted, content on this wiki is licensed under the following license:CC Attribution-Share Alike 3.0 Unported
Recent changes RSS feed Donate Powered by PHP Valid XHTML 1.0 Valid CSS Driven by DokuWiki