light_spot

From Sven Co-op
Jump to navigation Jump to search
light_spot
Type

point

Status

supported

 


This works as light does, except that the emitted light will be limited to a cone. You can customize cone size and brightness. Perfect for searchlight, car lights, streetlights etc. It's more atmospheric than point light, however areas inside of the cone won't be illuminated enought (higher '-bounce' hlrad compile parameter values may increase brightness outside the light_spot a bit).

1 Keyvalues

Inner (bright) angle : _cone

The angle, in inches, in which cone is full-lit. It works separately from outer angle, so you can use either both or one of those keyvalues.

Outer (fading) angle : _cone2

The angle, in inches, in which cone is fading out (outside of inner angle). It works separately from inner angle, so you canuse either both or one of those keyvalues.

Pitch : pitch

Pitch determines direction of the light, '0' is horizontal, '90' is vertical from top, '-90' is vertical from bottom.  You can use info_target as a light target instead.

Brightness : _light

Red, green and blue amounts of the light color, from 0 to 255, followed by the brightness, which can have pretty much any value greater than 0. It is not limited to 200 or 255 and can be a decimal, although that level of precision is rarely required.

Appearance : style

Allows you to select a light style. This will only work when a targetname is NOT set. Note that there can be at most 4 different light styles affecting a face in your map. Otherwise, light styles will be discarded from it, causing unrealistic lighting in extreme cases.

Is Sky : _sky

Makes light_spot simulates light_environment, it will emit light from all sky textures. It's useful for dark maps, models will be displayed correctly within light and light_spot entities, in normal light_environment all model lightning are generated from sky, and point/spot lights are ignored.

Custom Appearance : pattern

Allows you to set up a custom appearance of unnamed light. To do this, you will have to enter 1 to 64 chars from the alphabet ('a' to 'z'), whereas 'a' stands for being dark and 'z' for very bright. Normal lights' appearances uses 'm'. The program "Custom Lightstyle Generator" by Craig "CRAZG" McLaren might help you here. Whatever sequence you enter is stepped through at about 8 Hertz. This will only work when a targetname is NOT set and you manually delete the 'style'-keyvalue from your light under disabled 'Smart edit'-mode right before closing the 'Properties'-window. Note that there can be at most 4 different light styles affecting a face in your map. Otherwise, light styles will be discarded from it, causing unrealistic lighting in extreme cases.

ZHLT Fade : _fade

In the simplest words, it customizes light fading. '1.0' for normal fade, larger values for 'shorter' lights.

ZHLT Falloff : _falloff

Changed the way how the light is calculated in compile process. Default means 'Inverse square' (unless you changed default light spreading in compile commands). Linear option makes light spreading less, creating collimated light, just light movie projector, searchlights, flashlights e.t.c. Sometimes other light settings and light placement make this keyvalue nugatory.

2 Flags

1 : Initially dark

If set, the light will be turned off at map start. This will only work when a targetname is set. This counts as an additional lightstyle. If you have multiple lights by the same name, they will count as one additional lightstyle, even if some of the lights are initially dark while others are not. Note that there can be at most 4 different light styles affecting a face in your map. Otherwise, light styles will be discarded from it, causing unrealistic lighting in extreme cases.