To create a sky in an Unreal level, you need two things.
- A big open space
- A big mesh that you can paint the sky on
The first one is easy, just make your map in Additive mode, and leave a couple walls and ceilings open.
The second one is easy too, assuming you want to use a default UT3 sky.† Epic uses dome-shaped meshes to create the effect of clouds, a sun, and blue sky poking through.† Itís also handy to place some mountains or a city outside the playable space Ė even if the player canít get to them, itís good to have something to break up the horizon.
In this tutorial, weíll look at how to place one of Epicís skydomes and get it set up right.† Weíll also look at how to detail out the non-playable space with static meshes.†
First, open up the map that you want to place a skydome in.† Then open up the Generic Browser.
Epic saved most of their skydomes in one package.† Go to File->Open (in the generic browser), and load
C:\Program Files\Unreal Tournament 3\UTGame\CookedPC\Environments\UN_Sky.upk
There are 12 static meshes, but 35 materials.† In UT3 maps, Epic reused the same basic meshes and applied different materials to them as needed.† (No need to duplicate geo unnecessarily.)† So letís do the same thing.†
Select S_UN_Sky_SM_Dome01 and place it in the scene.
You may notice that the dome is pretty small Ė it may not even fit over your level, and itís definitely obvious that itís just a dome as you move the camera around.† Select the mesh, and at the bottom of the editor window, change the DrawScale to 500.†
Much better, now it really feels like itís far away.† But letís assume you want to apply a different material to the mesh.† Go back to the generic browser, and hit the ďCube PrimitiveĒ button to get a better view of your materials.† Skydome materials look like the ones below.† The lower half of the sky material is what the sky will look like along the horizon, and the upper half is roughly the view when you look straight up.
Select a material that you like.† Note that some of the materials are meant for special objects, like planets or star rings, and they may not work.† Iím going to pick M_UN_Sky_SM_Torlan, since itís very obviously different from the default material on this mesh.
Now select the skydome mesh in the scene.† Right-click on it, select Materials->M_UN_Sky_SM_Invasion2->Assign From Generic Browser.†
The new material will be applied to the sky mesh.
Experiment with different materials and see if you can find one that fits the theme of your level.† After you apply your material, be sure to look straight up at the top of the skydome.† You may see an effect like this:
If thatís the case, try applying the material to a different skydome mesh.† The UV coordinates may be set up a different way for the material you picked, and the material may only work with a certain mesh.
There are a couple flags we need to check in order to get our skydome to work optimally.
Select the skydome mesh and bring up its properties (F4).
Open up the Collision category.† Change the CollisionType from Collide_BlockAll to Collide_NoCollision.
Now open up the StaticMeshActor category, then StaticMeshComponent.† Under the Lighting section uncheck bAcceptsLights and CastShadow.
Now your skydome is ready to go Ė you wonít receive any build errors, and itíll run at optimal performance.
Of course, the sky isnít the only thing youíll want outside of your playable space.† You may want a distant city, or rocky cliffs, or an oceanÖ or any combination of those.†
Any static mesh can be used in the background.† Itís nothing special, just a prop you canít get to.† If you look at any UT3 map, youíll notice a combination of techniques Ė rocky cliffs are often standard rock meshes, scaled up much larger than normal.† Buildings may be built with the same components of your playable space.† But there are also plenty of meshes designed specifically to be seen in the background.† For instance, these buildings look blurry up close, but theyíre fine farther away.
The best way to learn what makes a good background is to dissect Unreal maps, and figure out how the artists at Epic put them together.
But there are a couple general pointers you can follow.
- Try to hide the horizon.† If you have height fog in your map, that may help with this.† Otherwise, put some tall objects that block most of the playerís view just outside the playable space.
- You donít need to fill out the entire background space.† Only pay attention to what the player will see, or youíll be wasting memory and framerate.† (Donít build out the ground if the player can only see the rooftops.)
- Donít go overboard with the number of objects you place.† Too many objects or too many polygons will kill framerate.† (Stay in the range of 200-400 objects outside the playable space.)
- Optimize your background assets by turning off collision on them.† As we saw on the skydome mesh, set them to COLLIDE_NoCollision or if theyíre close enough to shoot at, choose COLLIDE_BlockWeapons.† If you have multiple objects selected, you can change properties on all of them at the same time.
A great way to start detailing out your background is to cheat Ė find an Unreal level that has a similar theme, select their background assets, and copy/paste them into your level.† You can then move the assets around as needed.
Some of the UT3 maps can be found in here:
C:\Program Files\Unreal Tournament 3\UTGame\CookedPC\Maps