This article was converted from a previous version of TWHL and may need to be reviewed
- The formatting may be incorrect due to differences in the WikiCode processing engine, it needs to be revised and reformatted
- Some information may be out of date
- After the article is re-formatted and updated, remove this notice and the Review Required category.
- Some older tutorials are no longer useful, or they duplicate information from other tutorials and entity guides. In this case, delete the page after merging any relevant information into other pages. Contact an admin to delete a page.
Custom skyboxes can add a touch of uniqueness to a finished map, changing the setting from the stock New Mexican deserts and Xenian Nebulae. If you're interested in creating skyboxes, you'll need
Terragen first. Install it, and download the example map to get a compiling script for the skyboxes.
The default Terragen Interface with nothing opened. When you first open Terragen, the interface may be confusing. To get started, click
Generate Terrain.
In the dialogue that opens up, choose the settings for your blank slate. When you're happy with what you've selected, click the
Generate Terrain on the window. The
Landscape window will now display a hightmap image of the terrain you currently have. Most likely, you'll want to change it, so open it up and work with the sculpting tool until you're happy with what you have.
With either display mode, the heightmap will change colour when you edit it. Afterwords, change the
atmosphere, sun, water, and cloud settings to your liking. You may also wish to change the surface map, so the terrain doesn't look like a bland rock surface when it's rendered. It takes skill and experience to create realistic terrain, but it's fairly easy to play with water reflectivity, sun position and environmental settings to create something that looks good.
Once you think the terrain is good, change the camera position to the centre of the terrain with the camera tool in
View/Sculpt, and turn its facing to a side of the viewport. You can adjust the height and angles as well, but it is recommended that the target height be the same as the camera height, so the skybox appears level ingame.
The camera should have settings similar to this. You may want to save before going any further, just in case you're not happy with the images or they are renamed incorrectly later.
Jack up the detail in the
Rendering Control window, and go into the settings to do the same with the
Quality tab's accuracy sliders. Also of importance while the window is up is the
Image tab- make sure the image is set to be
256x256.
For best results, make sure all the detail options are full. In the top toolbar, go into
Terragen and select
Execute script. locate the
skycreate.tgs script found in the example download, and run it. Terragen will begin rendering 6 images with facings based off the camera's original view. Once it reaches the end, you no longer need Terragen open.
The render viewport will start black and reveal more of the enviroment as it is rendered. Go into your C: drive, where the script will have spat out 6 bmp files. Rename the images according to the following key, where
xxx is the skybox name you want to use; (Note: The underscore is not needed, and only in for clarity's sake. If you use it, be sure to make sure your skyname in the editor is
xxx_, not xxx)
[ins]Original Filename = What to rename it to
0001 = xxx_rt
0002 = xxx_ft
0003 = xxx_lf
0004 = xxx_bk
0005 = xxx_up
0006 = xxx_dn[/ins]
If needed, touch up the images, getting rid of any black areas in the terrain's borders. Using your favourite TGA compatible image editing program, save all of these renamed images as
.TGAs, and place them in the
gfx/env/ folder of the mod or game you want to use them in. Edit the RMF included in the download to use your new sky, and compile it. If the renaming process was done properly, all sides of the skybox should fit together seamlessly, and run perfectly in game.
Author's Note: This tutorial does not work with the more recent Terragen 2, as it is not currently capable of executing Terragen script files.
)
You may be able to do it with imported heightmaps and a complex set of ground textures, but that's beyond the scope of this tutorial and my skill in Terragen.
Anyway, it's a good tutorial Jeff. Very handy.
(Terragen error)
: Unable to open file!
: Possible causes: folder doesn't exist or disk full.
: Check output settings for the script.
(Terragen error)
:Unknown image format or error writing file.
(Terragen)
:Animation render aborted.
(Terragen)
:End of script
Admer: Yeah, software mode I think
func_cambreaKable: software mode uses tga's too though
func_cambreaKable: i have only tga skyboxes in WAR and they work on software mode
Mikko: software mode falls back to tgas if bmps can't be found
Mikko: bmps can be used by gl too if you have an old graphics card that supports those paletted texture extensions