Battery uses a worldspawn key called “_fog” pointing at a shader in the scripts directory as follows:
textures/skies/sd_batteryfog
{
qer_editorimage textures/sfx/fog_grey1.tga
surfaceparm nodraw
surfaceparm nonsolid
surfaceparm trans
surfaceparm fog
fogparms ( 0.4 0.4 0.4 ) 8192
}
The shader specifies at what distance the fog will become solid and triangle culling happens. If you load (devmap) the map Battery, turn on r_showtris and look out to sea you will see that the map is so big that you cannot see the edge of the map. The sea extends 8192 map units before the skybox brush starts. This is so the fog can become solid gradually and not be interrupted by the skybox.
The map Railgun uses a slightly different approach to Battery but essentially does the same thing. There is no skybox brushes in the map just a very dense fog which becomes solid before you see the skybox. The map still uses a worldspawn key of “_fog” as follows:
textures/mp_railgun/fog
{
qer_editorimage textures/sfx/fog_grey1.tga
fogparms ( 0.6 0.6 0.6 ) 2560
surfaceparm fog
surfaceparm nodraw
surfaceparm nonsolid
surfaceparm trans
}
The fog is much thicker and reaches a solid state in less map units. So the edges of the map don’t need to extend so far away from the playing areas.
Sock
:moo: +grass