Worst-case scenario: the UEd Goblin wipes the map and burns down your house.
Tarquin: okay, editorial decision is needed here, so I've taken it :) This page is henceforth to be:
- a definition of the term "skybox"
- technical stuff about skyboxes
- list of cool things to do with a skybox.
Building a SkyBox is now the tutorial page.
- 1 What is a Skybox?
- 2 How does it work?
- 3 Tips and Tricks for Skyboxes
- 4 SkyBox problems
- 5 External Links
- 6 Related Topics
- 7 Discussion
What is a Skybox?
A skybox is a method of making a very nice looking sky using the Unreal Engine. It is far superior to simply plastering sky textures to the ceiling of the world. A skybox creates an illusion of great distance because your movement in the level does not result in any movement of the skybox. This is only reasonable as moving from one end of a building to the other does not place you any appreciable distance closer to the sun and the clouds.
How does it work?
The workings of a skybox are actually quite simple internally. If any portion of a surface with Fake Backdrop set is visible, the skybox is drawn before any other drawing takes place. In other words, the skybox is drawn, then the rest of the world is drawn overtop of it. Surfaces with Fake Backdrop are not drawn at all, thus allowing the skybox to be "seen" "through" them. This is similar to looking through a fence - if you imagine the yard beyond drawn first and then the fence drawn overtop of it, you can still see the yard beyond through the openings and cracks in the fence. Likewise you can see the skybox "through" the faked backdrops in your level.
Tips and Tricks for Skyboxes
By default it is possible to have more than one SkyZone on a level. One of the SkyZoneInfo actors should have Advanced -> bHighDetail = false, and the other set to True.
This allows level designers to build complex SkyZones for systems running in a high detail mode without inflicting the additional penalty of a complex Sky Zone on the machine running in low detail. CTF-Face uses both high and low detail Sky Zones.
A typical skybox has two sheets of clouds, both translucent. The sheets are in the top of the skybox, spaced 16 units. Both sheets have either V-Pan or U-Pan turned on in their properties. The lower sheet should have a higher texture scale than the upper sheet. This makes the "lower hanging clouds" move faster than the "background clouds".
The V-Pan or U-Pan is generally too fast to be realistic. Set the V-Pan and U-Pan values to about 0.3. You can find this in the SkyZoneInfo actor's properties, under ZoneLighting.
Moons & Suns
If you add a moon or a sun, don't forget to place it higher than the clouds and scale them down, for a distance effect. Generally placing a sun or moon texture on a sheet and having it face the skybox creates a much better looking effect than using an actual spherical mesh in the skybox, and it also generates less of a performance hit.
Coronas will not be drawn natively in a skybox. If you want one to be displayed, you will have to manually add a sheet or an actor and set a corona texture to it. You can set the corona texture directly to the light if you set it's bHidden property to false.
- Add some lights with small radii: about 12 or 16 is good. You can vary the hue of these lights to get a nice gradient along the sky. If the skybox is underlit, then add extra lights, don't increase the radius of the existing lights too much. It usually doesn't look too good.
- Set the saturation to a very low level if you want to override e.g. the blue sky texture. You can also create your own texture with another background color and add it to your MyLevel package.
- Special Lit can also be used to good effect in a Skybox, to get a more varied mix of Colors with less light actors.
Add the SkyZoneInfo in the middle of the skybox, near the floor. Create four sheets (64*128) with masked textures of mountains or city skylines around the Info (or make just one brush with the Panorama builder!). These sheets need to prevent the player from seeing the place where your cloud sheets touch the end of the skybox. You can check this by moving your camera on the place of the ZoneInfo and look around. If you can still see those edges, you can either move the SkyZoneInfo closer to the floor, move the skyline sheets closer to the Info, or make the skybox bigger.
- suggestions for textures
UT 2003 and XIII Skybox Terrain
Terrain was a pain in the past and only attempted in the skybox by a few adventurous mappers, but with the new editor(s) it's a snap. Make a skybox a little larger than standard and scale a terrain info to fit. Place the SkyZoneInfo in a 'valley' and add a Sunlight actor with the same direction as the map's sunlight actor(s). Set the appropriate surfaces as fake backdrop, rebuild and select the SkyZoneInfo again. With the camera somewhere inside your map and not in the skybox, position your SkyZoneInfo low enough in a 'valley' that the horizon is completely skybox terrain and skybox 'ceiling'. None or very little of the skybox walls should show if this is done correctly. Doing this and scaling the terrain can be tricky and frustrating, but also has the potential to produce some seriously nice looking scenery when combined with other techniques. Framerates may vary.
You can also try to incorperate movers into your skybox as maybe lightning or something, try experimenting with loop movers to create some realistic lighting by setting it to come in and out of the skybox and with a thunder sound to it. See Lightning Storm.
Your skyzone can use fog like any other zone. Note, however, that because the skyzone is generally much smaller than it looks, the fog will have to be set relatively dense to be noticeable. Note that because the skybox will be drawn on top of whatever else is visible, it can impact the performance of your level, though due to the small size of the skybox it is often not a big issue. See the Fog page for information on how to add fog to a skybox.
It's been noted that warp zones cause problems with the skybox. (I've seen this but not tried to reproduce the symptoms experimentally :) – Tarquin).
If both a warp portal and the skybox are visible to the player, the polys seen through the warp zone are also drawn in the sky. It may be possible (though tricky) to ensure that the warp polys are small enough so they aren't drawn in the same part of the screen as the sky polys.
I have noticed that sometimes when your fiddling with your skybox it may turn into a bsp hole where you have checked the fake backdrop off. So if that happens select all skybox brushes -> order -> to last (you may have to do this for each brush in your skybox individually ) and that should fix your problems after a rebuild.
Tip to me from Bot_40
This is majorly annoying in UT2003 skyboxes but I have found a nice easy solution:
1. make a cube 510x510x510 & texture it with your sky package
2. make sure the faces are the right way round (they usually get flipped in the U plane on some or all faces)
3. you might have to scale U & V depending on what size textures you use. (For example, LavaSky has 512x256 walls so you should scale these U:1 & V:2) You will have to re-rotate your textures again in a minute but its useful to know at this stage that your surfaces are all flipped correctly and the correct textures are on the correct face to save time later on.
4. VERY IMPORTANT: select all faces & do a 'box alignment' (leave the U & V scaling @ default for this type of alignment -ie 1:1)
5. rescale (if needed) and then U & V pan the surfaces if needed (& rotate also if needed –you will most likely need to do this on the ceiling & floor after panning) -everything should pan nicely into position with increments of 64 or 16.
6. admire your lovely seam-free skybox :) -rors
Missing Skybox in Multiplayer
This issue can be fixed by simply adding a ZoneInfo actor within the zone/negative space. Be sure to rebuild your geometry after adding it.
- Skybox/FogRing Tutorial, hosted by outpt.co.uk
Dma: Can one skybox link to another skybox? (I know it is a strange question!)
Tarquin: you mean using the MultiSkybox actor? don't know. sounds interesting...
TaoPaiPai: It wouldn't be of too much interest unless the other skybox is animated from the first you wouldn't see the difference.
[Apoc]Famine: We had a bizarre problem with rendering skyboxes in network play. Maps and static meshes are installed on the server, and they are pushed to clients. The skyzone, level, and texture properties are the same as in working skybox levels, (antalus, etc) and they work fine in local play. However, once people connect via the server, the skybox fails to render.
This issue can be fixed by simply adding a ZoneInfo actor. Most mappers will use one as good building practice, but we've seen a few without. And, of course, to the mapper, all looks well if they don't test their map on a network.
A ZoneInfo actor must be placed in every zone you want to see your SkyBox in. (Yeah, I learned this the hard way.. ;)
DeepQantas: Ok, I have this little theory of mine, which might or might not work. Since it's basically all about Skybox, I though I'd throw it over here. So, suppose you're building a huge city map. For performance reasons, you start using fog to cut off anything beyond a short range. But then you think, wouldn't it still be cool to see those far away buildings. Well... Have a gander at LOD Cheat
ChosenReject: I am having a really hard time finding the answer to this problem i'm having with certain textures that would be used in a skybox (SkyRenders, AnubisSky, etc.). In UT2004's version of unrealed when i add those textures I get a garbled mess of a texture, that looks like all the colors were averaged and that average shows up. I don't get the problem in UT2003's unrealed, unreal II's unrealed or even with most textures. I also tried using unrealed from unreal II but using anubisSky from both the UT2003 textures and UT2004's textures but it worked fine so it must be just UT2004's unrealed. I have googled a lot and haven't found anyone with an answer. What gives? (I have an Intel p4 2.4 GHz, 1GB ram, and Nvidia GeForce FX 5900 with AA and AF set to application preferred if that helps).
FreshMeat: My big issue, when making a skybox, is that it's entirely obvious that it is, indeed, a box. I found some textures I really like, I've been applying them to the walls of the box, and it looks hideous. Obviously i'm missing something, probably something to do with a static mesh... can you retexture static meshes somehow?
SuperApe: To answer you question, yes. Just fill in Display -> Skins slots until you've found the slot you want to replace and replace it on your static mesh instance in the map. (not in the static mesh browser) But, it sounds more like you're having problems aligning textures in the skybox and getting the SkyZoneInfo in the right place. Tutorial external link added.