Virtual Darkness
written by Fidcal
Note: The Location Settings article shows you an easy-to-use and general system to get different ambient light levels and colors for each location/zone the player is in. Since this system also covers different ambient sounds and script calls at zone boundaries, you should really use it.
This article here is just a general introduction into "ambient light settings".
Introduction
Being a stealth game system and as its name implies, most Dark Mod missions will take place at night and require darkness as cover. Generally, absolute blackness is unpopular in this type of game and is not recommended. It can make navigation difficult, uncomfortable, and gives an impoverished visual display. Instead, very low ambient light is used to represent blackness. We call this virtual darkness. This main ambient light should not be so dark that the player cannot make out some detail of nearby surfaces textures. Yet because it represents complete darkness it should not be so light that it seems strange that in-game characters cannot see you (see later.)
Ambient light can be coloured to provide atmosphere and realism depending on the environment.
Brightness Standard
From Release 1, The Dark Mod includes a test map (may be included in a trainer mission.) for both players and mappers to standardise their gamma and brightness settings. I emphasise that this does not force all missions to be the exact same brightness. What it does is provide a standard setting so everyone can know what a particular mission is intended to look like. If a player then prefers to generally have their settings darker or brighter then at least they know. Likewise, if a mapper wants to produce a darker or brighter mission then they are free to do so but at least they will not do it without knowing. The advantages of all this is that in most cases players will not have to keep fiddling with the brightness setting for every individual mission.
Ambient Light
The main ambient light does illuminate the player but if kept to the recommended low levels (6, 7, or 8) this is a negligible amount in which AI characters cannot see the player and thus represents complete darkness without blinding the player.
Unlike normal lights, ambient light does not by default fade to the edge of its radius but is the same constant brightness throughout. Rich variation of fading or patterning can be introduced with a light texture. For general use, ambientLightnfo is recommended as it has no patterning and so its brightness is consistent throughout its volume. Regard it as the one to use by default.
Other local ambient lights can be used to produce highlights, mood, or any purpose the mapper can imagine so can be any brightness.
Virtual Ambient Light
All lights in Dark Mod are dynamic, real-time, having the potential to vary in-game and cast shadows. Naturally this affects performance and having too many lights close together is likely to reduce frame rates so care must be taken. This applies to the main ambient light too which naturally covers all surfaces.
To improve performance on some low-end systems, Dark Mod textures can simulate the main ambient light. This feature pre-calculates how much textures should be illuminated once only instead of continuously during gameplay. Players can select either method so those with faster machines can use the true ambient light which gives better quality.
Enabling Virtual Ambient Light
All that mappers need to do to allow players to select virtual ambient light is to name their main ambient light "ambient_world". That's it. If the player selects this feature then Dark Mod takes the color/brightness values of that light and passes it to all the textures then switches off that ambient light. It is therefore important for mappers to do this to provide the best performance for players with slower machines.
Note: Some special materials have a background texture plus detail that is only visible with a real ambient light, for example, darkmod/stone/sculpted/corpse. The mapper can place normal lights or local ambient light for those surfaces where possible or leave them with their background texture.
See also
- The Location Settings article.