env_projector
A dynamic projectional light source with flexible settings and support for video texture projection.
Spawnflags
SF_PROJECTOR_START_ON |
1 (initially turned on) |
SF_PROJECTOR_NO_ATTEN |
2 (turns off the falloff texture; the light is distributed without attenuation as far as you can see) |
SF_PROJECTOR_ASPECT4X3 |
4 (use a rectangular rather than a square beam) |
SF_PROJECTOR_ASPECT3X4 |
8 (use an “upright” rectangular rather than a square beam) |
SF_PROJECTOR_NOWORLDLIGHT |
32 (ignore world polygons and shine only on brush and studio model) |
SF_PROJECTOR_NOSHADOWS |
64 (disable shadows for this light source) |
SF_PROJECTOR_FLIPTEXTURE |
128 (flip the projected texture horizontally; this can provide some interesting effects) |
Options
fov |
The beam's “field of view”, the cone angle. |
radius |
Radius within which the light intensity falls off to zero. |
texture |
Name of the texture: a TGA file, a texture from a WAD file (with the .mip extension), an AVI file or a sprite. |
falloff |
Light falloff pattern within the radius:
- 0—automatic, based on the radius
- 1—fast (abrupt)
- 2—regular
- 3—slow (gradual)
|
lightstyle |
Applies a standard light style effect (1–12) to the dynamic light. |
framerate |
Only for sprites: determines the framerate. |
Usage Details
- Playback of animated textures and AVI files is looped. The entity has no options to control this. When the object is turned off and on again, playback resumes from the frame where it stopped, for both sprites and AVI files.
- This parameter is written to savegames.
- You can specify the path to a TGA or .mip texture that is not a single image but a cubemap. For that, omit the view direction suffixes but include the file extension. Although the resulting file name does not exist, it will be treated correctly by the engine as long as the textures that it stands for really exist. Note however that specifying a cubemap will make the light source omnidirectional, and the fov option will become meaningless.
- The light source can be attached using the parent system both on the server side and on the client side.
- You can set the light colour using rendercolor.
Limitations
- The number of lights in a map is not explicitly limited. However, the player's PVS can contain no more than 64 light sources at a time.
- The current implementation being relatively simple, it may shite through walls. However, this problem is also found in the original Half-Life, where light sources are non-projective.