Manual/Lamp
From BlenderWiki
Contents[hide] |
Lamp
Mode: All Modes
Panel: Shading/Lamp Context
Hotkey: F5
Description
The 'Lamp' lamp is an omni-directional point of light, that is, a point radiating the same amount of light in all directions. It's visualised by a plain, circled dot, (Lamp Light).
Being a point light source, the direction of the light hitting
an object's surface is determined by the line joining the lamp and the
point on the surface of the object itself. Light intensity/energy
decays based on (among other variables) distance from the Lamp to the object. In other words, surfaces that are further away are darker.
Options
- Energy (0.0 - 10.0)
- The intensity of the lamp's illumination
- Color
- The color of the lamp's illumination
- Distance
- The distance at which the light intensity is half the Energy value. Objects closer than that receive more light, objects further than that receive less light.
- Quad
- If this button is off, a linear -- rather non-physical -- decay ratio based on distance is used. If it is on, a more complex decay is used, which can be tuned by the user from a fully linear decay, Blender default, to a fully -- physically correct -- quadratic decay ratio based on distance. This latter is a little more difficult to master and is governed by the Quad1 and Quad2 Num Buttons as will be explained later on.
- Using Quad may be slightly more difficult to set up for quick results, but generally looks a lot more realistic than without it.
- Sphere
- Restrict the lamp's illumination to only surfaces within the Sphere of radius Dist: rather than decaying to infinity.
Examples
Notice in (Render example) that the light is gradually diminishing for each sphere that is farther away from the light source as compared to the Sun render example where the light's intensity was constant (i.e. never faded with distance).
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.
The Dist: parameter is controlling where the light is falling --at a linear rate-- 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.
Quad
Quad makes the light's intensity falloff with a non-linear rate, or specifically, quadratic rate. The characteristic feature of using "Quad" 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 (Quad enabled) images.
With Quad enabled the "Dist:" field is specifying where the light begins to fall faster, roughly speaking, see Technical Details for more info.
In (Quad with 10) the light's intensity has fallen so quickly that last few objects aren't even lit.
Both (Quad with 100) and (Quad with 1000) appear to be almost indentical 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 with Dist 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.
Sphere
Sphere controls where the light's intensity is clipped/clamped off. All light rays stop at the surface of the sphere regardless of the 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 stop and the intensity's ratio falloff setting. The only difference is that now light abruptly stops at sphere's surface regardless of the light's intensity.
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 Quad disabled 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, but no light is going beyond the clipping sphere even if the light still has energy left.
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 0. The light's intensity has faded before it was clipped by the sphere.
Hints
Since the Lamp light does not cast shadows it shines happily 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.
Technical Details
The effect of the Distance parameter is very evident, while the effect of the Quad button is more subtle. In any case the absence of shadows is still a major issue. As a matter of fact only the first plane should be lit, because all the others should fall in the shadow of the first. For the Math enthusiasts, and for those desiring deeper insight, the laws governing the decay are the following. Let math:D be the value of the Distance Numeric Button, math:E the value of the Energy slider and math:r the distance from the Lamp to the point where the light intensity math:I is to be computed.
If Quad and Sphere buttons are off:
[[math:I = E \frac{D}{D+r}]]
It is evident what affirmed before: That the light intensity equals half the energy for math:r=D.
If Quad Button is on:
[[math:I = E \frac{D}{D + Q_1 r} \frac{D^2}{D^2 + Q_2 r^2}]]
This is a little more complex and depends from the Quad1 (math:Q_1) and Quad2 (math:Q_2) slider values. Nevertheless it is apparent how the decay is fully linear for
and fully quadratic for
this latter being the default. Interestingly enough if
then light intensity does not decay at all. If the Sphere button is on the above computed light intensity math:I is further modified by multiplication by the term which has a linear progression for math:r from 0 to math:D and is identically 0 otherwise.
If the Quad button is off and the Sphere button is on:
[[math:Is = E \frac{D}{D+r} \frac{D - r}{D} \; \text{if} r < D; \; 0 \text{otherwise}]]
If both Quad and Sphere buttons are on:
[[math:Is = E \frac{D}{D + Q_1 r} \frac{D^2}{D^2 + Q_2 r^2} \frac{D - r}{D} \; \text{if} r < D; \; 0 \text{otherwise}]]
Might be helpful in understanding these behaviours graphically.
|