Terragen Skybox

From MovieBattles II Wiki

Jump to: navigation, search

Contents

Making a skybox in Terragen

Estimated time for completion: 2 hours including rendering (Depends on computer)

Difficulty level: 5/10


This tutorial is going to show how to make a custom skybox in Terragen.

You will need:

  • Terragen
  • Gimp, Photoshop or any picture manipulating program that allows scale-manipulating.

The process

First of all, you need to download Terragen from the Terragen website. After that, you open terragen and explore the interface. You will probably notice the set of buttons on the left side of the window. Each of these opens a dialog box where you can control your skybox in any way.

Set water properties

  1. Click on the Water button to open the Water dialog box. Use this dialog box to create a flat waveless mirror-like surface for your ocean:
  2. Click on the Waves tab, and set the following values:
    1. Water level: 0. m
    2. Wave Properties: roughness: 0, wave size: 0, Visibility Effect: 200
  3. Click on the Reflections tab, and set the following values:
    1. Overall Reflection Properties: Max Reflectivity: 100%, Reflectivity Curve: 100
    2. Reflection of Lightsources: Direct sunlight 100%; Reflection spread: 10
  4. Ignore the Sub-surface and Shore tabs for now. The important thing is to keep the water level correct and the reflectivity high.
  5. Click the close [X] button in the upper right of the dialog box to accept your changes.
  6. Save your world file to a directory on your desktop; Terragen defaults to a directory in the Terragen folder of your program files directory.

Set lighting condition properties

  1. Click on the Lighting Conditions button to open the Lighting Conditions dialog box:
    Make the following changes:
    1. Set the Sun Heading to 90 and the Sun Altitude to 45. This will place the sun at an approximate 10 AM location. In this dialog box, you can place the sun anywhere in the sky, so it is important to consider direction and time of day. Using the default orientation of "north is up," as on a map, keep the sun heading close to either 90 (East) or 270 (west), and you can vary this according to whether you want to reflect a position either north or south of the equator. Of course, these conditions mimic Earth's, and you may want to deviate completely from this for your gameworld.
    2. Set sunlight strength to 150%
    3. Set effect of atmosphere at 100 %
    4. Keep Base Sun Color RGB values at 256. This will give you a normal daylight color under the Realistic Sunlight Penetration System radio button.
    5. Although you're not going to make any changes right now, you can select the Specify Sunlight Color radio button and click Colour of Sunlight to change the color of the light.

Set atmosphere properties

  1. Click the Atmosphere button to open the Atmosphere dialog box:
  2. For the sake of simplicity, keep the atmospheric global haze effects settings: all 20% density and 2048 m half-height. Later you can go back and experiment with different haze effects and get some interesting other-worldly efects.
  3. Click the close [X] button in the upper right of the dialog box to accept your changes.

Set cloudscape properties

  1. Click on the Cloudscape button to open the Cloudscape dialog box: This dialog box enables you to determine the extent and size of the clouds. You can't control individual clouds, but rather the general parameters of the cloud cover.
  2. Click Generate Clouds to open the Cloud Genesis dialog box: Move the Largest Cloud Size slider to determine the size and frequency of the clouds within their random distribution, then click Generate Clouds to display an example preview of the cloud distribution. Pick a value that looks good to you.
  3. Click the close [X] button in the upper right of the dialog box to accept your changes.

