Worldspawn
This is the properties of the world. For this we will look at Geoplanetary Station from the Quake3_Quake1 single player demo.
The world properties look as such:
Fields we want to look at:
- "message" is the map title.
- "_ambient" is the map compile additive light to all of the map. (0 to 255, 3 is very little)
- "_minlight" is the minimum lightmap intensity (0 to 255, 24 is about 10%)
- "worldhints" are Quake3_Quake1 directives like [noweapons] mean remove weapons on spawn.
- "worldtype" is the appearance of items like keys and health boxes. 10 specifies a sci-fi look to the keys and some ammo boxes instead of the traditional Quake appearance of keys.
"_ambient" should be used in moderation and"_minlight" is preferred. "_ambient" adds to all light everywhere and tends make lighting look bland if not used sparingly.
worldhints
The 2 notable directives here.
- [noweapons] - Player spawns with no weapons or ammo. Player always has axe / shotgun.
- [nometalsteps] - Do not play metal footsteps sounds on surfaces marked metal.
The reasoning for [nometalsteps] is some texture sets have too many surfaces marked metal and instead of adding to the immersion it does the opposite for this map.
[noweapons]
One of the problems in Quake 1 is the accumulation of high powered weapons and ammo. Adding this [noweapons] to worldhints provides the option for a map to remove the player or players (coop) of all ammo and weapons on entering the map.
Sky (Skybox)
So here we have the sky in Geoplanetary Station.
As the map editor shows, the texture is "skies/polluted_earth".
Light From Sky (Skybox)
Examining the shader ...
skies/polluted_earth
{
qer_editorimage textures/zz_skies/polluted_earth/polluted_earth_sky_lf.tga
surfaceparm sky
surfaceparm noimpact
surfaceparm nolightmap
surfaceparm nomarks
q3map_globaltexture
surfaceparm sky
nopicmip
nomipmaps
q3map_sunExt 1 0.9 0.9 250 320 30 //rgb intensity degrees elevation deviance samples
q3map_skylight 100 4 // [brightness] [iterations]
skyparms textures/zz_skies/polluted_earth/polluted_earth_sky - -
}
Sky shaders generally look the same except for the:
- texture
- lighting
One of the supplied skies with the default lighting often works for a map, but the above information is provided to see how the sky functions.
The actual textures that compose the sky for the above shader are "textures/zz_skies/polluted_earth/polluted_earth_sky_lf", "textures/zz_skies/polluted_earth/polluted_earth_sky_rt", etc. There is a texture for all 6 sides.
Notes
- The texture image file extension is ignored in all shader files. It may say ".tga" but both the map compiler and the engine will load a .tga or .png or .jpg totally ignoring the file extension. The "standard" is just to use ".tga" everywhere.
- The "zz_skies" folder is to somewhat hide the raw skybox sides from a map editor or at least cause them to be alphabetically listed last if the map editor finds them.
Fog
Fog is also a worldspawn key. Fog can specified for the whole map with "fog" "0.8 0.25 0.25 0.2 1.0" and would appear as above. The form is [density] [red %] [green %] [blue %] [alpha %] where 1.0 means sky obscuring like above but 0.5 would only 50% cover the sky.