light_surface

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

point

Status

supported

 


Allows you to create texture lights (textures that emits lights) in more advanced way than info_texlights does. All keyvalues set to default, change 'texture name' keyvalue and it will emit light of this texture color and power of 80. All other keyvalues and flag are optional.

1 Keyvalues

Texture name : _tex

Name of texture to emit light.

Filter max distance : _frange

Excludes faces whose centers are far from this light_surface.

Filter max dist to plane : _fdist

Same as above, but checking the distance to the whole texture plane (instead of face center).

Filter entity classname : _fclass

Same as "Class In Filter" with <unknown> filter type.

Filter entity name : _fname

Same as "Name In Filter" with <unknown> filter type.

Texture brightness : _light

The brightness of texture. Works the same way as in light and light_spot.

Color : _texcolor

Leave it empty, so color is auto-generated based on texture color.

Inner(bright) angle(default 90) : _cone

Like in light_spotlight, custom values used to simulate spotlight.

Outer(fading) angle(default 90) : _cone2

Like in light_spotlight, custom values used to simulate spotlight.

Adjust emit scale(1.0default) : _scale

When simulating light_spotlight, this is scale value for light emission.

Grid size of sampling : _chop

Grid size of sampling. However lightmap grid cannot be changed. This keyvalue functionality is very limited.

Dark gap in front of texlight : _texlightgap

Moves lights out of texture by few units (specified amount or chosen from pre-definied values). It's useful in situations where light leaking out of the brush in opposite direction of light. Example:

Fast : _fast

Determines usage of '-fast' compile parameter for light. Set it to 'Yes' if brightness is low and the face is large.

Classname in Game : convertto

Used by compilers. You don't need to set this. Lot's of self-explanatory keyvalues for appearance manipulation (like in light and light_spot entities). Setting name allows to toggle light produced by this light_surface.

2 Flags

1 : Initially dark

If set, the light will be turned off at map start. 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.

3 Notes

The brightness does not work in the same way as in the "info_texlight" (it does not scale with texture size) so you don't need to multiply 'Texture brightness' value to achieve sufficient brightness.When you want to set some of the values to '0', you'll need to set them to '0.0' instead. Editor ignores raw '0' value.