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...") |
m (→World lights) |
||
(2 intermediate revisions by one user not shown) | |||
Line 1: | Line 1: | ||
{{navigation title|Special effects}} | {{navigation title|Special effects}} | ||
− | + | {{unfinished}} | |
+ | ==Static lightsources== | ||
+ | |||
+ | ==Dynamic lightsources== | ||
==World lights== | ==World lights== | ||
Line 25: | Line 28: | ||
* realtimemode : if this flag is set, light will be draws if cvar r_shadow_realtime_world is 1 | * realtimemode : if this flag is set, light will be draws if cvar r_shadow_realtime_world is 1 | ||
− | |||
{{tip|A combination of <nowiki>normalmode = 0, realtimemode = 0</nowiki> to mark lights which are only appear on lightmap}} | {{tip|A combination of <nowiki>normalmode = 0, realtimemode = 0</nowiki> to mark lights which are only appear on lightmap}} | ||
{{tip|Light style 1 will make a dynamic lights that will not appear on lightmap}} | {{tip|Light style 1 will make a dynamic lights that will not appear on lightmap}} |
Latest revision as of 14:15, 7 October 2012
[edit] Static lightsources
[edit] Dynamic lightsources
[edit] 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
Console variables:
[edit] 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