Set rendering control properties

  1. Click the Rendering Control button to display the Rendering Control dialog box:
    Use this dialog box to see small previews of your sky. The preview window is small, so you really are just looking at color, to see if what you set in the controls reflects what you want for your sky. If this is too small, you can always do a render to see how it will look, saving time by setting the render size to a manageable 256dpi. Most of the time, the preview window is good enough if you set the slider under the window to its highest detail setting.
    1. The camera position should have the values X:3840 Y:3840 Z:30
    2. The target position should have the values X:3840 Y:3840 Z:30
    3. The fixed height about surface should be unchecked.
  2. To get a good preview, use all the default settings except for the Camera settings.
  3. Click Camera Settings to display the Camera Settings dialog box:
  4. The Zoom/Magnification setting shows the default value of 1.414, which causes the images to line up incorrectly. Change the value to 1.
  5. Click Close to accept your change and close the Camera Settings dialog box.
  6. Click Render Settings to dislplay the Render Settings dialog box:
  7. Make these changes:
    1. In the Quality tab, move the Atmosphere and Cloud Shading sliders all the way up to high.
    2. Check the option for Fast Sub-Pixel Smoothing. If you are using the registered version of Terragen, also check the Ultra and Extra Blended Detail checkboxes.
    3. Click the Options tab and make sure the defaults are selected: back-face culling enabled, and the Gamma Correction is set to 2.
    4. Click the Image tab, and set the aspect ratio to 960x960 (height and width the same), and check on the Lock Aspect Ratio checkbox. The bigger you can make your skybox, the better it will look in the game. 2048 x 2048 works well, but You can't render in that size unless you have Terragen registered.

Render the skybox

  1. In the Rendering Control dialog box, set the Camera Orientation for five different shots, one for each compass direction and one for directly above. If needed, you can also set and render a shot for the bottom of your skybox, but this is generally unnecessary.
     Set the following values for the Camera Orientation fields:
     Direction 	Head 	Pitch 	Position
     North 	0 	0 	0        FT
     East 	90 	0 	0        RT
     South 	180 	0 	0        BK
     West 	270 	0 	0        LF
     Top 	0 	90 	0        UP
     Down 	0 	-90 	0        DN
  1. For each direction, click Render Image. The images should look something like those shown below.
  2. After Terragen finishes rendering, save the image by clicking on the Save button in the upper left corner of the rendering window. You have only one option: saving as a bitmap (.bmp) file. Save each image for the five different directions needed to build your skybox with the mapname and with the position after (Example Testmap_FT, Testmap_RT).

Editing the pictures

You now have 6 pictures that are 960x960. These pictures wont do very well yet because the game does not like that size. We are now going to resize the picture with either Gimp or Photoshop. As i have never tried this in Photoshop I will tell you how to it in gimp, however, the procedure should be similar in most image editors.

  1. Install Gimp.
  2. Run Gimp and open all the images.
  3. At the toolbar at the top you click down the "Image" flyout, and there will be a tool named "Resize Image". Click it.
  4. Resize the image to 1024x1024 and then save it as an JPG.
  5. Do this with all the pictures, and soon they will be ready.

The important thing is that every single picture is named "Testmap_FT, Testmap_RT" or the picture that should go in the positionname.

Getting it ingame

Now you have these 6 pictures that are ready to go ingame. If you already have a map going, you should probably make a custom textures folder where you put these pictures in. The folder should have the same name as your map to simplify things. Put all the textures in this folder.

We need a shader for the skybox or else the sky will show the skybox as a squared, lightmapped picture that does not look like a skybox at all. You will need to get into the shaders folder of the base folder. In that folder, you simply copy one of the files, delete everything in it and rename it to your mapname. In this file, you write.

textures/testmap/sky //Specifies the texturename that you will use in radiant.
{
 	qer_editorimage textures/skies/sky.tga     
 	skyparms textures/testmap/testmap 1024 -  
	q3map_sunExt 1 0.345876 0.0124666 300 -135 //Sunlight. Needs to be changed
	q3map_lightmapFilterRadius 0 160
	q3map_skyLight 300 3
	surfaceparm 	sky
	surfaceparm 	noimpact
	surfaceparm 	nolightmap
	surfaceparm 	nodlight
	surfaceparm	nomarks
	nopicmip
	nomipmaps
}


Now you save it with the correct parameters. Open your map, browse to the testmap folder, and pick the White "Sky" texture and put it on the skybox. Compile.

Before you make it into an pk3, you will have to write SV_pure 0 before you devmap/map your map.

Any problems or questions, ask me on MBIIForums, IRC or edit this page and question it.

Pictures are to be added some day.

Personal tools