Light Editor

Quake2xp contains built-in light editor. To get started, you need to assign keys to editor  control.

My basic key binding, add in to xpconfig.cfg:

bind INS “spawnLight”
bind HOME “spawnLightToCamera”
bind END “saveLights”
bind DEL “removeLight”
bind LEFTARROW “moveLight_right -1″
bind RIGHTARROW “moveLight_right 1″
bind UPARROW “moveLight_forward 1″
bind DOWNARROW “moveLight_forward -1″
bind PGUP “moveLight_z 1″
bind PGDN “moveLight_z -1″
bind KP_MINUS “changeLightRadius -5″
bind KP_PLUS “changeLightRadius 5″
bind KP_INS “copyLight”
bind KP_DEL “unselectLight”

Description

r_lightEditor <0-1> – enable-disable light editor

relightmap <bsp name> – load map and calculate lights from light surfaces (first run)

editFlare <0-1> – toggle flare editing mode

  • spawnLight – Spawn light in aiming point
  • spawnLightToCamera – Spawn light in camera position
  • saveLights – Save all level lights
  • removeLight – Remove selected light
  • moveLight_right – Move light or corona by <X>
  • moveLight_forward – Move light or corona by <Y>
  • moveLight_z  - Move light or corona by <Z>
  • changeLightRadius – Scale light radius or corona size by <X Y Z>
  • copyLight – Spawn copy of selected light
  • unselectLight – Unselect selected light
  • clearWorldLights – Remove all level lights

Detailed light setting

editLight <parameter> <values>

Parameters:

  • origin – light position <X Y Z>
  • color – light color <R G B>
  • speed – rotate speed (cube maps and direction)<X Y Z>
  • radius – light radius <X Y Z>
  • cone – light cone size for projectors <X>
  • style – light style <X> 0 – disable light style
  • filter – cube map light filter <1-36> 0 – disable filter
  • angles – light direction for projection lights <X Y Z>
  • shadow – light can cast shadow <0-1>
  • ambient – ambient lighting mode <0-1>
  • flare – draw light corona <0-1>
  • flareSize – size of corona <X>
  • flareOrigin – corona origin <X Y Z>
  • target – target name <t***>
  • start_off – spawn inactive light <0-1>