Skies are built differently in UnrealED 3. Instead of creating a sky box, we now have to create a sky dome to implement a realistic sky in our maps. Custom skydome textures are difficult to create and are not yet freely available from the internet. This tutorial will show you how to convert skybox textures into a skydome.

Requirements:

• Skybox Textures
HDRShop
ATI CubeMapGen
• An Image Editing Program (Such as Adobe Photoshop / Jasc Paint Shop Pro).

Please note that the software featured in this tutorial may be free for non-commercial use only. Please refer to the licence agreements for further detail.

Tutorial Navigation

• Step One: Create Skybox Textures
Step Two: Create a Skybox Cross
Step Three: Edit & Convert Image
Step Four: Crop Image
Step Five: Import Skydome Into UnrealED

Step One: Create Skybox Textures

If you already have skybox textures, you can skip this step. If not, you will need to create your own. Skyboxes are fairly easy to generate using a variety of programs. I would recommend the free version of Terragen 2, available here. The creation of your initial skybox textures is beyond the scope of this tutorial, however further Terragen 2 tutorials are available below.

Terragen 2 Tutorials
How to Output Skybox Textures with Terragen 2

Note that the quality of your skydome will depend on the resolution and quality of your skybox textures. I would recommend textures of at least 1024 x 1024, where possible. For this tutorial, I used a basic skybox which I created using Terragen 2;

A sky render created with Terragen 2.

Step Two: Create a Skybox Cross (ATI CubeMapGen)

Open up the ATI CubeMap Generator (click to download). At first, the user interface to this program appears to be complicated, but the following steps are fairly straight forward. The sphere shown in the main screen is your preview window, and we will be using the tools on the right to import our skybox textures.

ATI CubeMapGen tools. Enables you to stitch together skybox textures into a 'sky cross'.

Clicking the following button will bring a drop down menu. Each line refers to a different facet of your skybox.

Importing sky box textures into the ATI CubeMapGen

Select the top line, ‘X+ Face’, and click the ‘Load CubeMap Face’ button to import your first texture.

X+ and X- refers to your north and south skybox faces.
Y+ and Y- refers to your top and bottom skybox faces.
Z+ and Z- refers to your west and east skybox faces.

Select each face and import each texture one at a time, ensuring that the textures are aligned correct on your preview sphere. You can rotate the sphere by using your left mouse button to drag it. Note that you may have to flip or rotate your textures to align them correctly using the ‘Flip Face’ buttons, especially the top and bottom.

The result should look similar to the sphere below. Once complete, click ‘Save Cube Cross’, and save using the .bmp format. Click yes if a dialogue box appears. You may now close the ATI CubeMap Generator.

An imported skybox in ATI CubeMapGen, ready to export.

Step Three: Edit & Convert Image

Before we import our newly created ‘cube cross’ into HDRShop to create a skydome texture, we need to make a couple of minor adjustments to the image. Open up your ‘cube cross’ in an image editing program (such as Photoshop or Paint Shop Pro). What we now need to do is duplicate the very edge pixels on each of the four quadrants, and carry them over onto the blank edge space by one pixel.

This is important, as when we convert the image to a skydome, rounding errors in the process can cause some pixels to ‘leak over’ and mix into the final image, causing a slight curve of rouge pixels to appear in our final image. Duplicating the edge pixels of the cross into the blank space in all four quadrants eliminates this issue since the pixels that leak over are always relevant.

Finally, save your image as an 24-bit uncompressed .tga (Targa) file. Although its possible to save the image as a 24-bit .bmp and import into HDRShop, this may degrade the quality of your skybox!

In HDRShop:

• Open up your newly created cube map (cross) in HDRShop (click to download).

• Click ‘OK’ to the ‘Camera Response Curve’ dialogue box that will appear. Note that initially you’ll be zoomed into the image. You may need to right click the image and zoom out a few times for your sky to be shown.

• If your image is upside down, flip it by clicking ‘Image > Transform > Flip Vertical’.

• Convert your image to skydome by clicking ‘Image > Panorama > Panoramic Transform’

In the ‘Panoramic Transform’ dialogue, set the following properties;

