Here's the Trick
We've all seen stuff like this:
Doesn't exactly work does it?
This is caused by the fog not matching the skybox. We
could make the horizon of the sky material a faded colour, but it isn't that customizable and you could only a single colour. Alternatively, you could make the sky a single solid colour, but that's tacky; we do like clouds after all. In past games on various platforms, geometry would slowly fade-in to remedy this problem, but again it is rather tacky.
So how do we fix this?
The geniuses at Valve came up with a great method, used to great extent in Left 4 Dead. The resources required for this is a skybox and two custom textures. This neat trick will work on any Source game or mod, so feel free to experiment.
Make the following materials:
Solid Black
Gradient Black
This is all you need. If you're mapping for Left 4 Dead, materials like these are already in the game.
Next, create your skybox as usual. Create a tube in it and texture it appropriately with your black fade texture on the inside. Use
nodraw for the rest. Place a
sky_camera in the bottom of it as well.
yup
Colour the bottom of the skybox black. You can adjust the height of the fade as needed. This is based on the height of your map and its features. Experiment and find a setting that fits your map.
meow
So next we need to spiffy up the
sky_camera entity to work for us properly. Make sure the
Fog Enabled property is enabled and that the tube of black fade is just beyond the fog so it becomes a solid colour.
Sky Camera
The above settings are extreme. If you want skybox elements like buildings and such, just add it in as usual.
The end result looks smooth and well blended:
Snazzy
Ideal for those zombie apocalypses or Combine overrun cities.
This is nice and simple! Awesome Tut!
Head explodes