Ambient light is light that has bounced off a surface. Dynamically-lit objects receive ambient lighting through a different path from direct lighting, while statically-lit objects bake both into their lightmap.
Only static lights, those compiled by VRAD, generate ambient lighting.
Ambient terms are stored in sample points spread throughout the world. These can be visualised by enabling
r_visambient. Dynamic lighting is a combination of the nearest "ambient cube" sample point and up to two direct lights.
Although their absolute number is adjusted, smaller visleaves will still have denser concentrations of sample points.
mat_leafvis 1; r_visambient 1
- These two commands together enable the display the ambient lighting sample points in the active leaf.
- To do
- Cheat. The number of random directions to fire rays when computing ambient lighting. Default 162. To do: What effect does this have after a map has been compiled?
- Cheat. Light models with only ambient lighting; requires map restart.
- Cheat. The manner in which radiosity is sampled. The console claims that there are four settings (0-3), each with different behaviours, but in practice the only two that seem to matter are 0 to disable and 4 to re-enable. This command is thus the opposite of
- Boosts ambient term if it is totally swamped by local lights.
- Threshold above which ambient cube will not boost (i.e. it's already sufficiently bright). Default 0.3. To do: What units?
- Cheat. Fraction of direct lighting that ambient cube must be below to trigger boosting. Default 0.1.
- Boost ambient cube by no more than this factor. Default 5.