Source image format: ‘Cubic Environment (Vertical Cross)’
Destination image format:
‘Latitude/Longitude’
Width / Height:
2048 / 1024

Note: If you are using very high resolution textures, you may be able to set a higher width/height.

HDRShop panoramic transformation tool - used to convert a sky cross into a skydome .

Click ‘OK’, and you should now have a panoramic texture, which is almost ready to be applied to a skydome;

A panoramic skydome texture in HDRShop. Almost ready to be imported into UnrealED.

Save this image in .bmp format, and click yes to the display setting dialogue that will appear.

Step Four: Crop Image

Open up your shiny new panoramic bitmap with an image editing program (such as Photoshop or Paint Shop Pro). We only require the top half of this image, so you will need to crop the bottom half of your image.

Note that you must crop exactly half of your image. The final length and width of your image must be a power of two (512, 1024, 2048, etc). You will not be able to import your texture into UnrealED if your cropping was one pixel too short.

Step Five: Import Skydome Into UnrealED

Open up your map within the editor and then the generic browser by clicking ‘View > Browser Windows > Generic’. In the top-left of the browser, check Textures, Materials, and Static Meshes, and uncheck anything else. Click ‘File > Import’, and select your skydome texture.

Enter the following properties, and click ‘OK’;

Tick ‘Defer Compression’

Package: Must be the name of your map (minus the file extension) in order to embed the texture. For example WAR-Torlan.
Group:
This may be left blank.
Name:
A name for your skydome texture. For example, MySky_Tex.

By now, your skydome texture should be visible in UnrealED as follows;

Importing a skydome texture in UnrealED.

Before moving on, we need to ensure the texture isn’t automatically compressed, because this will degrade the quality of the sky. Right-click on your imported texture, and select ‘Texture Viewer’. Select the following options;

Tick ‘CompressionFullDynamicRange’

Compression Settings: ‘TC_HighDynamicRange’

Don’t worry if your texture turns bright or strange as a result of this. Next, we need to create a material. In the generic browser window, click ‘File > New’.

Enter the following properties, and click ‘OK’;

Package: Must be the name of your map (minus the file extension) in order to embed the texture. For example WAR-Torlan.
Group:
This may be left blank.
Name:
A name for your skydome material. For example, MySky_Mat.
Factory:
Material

A new material will appear in your browser window. Right click the material, then select ‘Material Editor’. A screen, similar to the following will appear;

UnrealED - Material Editor window.

Right click an empty gray space, and add a ‘New TextureSample’. You can use the left mouse button to navigate around the material editor, and middle mouse button to zoom in and out.

Back in your generic browser window, click onto your skybox texture once to highlight it. Back in your material editor, add this texture to your material by clicking the small green arrow, as shown below;

Importing a texture into UnrealED's Material Editor .

To complete the material, drag a line between the black square on the left of your texture, to ‘Diffuse’. Drag another line between the black square and ‘Emissive’. You should end up with something like this:

Creating a material in UnrealED: Adding diffuse and emissive properties to a texture.

You may now close the editing window, saving any changes.

Creating your SkyDome

Finally, we can now create our skydome.

• Open the ‘UN_Sky’ package from your generic browser by clicking ‘File > Open’. It’s located in X:\XXXX\UT\UTGame\CookedPC\Environments – ‘X’ refers to your game directory. Locate the package in the bottom-left section of the generic browser, and click on it once to highlight its content.

• Locate the static mesh named ‘S_UN_Sky_SM_SkyDome03′, and select it once to highlight it.

• In the 3D view, navigate to the center of your map, right-click, and select ‘Add Actor > Add Static Mesh’.

• Double click the static mesh (skydome) which appears, to enter the properties screen.

• Navigate to the ‘Materials’ property, then add a material by clicking on the green ‘+’. Select your material in the generic browser, and add your material to the static mesh using the green arrow.

Static mesh actor properties window: Altering the material.

Resize the skydome to surround your level. Your skydome is now visible in-game!

Custom skydome texture imported into UnrealED!

Special Thanks to Fenring for allowing me to update and expand his original Battlefield 2 tutorial for UnrealED.