This tutorial will show you how to build a basic ‘cube’ skybox inside the Unreal Editor, and enable this to show in-game. It will also introduce you to using mist and ‘fog rings’ to eliminate pop-up and provide a sense of depth. Skyboxes have been superceeded by Skydomes in Unreal Tournamet 3 (UnrealED 4.0).
• This tutorial uses UnrealED 3.0 (Unreal Tournament 2003/4).
• It assumes that you have a basic knowledge of the Unreal Editor.
• Creating a Simple Skybox
• Working with TC_Clamp
• Using Custom Skyboxes
• Using Fog Rings
What are you waiting for? Pull up a chair, get yourself a coffee/beer, and let’s dive straight in! Firstly, we need to choose a Skybox. Open the UnrealED texture browser, and open the ‘SkyRenders.utx’ package. All these steps are highlighted by the circles on the image below. This will show all of the skybox textures within that package. If you are working with a game other than Unreal Tournament 2004, you will need to locate a package which contains skybox textures yourself.
|
For this tutorial, I’m going to be using the snowy blue sky skybox, which looks like the image below. It can be found by scrolling down the texture browser. You can choose a different one if you like (If you want to use a custom skybox, you may want to read our notes further down the page).
|
Open your map (or a fresh one) and Right-Click the cube brush tool (Shown by a red circle in the image below). Important: The height/width/breadth need to be the same size as as the skybox textures you are working with. This is why we chose our skybox before we create our cube. Type your values in the Height, Width, and Breadth fields, then click build. Our snowy skybox has dimensions of 512 x 512, so we entered 512 into all values.
|
Next, position the box where you want it by moving the red builder brush (Usually a good place is below and away from the level, where it will never be seen). Click the subtract button (red circle in the image) to subtract this cube from your world. You should be left with the result shown.
|
Now it’s time to apply textures to our skybox. Click on each side of your cube once to highlight it, then select the relevant texture from the texture browser to apply it. You’ll notice the texture names of the skybox textures usually have a direction at the end, such as ‘east’ or ‘90′. This is the angle/side that the texture should be used for the skybox to fit, so apply them in the correct order, ‘north’ then ‘east’ etc.
Now you may be thinking “But I can’t see the textures, they are just all blue and stretched looking?!”, right? Well…
When using certain official skybox textures, they can appear stretched to the extent that they look striped. These behave a little odd because they have their Clamp Mode set to TC_clamp set in the texture properties. This can be an issue when converting UT2K3 maps into UT2K4. There is a number of work-arounds to this, but you want to learn how to do it properly, right?
Not all skyboxes will do this. If your skybox aligned perfectly then you can skip over the next short section.
Select all the wall surfaces, right-click, and select ‘align > face’ from the menu (The textures will still show up striped). Now with all four walls selected, right-click and go to the ’surface properties’. Next click the Pan/Rot/Scale tab. You’ll have a box that looks like this:
|
This is the tool we are going to use to get everything aligned properly. The Pan option moves the texture up or across by however many units you press. e.g. pressing U: 4 will move the texture by 4 units. It’s basically a more accurate version of the texture moving tool. The rotation tool, yep, you guessed it, rotates the texture.
Pan one unit in the U and V, and the textures will start to look clearer, though still not aligned. Next Pan the U by 64 four times, and the walls should look aligned. The floor and ceiling are a different matter however and require a bit more work. It’s literally a case of getting the rotation correct and panning in both directions until they are perfect.
Using TC_Clamp is far superior to any other method for creating skyboxes. It just takes a bit of patience to familiarize yourself with the quirks of its behavior, but worth it in the long run.
Skybox Losing Alignment After Rebuilds..
As mentioned above, this is also an issue with TC_Clamp. When you first put in a skybox it may be perfect, then you notice several rebuilds later it has become streaky. Align the textures to face once again, then pan one UU horizontal and vertical. Now Highlight the skybox subtract, and then the rest of your actors inside the skybox Move the skybox to where the yellow subtract lines match where the streaks start. Rebuild level If streaks appear again readjust. It takes a couple tries sometimes. For some reason BSP cuts in your game level affect TC_Clamp.
(Many thanks to King Mango of Unreal Playground for the TC_Clamp info!)
Now that we have our skybox, it’s time to make it work. Important: Select all the textures within your cube, right-click, and select properties. Click on the ‘Flags’ tab. Select the ‘Unlit’ checkbox. Next, exit the properties and open the actor browser. In he actor browser, expand ‘Info’ by clicking the plus (+) beside it, expand ‘ZoneInfo’, and click once on ‘SkyZoneInfo’ to highlight it.
|
Back in your 3D view, right-click your skybox base and click ‘Add SkyZoneInfo’ from the menu that appears. Use your top and side 2-D view panels to move the skyzone in to the center of your skybox. So, by now you should have something which looks like this:
|
Hit F8 and rebuild your level. You may also want to save. There is just one more step left to do! Next we need to define where the sky will be visible in our level. in your 3D view, go to the area where you want your sky. Right-click the texture (e.g. the ceiling), go into the properties, and select the ‘Fake Backdrop’ flag. Note that this must be BSP. The area you selected should now vanish and your sky should be visible! Now not only do you have the satisfaction of having created a skybox, you also did it the professional way using the TC_Clamp clamping mode.
As you may realize, this is a very simple skybox, especially compared to some maps, but this should give you an understanding of how they work. You should have realized that whatever surrounds the SkyInfo actor is what your sky will look like. You can use your imagination to create something beyond a basic cube, using meshes, emitters, brushes, and even terrain. Refer to the ‘Advanced Skyboxes’ section for some examples. It’s also worth noting that simple custom skyboxes can sometimes be very effective!
Editor Tip:
You can create your own beautiful skyboxes easily using TerraGen and the skybox kit. See our useful editing tools page for for information! Skyboxes can also be downloaded from the internet.
Custom skyboxes can be created in the same way as above. However, some skybox images (such as those generated by TerraGen) can look imperfect. If you create a small skybox, the edges of the skybox (the corners) can show a fine line in-game. This can be fixed by using a larger skybox (you would have to scale up the textures appropriately) or in some cases editing the skybox in your favorite image editing program.
Fog rings can enable you to remove pop-up on large maps. They are basically ring-shaped static meshes that you place inside your skybox. They start with a solid color at the bottom, and fade out into transparency at the top. They can be used to add depth, or just for decoration, but their main use is to hide pop-up in large maps. It basically fakes fog in the skybox.
When creating a large map, such as an Onslaught map, the editor will only render a certain distance before chopping off the distance. This draw-distance is a limitation of the editor and cannot be changed. This can be hidden however, by using fog throughout the level the same color as the fog ring. The architecture/terrain will fade to the fog color at a distance, and once faded, won’t be visible in front of the fog ring. So when it does become chopped off in-game, it will not be visible to the player.
The minor draw-back is that no detail can be placed in the bottom half of the skybox, so if a player flies high, or is in a location where a lot of the vertical skybox should be seen, the bottom half of the skybox is a dull, solid, color. The height of the fog-ring will depend on how high you build your level. Generally the higher your architecture, the higher your fog-ring must be in order to hide the pop up.
Finding and Using a Fog Ring…
First of all build you skybox using the textures you want to use. Do not add too much detail in the lower area of your skybox as of yet, as you may find your fog ring will hide much of this detail.
Next, we need to find a fog ring to match your skybox. Fog-rings are quite scarce for UT2K4, here are a few examples of static mesh packages that I’ve found them in, along with their relevant colors…
BarrenHardware-epic, under Decos > egypt (Sand/Peach)
CP_Nightmare_1-epic, under Arches (Red)
A quick and easy way to find a fog ring is to paste one from another official map. This practice isn’t encouraged, but if you have to, here is some fog rings…
ONS-Dawn (Grey)
ONS-FrostBite (Plum)
ONS-Torlan (Light Orange)
ONS-Dria (Dark Blue)
ONS-Tricky (Brown)
ONS-RedPlanet (Red)
ONS-Surripere (Blue)
The next step is to place your fog ring into your skybox, resizing it as necessary If you copied one, paste it in. If you found one, select the fog ring inside the static mesh window by clicking it once, then right-click the ground anywhere in your level and click “Add static mesh…”. Your fog ring should appear before your very eyes. If you don’t see it, try to locate it using your 2D views.
Next, using your 2D views, move the fog ring into your skybox. It should be vertically centered, at roughly the same level as your skybox info actor. It may help to adjust it whilst viewing the sky from within your level. You may need to resize it to fit – use the boxes at the bottom of the editor to change the values to change the size of your skybox as you see fit, as shown in the image below.
|
For the vertical size, the fog ring should be high enough so that it hides all pop up in your level, and low enough so that the player cannot see beneath it. The width of the ring isn’t too important, so long as it is centered. You should end up with a result similar to the image above. If you can’t get the lower half covered, you can duplicate the fogring, turn it upside-down, and join them. A quick was to do this is to put a minus value into your DrawScale3D.
Fog Rings can be darkened/brightened by changing their Unlit value to false, and altering the AmbientGlow value (Both can be found in: Properties > Display). If you can’t find a fog-ring to suit your map, you can always create your own custom shader to apply to the mesh, by importing your texture and changing the fog ring’s skin (Also located in Properties > Display).
Adding Fog:
Next, in your 3D view, locate your Zone Info actor for your outdoor areas. If you don’t have any ZoneInfo actors in your map yet, now is the time to add them. If you do, skip the next step.
ZoneInfo actors set individual properties, such as fog color and density, for designated areas, or ‘zones’. If you don’t split your level into zones, your entire level will be one ‘zone’, and you will only need one ZoneInfo actor. This tutorial won’t go into zones, and what they are used for. You do not need to know about zones to complete this tutorial, however you may wish to look this up yourself.
Adding a ZoneInfo Actor:
Open your actor browser (Chess piece button) and expand Info, and click ZoneInfo once to highlight it. In your 3D view, right-click the ground anywhere and click “Add ZoneInfo”. An icon similar to the skybox info should appear. You do not need to reposition this, although you may wish to reposition this in a visible place so you can find it should you want to get back to it.
|
Next, double-click your ZoneInfo actor to open it’s properties.
It’s worth rebuilding all at this point, so that you will be able to see the changes in the fog you apply in the next step (Shortcut: F8).
Change fog color and distances inside the properties using the options shown in the image below. The fog color should be exactly the same as the color of the fog ring. The DistanceFogStart and DistanceFogEnd should be self explanatory; the end value is the distance where the architecture is invisible.
|
You should now see no or very little pop-up in your map. All that is left for you to do is tweak the fogging and your skybox to your liking.
Jun 08
Leave a Reply