Attenuation

Light Attenuation
    _angfade, _angwait
    _bounce
    _cap
    _distance
    _fade, wait
    _falloff


Light Attenuation

A light's attenuation is its reduction in brightness based on various factors like distance falloff and the angle-of-incidence.

Qrad3 normally uses linear falloff for point light entities: lighting = brightness - distance. The light diminishes at a constant rate, for example: at 10 units away, the light is 10 units darker. For surfaces it uses inverse-square falloff: lighting = brightness / distance^2. This more physically-accurate model works so that at 2 units away the lighting is 1/4 as bright, at 3 units it's 1/9, etc. The initial drop in brightness is very rapid, but the dimmed light is sustained much further. The light's angle-of-incidence (angle it hits the surface) is also a major factor. Lighting is brightest when the surface is perpendicular to the light, and grows darker as the angle decreases.

ArghRad adds a number of options to modify this default attenuation behavior:


 
 
_angfade  scale
_angwait  scale

location: light entity    version: 1.00  
scale: 0-1 (fade slower),  > 1 (fade faster) default: 1

Scales how quickly the light fades as the angle-of-incidence decreases (from perpendicular to parallel). Values less than 1 fade slower, so the angle has less affect. Values greater than 1 fade faster, so the angle has more pronounced affect.

no example image example map
 

 
 
_bounce  value

location: light entity    version: 3.00  
value: 0 (no bounce),  1 (bounce) default: 1

A value of 0 allows this light entity to be completely excluded from the bounced light calculations.

no example image example map
 

 
 
_cap  brightness

location: light entity    version: 3.00  
brightness: >= 1 default: none

Caps the lighting cast from this light to the specified brightness level. The lighting is calculated normally, then any brighter points are capped off.

no example image example map
 

 
 
_distance  units

location: light entity    version: 2.50  
units: >= 1 default: none

Sets the maximum distance that light shines from this entity. Behavior varies depending on the light's _falloff setting:

Linear falloff - Smoothly fades out from the light to the specified distance. This overrides the _fade setting.

Inverse & inverse-square falloff - Sets a cutoff distance where the light abruptly stops shining.

no example image example map
 

 
 
_fade  scale
wait  scale

location: light entity    version: 1.00  
scale: 0-1 (fade slower),  > 1 (fade faster) default: 1

Scales how quickly the light fades over distance. Values less than 1 fade slower, increasing the distance. Values greater than 1 fade faster, decreasing the distance. For example, a value of .5 fades half as fast, shining twice as far.

Note: This setting only works on lights with linear falloff.

no example image example map
 

 
 
_falloff  type

location: light entity    version: 1.00  
type: 0 (linear), 1 (inverse), 2 (inverse-square) default: 0

Sets the falloff formula for this light entity. A value of 0 sets linear falloff, the default. A value of 2 sets inverse-square falloff, like surface lights.

A value of 1 sets inverse falloff: lighting = brightness / distance. At 2 units away the light would be 1/2 as bright, at 3 units it's 1/3, etc. This can work very well for visible-sourced point-lights (mine-lights, torches, etc). It's more realistic than linear falloff, but not as "severe" as inverse-square.

Note: Inverse and inverse-square falloff require much higher brightness values than linear.

no example image example map