]> git.xonotic.org Git - xonotic/xonotic.wiki.git/blob - Lighting.textile
Created page
[xonotic/xonotic.wiki.git] / Lighting.textile
1 h1. Lighting
2
3 In netradiant, there are two kinds of lights, real time lights (which must be added in-game) and radiosity-based lights (which are added in radiant). This article will deal with both.
4
5 h2. Real time lights (rtlights)
6
7 Real time lights are added and modified using the following console commands, accessible in-game using r_editlights_help.
8
9 |_.Command|_.Function|
10 |\2=.Settings|
11 |r_editlights|enable/disable editing mode|
12 |r_editlights_cursordistance|maximum distance of cursor from eye|
13 |r_editlights_cursorpushback|push back cursor this far from surface|
14 |r_editlights_cursorpushoff|push cursor off surface this far|
15 |r_editlights_cursorgrid |snap cursor to grid of this size
16 |r_editlights_quakelightsizescale |imported quake light entity size scaling 
17 |\2=.Commands|
18 |r_editlights_help |this help|
19 |r_editlights_clear |remove all lights|
20 |r_editlights_reload |reload .rtlights, .lights file, or entities|
21 |r_editlights_save |save to .rtlights file|
22 |r_editlights_spawn |create a light with default settings|
23 |r_editlights_edit command |edit selected light - more documentation below|
24 |r_editlights_remove |remove selected light|
25 |r_editlights_toggleshadow |toggles on/off selected light’s shadow property|
26 |r_editlights_importlightentitiesfrommap |reload light entities|
27 |r_editlights_importlightsfile |reload .light file (produced by hlight)|
28 |\2.=Edit commands (given as arguments to r_editlights_edit|
29 |origin x y z |set light location|
30 |originx x|set x component of light location|
31 |originy y|set y component of light location|
32 |originz z|set z component of light location|
33 |move x y z |adjust light location|
34 |movex x|adjust x component of light location|
35 |movey y|adjust y component of light location|
36 |movez z|adjust z component of light location|
37 |angles x y z|set light angles|
38 |anglesx x|set x component of light angles|
39 |anglesy y|set y component of light angles|
40 |anglesz z|set z component of light angles|
41 |color r g b |set color of light (can be brighter than 1 1 1)|
42 |radius radius |set radius (size) of light|
43 |colorscale grey |multiply color of light (1 does nothing)|
44 |colorscale r g b |multiply color of light (1 1 1 does nothing)|
45 |radiusscale scale |multiply radius (size) of light (1 does nothing)|
46 |sizescale scale |multiply radius (size) of light (1 does nothing)|
47 |style style |set lightstyle of light (flickering patterns, switches, etc)|
48 |cubemap basename |set filter cubemap of light (not yet supported)|
49 |shadows 1/0 |turn on/off shadows|
50 |corona n |set corona intensity|
51 |coronasize n |set corona size (0-1)|
52 |ambient n |set ambient intensity (0-1)|
53 |diffuse n |set diffuse intensity (0-1)|
54 |specular n |set specular intensity (0-1)|
55 |normalmode 1/0 |turn on/off rendering of this light in rtworld 0 mode|
56 |realtimemode 1/0 |turn on/off rendering of this light in rtworld 1 mode|
57 |<nothing> |print light properties to console|
58
59 The most important commands to remember are r_editlights, r_editlights_edit (color, realtimemode and radius arguments), and of course, r_editlights_save. You will not see your light and its effects in real time if you do not execute r_editlights_realtimemode 1 while having selected the light.
60
61 h2. Radiosity lights