Changes between Version 2 and Version 3 of Lighting


Ignore:
Timestamp:
Oct 20, 2006 3:07:47 PM (9 years ago)
Author:
leo
Comment:

--

Legend:

Unmodified
Added
Removed
Modified
  • Lighting

    v2 v3  
    11= Light Types =
     2
     3  LeoCAD supports 3 different types of lights:
    24
    35 * Point Light
     
    1315  A Spot Light is a light source which has a cone of effect, like a desk lamp for example. Like a Directional Light, it has a basic direction, but it also has a defined conic volume in which its light can fall and unlike a Directional Light, its position determines what objects it affects. The angle of the cone determines how much of the scene is illuminated.
    1416
     17
    1518= Light Parameters =
    1619
    17  Ambient Color::
     20  Once a light has been added to a scene you can change its parameters by using the Modify Dialog.
    1821
    19    The ambient component is the light from this source that's been scattered so much by the environment that its direction is impossible to determine - it seems to come from all directions. Backlighting in a room has a large ambient component, since most of the light that reaches your eye has bounced off many surfaces first. A spotlight outdoors has a tiny ambient component; most of the light travels in the same direction, and since you're outdoors, very little of the light reaches your eye after bouncing off other objects. When ambient light strikes a surface, it's scattered equally in all directions.
     22 * Ambient Color
    2023
    21  Diffuse Color::
     24  The ambient component is the light from this source that's been scattered so much by the environment that its direction is impossible to determine - it seems to come from all directions. Backlighting in a room has a large ambient component, since most of the light that reaches your eye has bounced off many surfaces first. A spotlight outdoors has a tiny ambient component; most of the light travels in the same direction, and since you're outdoors, very little of the light reaches your eye after bouncing off other objects. When ambient light strikes a surface, it's scattered equally in all directions.
    2225
    23    Diffuse light comes from one direction, so it's brighter if it comes squarely down on a surface than if it barely glances off the surface. Once it hits a surface, however, it's scattered equally in all directions, so it appears equally bright, no matter where the eye is located. Any light coming from a particular position or direction probably has a diffuse component.
     26 * Diffuse Color
    2427
    25  Specular Color::
     28  Diffuse light comes from one direction, so it's brighter if it comes squarely down on a surface than if it barely glances off the surface. Once it hits a surface, however, it's scattered equally in all directions, so it appears equally bright, no matter where the eye is located. Any light coming from a particular position or direction probably has a diffuse component.
    2629
    27    Specular light comes from a particular direction, and it tends to bounce off the surface in a preferred direction. A well-collimated laser beam bouncing off a high-quality mirror produces almost 100 percent specular reflection. Shiny metal or plastic has a high specular component, and chalk or carpet has almost none. You can think of specularity as shininess.
     30 * Specular Color
    2831
    29  Spot Exponent::
     32  Specular light comes from a particular direction, and it tends to bounce off the surface in a preferred direction. A well-collimated laser beam bouncing off a high-quality mirror produces almost 100 percent specular reflection. Shiny metal or plastic has a high specular component, and chalk or carpet has almost none. You can think of specularity as shininess.
    3033
    31    This parameter controls how concentrated the light of a spot light is. The light's intensity is highest in the center of the cone and it's attenuated toward the edges of the cone by the cosine of the angle between the direction of the light and the direction from the light to the vertex being lighted, raised to the power of the spot exponent. Thus, higher spot exponents result in a more focused light source.
     34 * Spot Exponent
    3235
    33    Only values between 0 and 128 are valid, with 0 (the default) resulting in uniform light distribution.
     36  This parameter controls how concentrated the light of a spot light is. The light's intensity is highest in the center of the cone and it's attenuated toward the edges of the cone by the cosine of the angle between the direction of the light and the direction from the light to the vertex being lighted, raised to the power of the spot exponent. Thus, higher spot exponents result in a more focused light source.
    3437
    35  Spot Cutoff::
     38  Only values between 0 and 128 are valid, with 0 (the default) resulting in uniform light distribution.
    3639
    37    Specifies the maximum spread angle of a light source (between 0 and 90 degreees). If the angle between the direction of the light and the direction from the light to the vertex being lit is greater than the spot cutoff angle, then the light is completely masked. Otherwise, its intensity is controlled by the spot exponent and the attenuation factors.
     40 * Spot Cutoff
    3841
    39  Constant/Linear/Quadratic Attenuation::
     42  Specifies the maximum spread angle of a light source (between 0 and 90 degreees). If the angle between the direction of the light and the direction from the light to the vertex being lit is greater than the spot cutoff angle, then the light is completely masked. Otherwise, its intensity is controlled by the spot exponent and the attenuation factors.
    4043
    41    For real-world lights, the intensity of light decreases as distance from the light increases. Since a directional light is infinitely far away, it doesn't make sense to attenuate its intensity over distance, so attenuation is disabled for a directional light. However, you might want to attenuate the light coming from spot and omni lights.
     44 * Constant/Linear/Quadratic Attenuation
    4245
    43    Light intensity is attenuated by the reciprocal of the sum of: the constant factor, the linear factor multiplied by the distance between the light and the vertex being lit, and the quadratic factor multiplied by the square of the same distance. If the Attenuation factors are (1, 0, 0), it would result in no attenuation at all.
     46  For real-world lights, the intensity of light decreases as distance from the light increases. Since a Directional Light is infinitely far away, it doesn't make sense to attenuate its intensity over distance, so attenuation is disabled for a directional light. However, you might want to attenuate the light coming from Point Lights and Spot Lights.
     47
     48  Light intensity is attenuated by the reciprocal of the sum of: the constant factor, the linear factor multiplied by the distance between the light and the vertex being lit, and the quadratic factor multiplied by the square of the same distance. If the Attenuation factors are (1, 0, 0), it would result in no attenuation at all.