Darkplaces lighting/Light sources
(Created page with "{{navigation title|Special effects}} Engine supports two ways to get lights on the map. ==World lights== Worlds lights are loaded from external .rtlights file supplied with a...") |
Revision as of 00:06, 6 August 2012
Contents |
Engine supports two ways to get lights on the map.
World lights
Worlds lights are loaded from external .rtlights file supplied with a map (foo.bsp will try to load foo.rtlights). If there are not .rtlights file, engine tries to load lights from a map "light" entities, which often is grude and terrible slow (as "lights" are maked for map compiler LIGHT stage raytracer, not for reatime rendering). So producing a good .rtlights folr is very first step in a process of map creation.
World lights are static, meaning they canot be moved, rotated, altered during a game.
Each world light can have this parameters:
- origin : position
- angles : rotation
- color : RGB light color
- radius : radius of light in game units
- corona : corona intensity (0 to disable)
- coronasize : size of corona (this is multiplier to light radius)
- style : lights style number (see lightstyles above)
- shadows: whether to cast shadows from light
- cubemap : a path to cubemap filter texture
- ambient : ambient light intensity (ignores shading, makes lighting to be more 'flat')
- diffuse : shading light intensity (default is 1)
- specular : specular intensity (default is 1)
- normalmode : if this flag is set, light will be draws if cvar r_shadow_realtime_world is 0
- realtimemode : if this flag is set, light will be draws if cvar r_shadow_realtime_world is 1
Blood Omnicide tips:
Console variables:
Dynamic lights
Dynamic lights are cast from entities. This could be both server-side entities such as rockets or client-side entities such as explosions.
Next chapter: Tweaking
Back to index | Top of the page