From BlenderWiki
If you want to document Blender 2.5 features please edit pages under Doc:2.5/Manual.
If a "2.5" page doesn't exist please copy the text from 2.4x Manual and edit the new page (i.e. you should paste the wikitext from this 2.4x page to this new 2.5x page and then update the latter with 2.5 features)[edit] Light Attenuation
Mode: All Modes
Panel: Shading context → Lamp sub-context
Hotkey: F5
[edit] Description
The Light falloff possibilities has been improved in Blender 2.46, at least for the Lamp and Spot lamps. There are now two main controls: the Sphere button, and a drop-down list, proposing different light falloff types, as described bellow.
[edit] Options
- Sphere
- The Sphere option restricts the light illumination range so that it will completely stop illuminating past an area once it reaches the number of Blender Units away from itself, as specified in the Dist: field.
- An imaginary Sphere (with a radius of the Dist: field) is placed around the light source, being a limit where the light’s intensity becomes null. To achieve this, the Sphere option adds a term to the chosen attenuation law, whatever it is:
I’ = I × (D - r) / D if r < D; 0 otherwise- Where
I’is the required Intensity of light (with the Sphere option activated); - Where
Iis the Intensity of light calculated by the chosen attenuation law (without the Sphere option); - Where
Dis the current setting of the Dist: field; - Where
ris the distance from the lamp where the light Intensity gets measured.
- See also the graphic at the end of the description of the “Lin/Quad Weight” attenuation option…
- When the Sphere option is active, a dotted Sphere will appear around the light source, indicating the demarcation point at which this light intensity will be null, example below:
And now, all the falloff types, listed in the drop-down menu:
- Lin/Quad Weight
- This Lamp Falloff is described in the Blender 2.46 release notes as follows:
- « Exactly the same as in older Blenders with the old Quad button enabled. When this setting is chosen, two sliders are shown, Linear and Quad (previously Quad1 and Quad2), which control respectively the “linearness” and “quadraticness” of the falloff curve. Lamps in old files with the Quad button on will be initialised to this setting. »
- So it looks as if the Lin/Quad Weighted Lamp Falloff type is in effect allowing the mixing of the 2 Light Attenuation profiles (Linear Attenuation type and Quadratic Attenuation type).
- Here is a render of the Lin/Quad Weighted light with default settings:
- Linear
- This slider/numeric input field, can have a value between 0 and 1. A value of 1 in the Linear field and 0 in the Quad field, in effect means that the light from this source is completely Linear. Meaning that by the number of Blender Units distance specified in the Dist: field, this light sources Intensity will be half the value it was when it reaches the number of Blender Units distance specified in the Dist: field.
- When the Quad slider is set to 0 the formula for working out the Attenuation at a particular range for Linear Attenuation is, in effect:
I = E × (D / (D + L × r))- Where
Iis the calculated Intensity of light. - Where
Eis the current Energy slider setting. - Where
Dis the current setting of the Dist: field. - Where
Lis the current setting of the Linear slider. - Where
ris the distance from the lamp where the light Intensity gets measured.
- Quad
- Quad (Quadratic) Attenuation type lighting is considered a more accurate representation of how light Attenuates, and as such when the Lin/Quad Weighted Lamp Fallout type is selected, Fully Quadratic Attenuation is selected by default (that is the Quad slider field is 1 and the Linear slider field is 0).
- This slider/numeric input field, can have a value between 0 and 1. A value of 1 in the Quad field and 0 in the Linear field, in effect means that the light from this source is completely Quadratic (Quad type).
- Here again, the light intensity is half when it reaches the Dist: distance from the lamp, but compared ti a linear attenuation, the quadratic one is “slower to start” (the intensity decays much slower at the begining), but it “accelerates” once the “half-intensity” distance Dist: is reached – the intensity now attenuates much quicker.
- When the Linear slider is set to 0 the formula for working out the attenuation at a particular range for Quadratic attenuation is, in effect:
I = E × (D2 / (D2 + Q × r2))- Where
Iis the calculated Intensity of light. - Where
Eis the current Energy slider setting. - Where
Dis the current setting of the Dist: field. - Where
Qis the current setting of the Quad slider. - Where
ris the distance from the lamp where the light Intensity gets measured.
- Light Attenuation profile when both Linear and Quad sliders have values greater than 0
- If both the Linear and Quad slider fields have values greater than 0, then the formula used to calculate the Light Attenuation profile changes to this:
I = E × (D / (D + L × r)) × (D2 / (D2 + Q × r2))- Where
Iis the calculated Intensity of light. - Where
Eis the current Energy slider setting. - Where
Dis the current setting of the Dist: field. - Where
Lis the current setting of the Linear slider. - Where
Qis the current setting of the Quad slider. - Where
ris the distance from the lamp where the light Intensity gets measured.
- No Light Attenuation when both Linear and Quad sliders have values of 0.
- If both the Linear and Quad sliders have 0 as their values, the light Intensity will not Attenuate with distance. This does not mean that the light will not get darker, it will, but only because the Energy the light has is spread out over a wider and wider distance. The total amount of Energy in the spread out light will remain the same though. Light angle also affects the amount of light you see. If what you want is a light source that doesn’t attenuate and gives the same amount of light Intensity to each area it hits you need a light with properties like the Constant Lamp Falloff type.
- Also when the Linear and Quad sliders are both 0 values the Dist: field ceases to have any visible effect on the Light Attenuation.
- Here is a graph summarising everything above, in a more visual fashion. Note that it also illustrates the Sphere option’s effects:
- Custom Curve
- The Custom Curve Lamp Falloff type became available in Blender 2.46 and is very flexible.
- Most other Lamp Falloff types work by having their light Intensity start at its maximum (when nearest to the Light source) and then with some predetermined pattern decrease their light Intensity when the Distance from the light source gets further away.
- When using the Custom Curve Lamp Falloff type, a new panel is created called Falloff Curve shown below:
- This Falloff Curve Profile Graph, allows the user to alter how Intense light is at a particular point along a lights Attenuation Profile.
- In the example above (the default for the Falloff Curve Profile Graph), the Graph shows that the Intensity of the light starts off at the maximum Intensity that the light can have (when near the light) and linearly Attenuates the light Intensity as it moves to the right (further away from the light source).
- So if the user wanted to have a Light Attenuation Profile that got more Intense as it moved away from the light source, the user could alter the Light Attenuation Profile Graph as needed. Below is an example of a Falloff Curve Profile Graph, showing just such a situation:
- You are not just limited to simple changes such as light reversing the Attenuation profile, you can have almost any Attenuation profile you desire.
- The Falloff Curve Profile Graph has 2 axis, the Intensity axis and the Distance axis, labelled Intensity and Distance in the pictures shown (although these labels were added to make describing how the Falloff Curve Profile Graph works, easier, they don’t appear in Blender).
- The Distance axis represents the position at a particular point along a light sources Attenuation path. The far left being at the the position of the light source and the far right being the place where the light sources influence would normally be completely Attenuated. I say normally would because the Falloff Curve can be altered to do the exact opposite if required.
- The Intensity axis represents the Intensity at a particular point along a light sources Attenuation path. Higher Intensity is represented by being higher up the Intensity axis while lower Intensity light is represented by being lower down on the Intensity axis.
- Here is another example of different Falloff Curve Profile Graph, along with its resultant render output:
- Altering the Falloff Curve Profile Graph is easy. Just LMB
on a part of the graph you want to alter and drag it where you want it to be. If when you click you are over or near one of the tiny black square handles, it will turn white indicating that this is the handle that is now selected and you will be able to drag it to a new position. If when you click on the graph you are not near a handle, one will be created at the point that you clicked, which you can then drag where you wish.
- Inverse Square
- This Lamp Fallout type Attenuates its Intensity according to inverse square law, scaled by the Dist: value. Inverse square is a sharper, realistic decay, useful for lighting such as desk lamps and street lights. This is similar to the old Quad option (and consequently, to the new Lin/Quad Weight option with Linear to 0.0 and Quad to 1.0), with slight changes (TODO: Is it true? What changes? -- Mont29 13:42, 20 June 2009 (UTC)).
- Inverse Linear
- This Lamp Fallout type Attenuates its Intensity linearly, scaled by the Dist: value. This is the default setting, behaving the same as the default in previous Blender versions without Quad switched on, and consequently, as the new Lin/Quad Weight option with Linear to 1.0 and Quad to 0.0 (TODO: Is it true? -- Mont29 13:42, 20 June 2009 (UTC)). This isn’t physically accurate, but can be easier to light with.
- Constant
- This Lamp Fallout type does not Attenuate its Intensity with distance. This is useful for distant light sources like the sun or sky, which are so far away that their falloff isn’t noticeable. Sun and Hemi lamps always have constant falloff.
[edit] Examples
[edit] Distance
In this example, the Lamp has been set pretty close to the group of planes. This causes the light to affect the front, middle and rear planes more dramatically. Looking at (Various Distance settings) you can see that as the Dist is increased more and more objects are becoming progressively brighter.
| Various Distance settings, Shadow disabled. | ||
The Dist: parameter is controlling where the light is falling – at a linear rate by default – to 1/2 its original value from the light’s origin. As you increase or decrease this value you are changing where this 1/2 falloff occurs. You could think of Dist: as the surface of a sphere and the surface is where the light’s intensity has fallen to 1/2 its strength, in all directions. Note that the light’s intensity continues to fall even after Dist:. Dist: just specifies the distance where 1/2 of the light’s energy has weakened.
Notice in (Dist: 1000) that the farthest objects are very bright. This is because the falloff has been extended far into the distance which means the light is very strong when it hits the last few objects. It is not until 1000 units that the light’s intensity has fallen to 1/2 its original intensity.
Contrast this with (Dist: 10) where the falloff occurs so soon that the farther objects are barely lit. The light’s intensity has fallen by 1/2 by time it even reaches the 10th object.
You may be wondering, why the first few planes appear to be dimmer? This is because the surface angle between the light and the object’s surface normal are getting close to oblique. That is the nature of a Lamp light object. By moving the light infinitely far away you would begin to approach the characteristics of the Sun lamp type.
[edit] Inverse Square
Inverse Square makes the light’s intensity falloff with a non-linear rate, or specifically, quadratic rate. The characteristic feature of using Inverse Square is that the light’s intensity begins to fall off very slowly but then starts falling off very rapidly. We can see this in the (Inverse Square selected) images.
| Inverse Square selected with the specified distances. | ||
With Inverse Square selected the Dist: field is specifying where the light begins to fall faster, roughly speaking, see the light attenuation options for more info.
In (Inverse Square with 10) the light’s intensity has fallen so quickly that the last few objects aren’t even lit.
Both (Inverse Square with 100) and (Inverse Square with 1000) appear to be almost identical and that is because the Distance is set beyond the farthest object’s distance which is at ~40 units out. Hence, all the objects get almost the full intensity of the light.
As above, the first few objects are dimmer than farther objects because they are very close to the light. Remember, the brightness of an object’s surface is also based on the angle between the surface normal of an object and the ray of light coming from the lamp.
This means there are at least two things that are controlling the surface’s brightness: intensity and the angle between the light source and the surface’s normal.
[edit] Sphere
Sphere indicates that the light’s intensity is null at the Dist: distance and beyond, regardless of the chosen light’s falloff. In (Clipping Sphere) you can see a side view example of the setup with Sphere enabled and a distance of 10.
Any objects beyond the sphere receive no light from the lamp.
The Dist: field is now specifying both where the light’s rays become null, and the intensity’s ratio falloff setting. Note that there is no abrupt transition at the sphere: the light attenuation is progressive (for more details, see the description of the Sphere and light attenuation options, in the “Options” section above).
| Sphere enabled with the specified distances, Inverse Linear light falloff. | ||
In (Sphere with 10) the clipping sphere’s radius is 10 units which means the light’s intensity is also being controlled by 10 units of distance. With a linear attenuation, the light’s intensity has fallen very low even before it gets to the first object.
In (Sphere with 20) the clipping sphere’s radius is now 20 units and some light is reaching the middle objects.
In (Sphere with 40) the clipping sphere’s radius is now 40 units which is beyond the last object. However, the light doesn’t make it to the last few objects because the intensity has fallen to nearly 0.
[edit] Hints
If a Lamp light is set to not cast shadows, it illuminates through walls and the like. If you want to achieve some nice effects like a fire, or a candle-lit room interior seen from outside a window, the Sphere option is a must. By carefully working on the Distance value you can make your warm firelight shed only within the room, while illuminating outside with a cool moonlight, the latter achieved with a Sun or Hemi light or both.
[edit] See Also

















![[]](/skins/blender/open.png)
