Constant-Linear-Quadratic Falloff: Difference between revisions

From Valve Developer Community
Jump to navigation Jump to search
(An easy-to-read tutorial for the QLC falloff system. Enjoy.)
 
m (Fixed spelling errors and categorized.)
Line 3: Line 3:
The Constant-Linear-Quadratic system is an old system for determining the dissipation (or "falloff") of light intensity from light sources. (It has since been superseded by the two "percent falloff distance" values, which are much easier to understand and handle.)
The Constant-Linear-Quadratic system is an old system for determining the dissipation (or "falloff") of light intensity from light sources. (It has since been superseded by the two "percent falloff distance" values, which are much easier to understand and handle.)


The ratio between the three keyvalues Constant (_constant_attn), Linear (_linear_attn) and Quadratic (_quadratic_attn) will determine the way in which light is deminished from a light source. (The three values has gotten their names from the mathematical function used to describe the decline of its intensity.)
The ratio between the three keyvalues Constant (_constant_attn), Linear (_linear_attn) and Quadratic (_quadratic_attn) will determine the way in which light is diminished from a lightsource. (The three values has gotten their names from the mathematical function used to describe the decline of its intensity.)




Line 22: Line 22:
[[Image:LinearLight.jpg|Linear fallout|200px|right]]
[[Image:LinearLight.jpg|Linear fallout|200px|right]]


This is the same light, but at a 0:1:0 ratio, making its lighting 100% linear. This is a believable lightsource for most environments: The light doesn't dissipate as if it is being refracted off heavy air humidity, but still dissipates at half that pace as it spreads out from its source, just like all lighting from lightsources do.
This is the same light, but at a 0:1:0 ratio, making its lighting 100% linear. This is a believable lightsource for most environments: The light doesn't dissipate as if it is being refracted off heavy air humidity, but still dissipates at half that pace as it spreads out from its source, just like all lighting emanating from lightsources does.
{{clr}}
{{clr}}


Line 30: Line 30:
[[Image:ConstantLight.jpg|Constant falloff|200px|right]]
[[Image:ConstantLight.jpg|Constant falloff|200px|right]]


Constant falloff (1:0:0) is really the absence of falloff. The intensity of 100% constant lighting is permanent until it hits a surface. The only light which doesn't dissipate as it travels, are laser beams or, more commonly, lighting from very far away (such as sun-, moon- or star-light).
Constant falloff (1:0:0) is really the absence of falloff. The intensity of 100% constant lighting is permanent until it hits a surface. The only light which doesn't dissipate as it travels, are laser beams or (more commonly) lighting from very far away (such as sun-, moon- or star-light).
{{clr}}
{{clr}}


Line 49: Line 49:


*[http://www.editlife.net/tutorials.php?id=15 A more in-depth explanation of the system.]
*[http://www.editlife.net/tutorials.php?id=15 A more in-depth explanation of the system.]
[[Category:Level Design]]

Revision as of 15:12, 14 August 2007

Introduction

The Constant-Linear-Quadratic system is an old system for determining the dissipation (or "falloff") of light intensity from light sources. (It has since been superseded by the two "percent falloff distance" values, which are much easier to understand and handle.)

The ratio between the three keyvalues Constant (_constant_attn), Linear (_linear_attn) and Quadratic (_quadratic_attn) will determine the way in which light is diminished from a lightsource. (The three values has gotten their names from the mathematical function used to describe the decline of its intensity.)


Quadratic Falloff

Quadratic falloff

This is a normal, unmodified light source. The ratio between Constant, Linear and Quadratic are preset to "0", "0" and "1" respectively, or 0:0:1 for short, making the light 0% Constant, 0% Linear, and 100% Quadratic.

You may quickly notice that an unmodified lightsource doesn't really light up its surroundings like any real world lightsource. It seems to dissipate about twice as fast, which is the equivallent of a real lightsource shining through murky water.

Typically this falloff type could be used in moderation to reflect air humidity, when the surrounding dissipates light more than usual.


Linear Falloff

Linear fallout

This is the same light, but at a 0:1:0 ratio, making its lighting 100% linear. This is a believable lightsource for most environments: The light doesn't dissipate as if it is being refracted off heavy air humidity, but still dissipates at half that pace as it spreads out from its source, just like all lighting emanating from lightsources does.


Constant Falloff

Constant falloff

Constant falloff (1:0:0) is really the absence of falloff. The intensity of 100% constant lighting is permanent until it hits a surface. The only light which doesn't dissipate as it travels, are laser beams or (more commonly) lighting from very far away (such as sun-, moon- or star-light).


Mixed Falloff

When blending between these three types of falloff, you set the proportions of each falloff type against the other two types. To avoid confusion, keep in mind that you can set the scale of these proportions as you wish: A proportion of 3:6:1 gives the exact same result as 6:12:2, or 30:60:10, which can easily be translated to 30%, 60% and 10%.


Foot-note - The Valve Formula

Apparently Valve is using a different formula than most lighting programs, making the light reach its true intensity after 100 units from the source instead of at the source itself. Having grown accustomed to quadratic intensity, users should not be able to note any difference.


External link