Sophie

Sophie

distrib > Mandriva > 2010.2 > i586 > by-pkgid > 8c84ab5fe0ecd5f81b4e4e07120af05b > files > 912

povray-3.6.1-8mdv2010.1.i586.rpm


<!--  This file copyright Persistence of Vision Raytracer Pty. Ltd. 2003-2004  -->
<html> 
<head>
  
<!--  NOTE: In order to users to help find information about POV-Ray using  -->
 
<!--  web search engines, we ask you to *not* let them index documentation  -->
 
<!--  mirrors because effectively, when searching, users will get hundreds  -->
 
<!--  of results containing the same information! For this reason, the two  -->
 
<!--  meta tags below disable archiving and indexing of this page by all  -->
 
<!--  search engines that support these meta tags.  -->
 
 <meta content="noarchive" name="robots">
   
 <meta content="noindex" name="robots">
   
 <meta content="no-cache" http-equiv="Pragma">
   
 <meta content="0" http-equiv="expires">
   
<title>3.4.7 Light Sources</title>
 <link href="povray35.css" rel="stylesheet" type="text/css"> 
</head>
 <body> 
<table class="NavBar" width="100%">
  
 <tr>
   
  <td align="left" nowrap="" valign="middle" width="32">
    <a href="s_110.html"><img alt="previous" border="0" src="prev.png"></a> 
   
  </td>
   
  <td align="left" valign="middle" width="30%">
    <a href="s_110.html">3.4.6 Constructive Solid Geometry</a> 
  </td>
   
  <td align="center" valign="middle">
    <strong class="NavBar">POV-Ray 3.6 for UNIX documentation</strong><br> <strong>3.4.7 
   Light Sources</strong> 
  </td>
   
  <td align="right" valign="middle" width="30%">
    <a href="s_112.html">3.4.8 Light Groups</a> 
  </td>
   
  <td align="right" nowrap="" valign="middle" width="32">
    <a href="s_112.html"><img alt="next" border="0" src="next.png"></a> 
   
  </td>
   
 </tr>
  
</table>
 
<h3><a name="s03_04_07">3.4.7 </a>Light Sources</h3>
<a name="s03_04_07_i1"><a name="light_source"></a><a name="s03_04_07_i2"><a name="light_source, keyword"></a><a name="s03_04_07_i3"><a name="s03_04_07_i4"><a name="spotlight, light_source"></a><a name="s03_04_07_i5"><a name="s03_04_07_i6"><a name="shadowless, light_source"></a><a name="s03_04_07_i7"><a name="s03_04_07_i8"><a name="cylinder, light_source"></a><a name="s03_04_07_i9"><a name="s03_04_07_i10"><a name="parallel, light_source"></a><a name="s03_04_07_i11"><a name="s03_04_07_i12"><a name="radius, light_source"></a><a name="s03_04_07_i13"><a name="s03_04_07_i14"><a name="falloff, light_source"></a><a name="s03_04_07_i15"><a name="s03_04_07_i16"><a name="tightness, light_source"></a><a name="s03_04_07_i17"><a name="s03_04_07_i18"><a name="point_at, light_source"></a><a name="s03_04_07_i19"><a name="s03_04_07_i20"><a name="area_light, light_source"></a><a name="s03_04_07_i21"><a name="s03_04_07_i22"><a name="adaptive, light_source"></a><a name="s03_04_07_i23"><a name="s03_04_07_i24"><a name="jitter, light_source"></a><a name="s03_04_07_i25"><a name="s03_04_07_i26"><a name="circular, light_source"></a><a name="s03_04_07_i27"><a name="s03_04_07_i28"><a name="orient, light_source"></a><a name="s03_04_07_i29"><a name="s03_04_07_i30"><a name="looks_like, light_source"></a><a name="s03_04_07_i31"><a name="s03_04_07_i32"><a name="fade_distance, light_source"></a><a name="s03_04_07_i33"><a name="s03_04_07_i34"><a name="fade_power, light_source"></a><a name="s03_04_07_i35"><a name="s03_04_07_i36"><a name="media_attenuation, light_source"></a><a name="s03_04_07_i37"><a name="s03_04_07_i38"><a name="media_interaction, light_source"></a><a name="s03_04_07_i39"><a name="s03_04_07_i40"><a name="projected_through, light_source"></a><a name="s03_04_07_i41">
<p>
  The <code>light_source</code> is not really an object. Light sources have no visible shape of their own. They are 
 just points or areas which emit light. They are categorized as objects so that they can be combined with regular 
 objects using <code>union</code>. Their full syntax is: 
</p>

<pre>
LIGHT_SOURCE:
    light_source
    {
        &lt;Location&gt;, COLOR
        [LIGHT_MODIFIERS...]
    }
LIGHT_MODIFIER:
    LIGHT_TYPE | SPOTLIGHT_ITEM | AREA_LIGHT_ITEMS |
    GENERAL_LIGHT_MODIFIERS
LIGHT_TYPE:
    spotlight | shadowless | cylinder | parallel
SPOTLIGHT_ITEM:
    radius Radius | falloff Falloff | tightness Tightness |
    point_at &lt;Spot&gt;
PARALLEL_ITEM:
    point_at &lt;Spot&gt;
AREA_LIGHT_ITEM:
    area_light &lt;Axis_1&gt;, &lt;Axis_2&gt;, Size_1, Size_2 |
    adaptive Adaptive | jitter Jitter | circular | orient
GENERAL_LIGHT_MODIFIERS:
    looks_like { OBJECT } |
    TRANSFORMATION fade_distance Fade_Distance |
    fade_power Fade_Power | media_attenuation [Bool] |
    media_interaction [Bool] | projected_through
</pre>

<p>
  Light source default values: <a name="s03_04_07_i42"> 
</p>

<pre>
LIGHT_TYPE        : pointlight
falloff           : 70
media_interaction : on
media_attenuation : off
point_at          : &lt;0,0,0&gt;
radius            : 70
tightness         : 10
</pre>

<p>
  The different types of light sources and the optional modifiers are described in the following sections. 
</p>

<p>
  The first two items are common to all light sources. The <em><code>&lt;Location&gt;</code></em> vector gives the 
 location of the light. The <em>COLOR</em> gives the color of the light. Only the red, green, and blue components are 
 significant. Any transmit or filter values are ignored. 
</p>

<p class="Note">
  <strong>Note:</strong> you vary the intensity of the light as well as the color using this parameter. 
 A color such as <code>rgb &lt;0.5,0.5,0.5&gt;</code> gives a white light that is half the normal intensity. 
</p>

<p>
  All of the keywords or items in the syntax specification above may appear in any order. Some keywords only have 
 effect if specified with other keywords. The keywords are grouped into functional categories to make it clear which 
 keywords work together. The <em>GENERAL_LIGHT_MODIFIERS</em> work with all types of lights and all options. 
</p>

<p class="Note">
  <strong>Note:</strong> that <em>TRANSFORMATIONS</em> such as <code><a href="#l135">translate</a></code>, 
 <code><a href="#l136">rotate</a></code> etc. may be applied but no other <em>OBJECT_MODIFIERS</em> may be used. 
</p>

<p>
  There are three mutually exclusive light types. If no <em>LIGHT_TYPE</em> is specified it is a point light. The 
 other choices are <code> spotlight</code> and <code>cylinder</code>. 
</p>

<h4><a name="s03_04_07_01">3.4.7.1 </a>Point Lights</h4>
<a name="s03_04_07_01_i1"><a name="point light, light_source"></a><a name="s03_04_07_01_i2">
<p>
  The simplest kind of light is a point light. A point light source sends light of the specified color uniformly in 
 all directions. The default light type is a point source. The <em><code>&lt;Location&gt;</code></em> and <em> COLOR</em> 
 is all that is required. For example: 
</p>

<pre>
  light_source {
    &lt;1000,1000,-1000&gt;, rgb &lt;1,0.75,0&gt; //an orange light
  }
</pre>

<h4><a name="s03_04_07_02">3.4.7.2 </a>Spotlights</h4>
<a name="s03_04_07_02_i1"><a name="s03_04_07_02_i2">
<p>
  Normally light radiates outward equally in all directions from the source. However the <code>spotlight</code> 
 keyword can be used to create a cone of light that is bright in the center and falls of to darkness in a soft fringe 
 effect at the edge. 
</p>

<p>
  Although the cone of light fades to soft edges, objects illuminated by spotlights still cast hard shadows. The 
 syntax is: 
</p>

<pre>
SPOTLIGHT_SOURCE:
    light_source
    {
        &lt;Location&gt;, COLOR spotlight
        [LIGHT_MODIFIERS...]
    }
LIGHT_MODIFIER:
    SPOTLIGHT_ITEM | AREA_LIGHT_ITEMS | GENERAL_LIGHT_MODIFIERS
SPOTLIGHT_ITEM:
    radius Radius | falloff Falloff | tightness Tightness |
    point_at &lt;Spot&gt;
</pre>

<p>
  Default values: 
</p>

<pre>
  radius:    30 degrees
  falloff:   45 degrees
  tightness:  0
</pre>
<a name="s03_04_07_02_i3"><a name="point_at"></a><a name="s03_04_07_02_i4"><a name="point_at, spotlight"></a>
<p>
  The <code>point_at</code> keyword tells the spotlight to point at a particular 3D coordinate. A line from the 
 location of the spotlight to the <code>point_at</code> coordinate forms the center line of the cone of light. The 
 following illustration will be helpful in understanding how these values relate to each other. 
</p>

<p>
  <br><center><img alt="The geometry of a spotlight." src="images/reference/spotgeom.png"></center><a name="s03_04_07_02_i5"><a name="falloff"></a><a name="s03_04_07_02_i6"><a name="radius"></a><a name="s03_04_07_02_i7"><a name="tightness"></a><a name="s03_04_07_02_i8"><a name="s03_04_07_02_i9"><a name="s03_04_07_02_i10"><a name="s03_04_07_02_i11"><a name="s03_04_07_02_i12"> 
 
</p>

<p>
  The <code>falloff</code>, <code>radius</code>, and <code> tightness</code> keywords control the way that light 
 tapers off at the edges of the cone. These four keywords apply only when the <code> spotlight</code> or <code> cylinder</code> 
 keywords are used. 
</p>

<p>
  The <code>falloff</code> keyword specifies the overall size of the cone of light. This is the point where the light 
 falls off to zero intensity. The float value you specify is the angle, in degrees, between the edge of the cone and 
 center line. The <code> radius</code> keyword specifies the size of the &quot;hot-spot&quot; at the center of the cone 
 of light. The &quot;hot-spot&quot; is a brighter cone of light inside the spotlight cone and has the same center line. 
 The <code>radius</code> value specifies the angle, in degrees, between the edge of this bright, inner cone and the 
 center line. The light inside the inner cone is of uniform intensity. The light between the inner and outer cones 
 tapers off to zero. 
</p>

<p>
  For example, assuming a <code>tightness 0</code>, with <code>radius 10</code> and <code>falloff 20</code> the light 
 from the center line out to 10 degrees is full intensity. From 10 to 20 degrees from the center line the light falls 
 off to zero intensity. At 20 degrees or greater there is no light. 
</p>

<p class="Note">
  <strong>Note:</strong> if the radius and falloff values are close or equal the light intensity drops 
 rapidly and the spotlight has a sharp edge. 
</p>

<p>
  The values for the <code>radius</code>, and <code>tightness</code> parameters are half the opening angles of the 
 corresponding cones, both angles have to be smaller than 90 degrees. The light smoothly falls off between the radius 
 and the falloff angle like shown in the figures below (as long as the radius angle is not negative). 
</p>

<p>
  <br><center><img alt="Intensity multiplier curve with a fixed falloff angle of 45 degrees." src="images/reference/fixfallo.png"></center> 
 
</p>

<p>
  <br><center><img alt="Intensity multiplier curve with a fixed radius angle of 45 degrees." src="images/reference/fixedrad.png"></center> 
 
</p>

<p>
  The <code>tightness</code> keyword is used to specify an <em> additional</em> exponential softening of the edges. A 
 value other than 0, will affect light within the radius cone as well as light in the falloff cone. The intensity of 
 light at an angle from the center line is given by: <em><code>intensity * cos(angle)tightness</code></em>. The default 
 value for tightness is 0. Lower tightness values will make the spotlight brighter, making the spot wider and the edges 
 sharper. Higher values will dim the spotlight, making the spot tighter and the edges softer. Values from 0 to 100 are 
 acceptable. 
</p>

<p>
  <br><center><img alt="Intensity multiplier curve with fixed angle and falloff angles of 30 and 60 degrees respectively and different tightness values." src="images/reference/diftight.png"></center> 
 
</p>

<p>
  You should note from the figures that the radius and falloff angles interact with the tightness parameter. To give 
 the tightness value full control over the spotlight's appearance use radius 0 falloff 90. As you can see from the 
 figure below. In that case the falloff angle has no effect and the lit area is only determined by the tightness 
 parameter. 
</p>

<p>
  <br><center><img alt="Intensity multiplier curve with a negative radius angle and different tightness values." src="images/reference/negradli.png"></center> 
 
</p>

<p>
  Spotlights may be used anyplace that a normal light source is used. Like any light sources, they are invisible. 
 They may also be used in conjunction with area lights. 
</p>

<h4><a name="s03_04_07_03">3.4.7.3 </a>Cylindrical Lights</h4>
<a name="s03_04_07_03_i1"><a name="s03_04_07_03_i2">
<p>
  The <code>cylinder</code> keyword specifies a cylindrical light source that is great for simulating laser beams. 
 Cylindrical light sources work pretty much like spotlights except that the light rays are constrained by a cylinder 
 and not a cone. The syntax is: 
</p>

<pre>
CYLINDER_LIGHT_SOURCE:
    light_source
    {
        &lt;Location&gt;, COLOR cylinder
        [LIGHT_MODIFIERS...]
    }
LIGHT_MODIFIER:
    SPOTLIGHT_ITEM | AREA_LIGHT_ITEMS | GENERAL_LIGHT_MODIFIERS
SPOTLIGHT_ITEM:
    radius Radius | falloff Falloff | tightness Tightness |
    point_at &lt;Spot&gt;
</pre>

<p>
  Default values: 
</p>

<pre>
  radius:     0.75 degrees
  falloff:    1    degrees
  tightness:  0
</pre>

<p>
  The <code>point_at</code>, <code>radius</code>, <code>falloff</code> and <code>tightness</code> keywords control 
 the same features as with the spotlight. See &quot;<a href="s_111.html#s03_04_07_02">Spotlights</a>&quot; for details. 
</p>

<p>
  You should keep in mind that the cylindrical light source is still a point light source. The rays are emitted from 
 one point and are only constraint by a cylinder. The light rays are not parallel. 
</p>

<h4><a name="s03_04_07_04">3.4.7.4 </a>Parallel Lights</h4>
<a name="s03_04_07_04_i1"><a name="s03_04_07_04_i2"><a name="s03_04_07_04_i3"><a name="s03_04_07_04_i4"><a name="parallel"></a>
<pre>
syntax:

light_source {
  LOCATION_VECTOR, COLOR
  [LIGHT_SOURCE_ITEMS...]
  parallel
  point_at VECTOR
}
</pre>

<p>
  The <code>parallel</code> keyword can be used with any type of light source. 
</p>

<p class="Note">
  <strong>Note:</strong> for normal point lights, <code>point_at</code> must come after <code>parallel</code>. 
 
</p>

<p>
  Parallel lights are useful for simulating very distant light sources, such as sunlight. As the name suggests, it 
 makes the light rays parallel. 
</p>

<p>
  Technically this is done by shooting rays from the closest point on a plane to the object intersection point. The 
 plane is determined by a perpendicular defined by the light <code>location</code> and the <code>point_at</code> 
 vector. 
</p>

<p>
  Two things must be considered when choosing the light location (specifically, its distance): 
</p>

<ol>
 
 <li>
   Any parts of an object &quot;above&quot; the light plane still get illuminated according to the light direction, 
  but they will not cast or receive shadows. 
 </li>

 <li>
   <code>fade_distance</code> and <code>fade_power</code> use the light <code>location</code> to determine distance 
  for light attenuation, so the attenuation still looks like that of a point source. <br>Area light also uses the light 
  location in its calculations. 
 </li>

</ol>

<h4><a name="s03_04_07_05">3.4.7.5 </a>Area Lights</h4>
<a name="s03_04_07_05_i1"><a name="s03_04_07_05_i2"><a name="s03_04_07_05_i3"><a name="area_light"></a>
<p>
  Area light sources occupy a finite, one- or two-dimensional area of space. They can cast soft shadows because an 
 object can partially block their light. Point sources are either totally blocked or not blocked. 
</p>

<p>
  The <code>area_light</code> keyword in POV-Ray creates sources that are rectangular in shape, sort of like a flat 
 panel light. Rather than performing the complex calculations that would be required to model a true area light, it is 
 approximated as an array of point light sources spread out over the area occupied by the light. The array-effect 
 applies to shadows only. The object's illumination is still that of a point source. The intensity of each individual 
 point light in the array is dimmed so that the total amount of light emitted by the light is equal to the light color 
 specified in the declaration. The syntax is: 
</p>

<pre>
AREA_LIGHT_SOURCE:

  light_source {
    LOCATION_VECTOR, COLOR
    area_light
    AXIS_1_VECTOR, AXIS_2_VECTOR, Size_1, Size_2
    [adaptive Adaptive] [ jitter ]
    [ circular ] [ orient ]
    [ [LIGHT_MODIFIERS...]
  }
</pre>

<p>
  Any type of light source may be an area light. 
</p>

<p>
  The area_light command defines the location, the size and orientation of the area light as well as the number of 
 lights in the light source array. The location vector is the centre of a rectangle defined by the two vectors <em><code>&lt;Axis_1&gt;</code></em> 
 and <em><code>&lt;Axis_2&gt;</code></em>. These specify the lengths and directions of the edges of the light. 
</p>

<p>
  <img alt="4x4 Area light, location and vectors." src="images/reference/areal.png"> 
</p>

<p>
  Since the area lights are rectangular in shape these vectors should be perpendicular to each other. The larger the 
 size of the light the thicker the soft part of shadows will be. The integers Size_1 and Size_2 specify the number of 
 rows and columns of point sources of the. The more lights you use the smoother your shadows will be but the longer 
 they will take to render. 
</p>

<p class="Note">
  <strong>Note:</strong> it is possible to specify spotlight parameters along with the area light 
 parameters to create area spotlights. Using area spotlights is a good way to speed up scenes that use area lights 
 since you can confine the lengthy soft shadow calculations to only the parts of your scene that need them. 
</p>

<p>
  An interesting effect can be created using a linear light source. Rather than having a rectangular shape, a linear 
 light stretches along a line sort of like a thin fluorescent tube. To create a linear light just create an area light 
 with one of the array dimensions set to 1. 
</p>

<p>
  <a name="s03_04_07_05_i4"><a name="jitter"></a> <a name="s03_04_07_05_i5"> <a name="s03_04_07_05_i6"> The <code>jitter</code> 
 command is optional. When used it causes the positions of the point lights in the array to be randomly jittered to 
 eliminate any shadow banding that may occur. The jittering is completely random from render to render and should not 
 be used when generating animations. 
</p>

<p>
  <a name="s03_04_07_05_i7"><a name="adaptive"></a> <a name="s03_04_07_05_i8"> The <code>adaptive</code> command is 
 used to enable adaptive sampling of the light source. By default POV-Ray calculates the amount of light that reaches a 
 surface from an area light by shooting a test ray at every point light within the array. As you can imagine this is 
 very slow. Adaptive sampling on the other hand attempts to approximate the same calculation by using a minimum number 
 of test rays. The number specified after the keyword controls how much adaptive sampling is used. The higher the 
 number the more accurate your shadows will be but the longer they will take to render. If you are not sure what value 
 to use a good starting point is <code> adaptive 1</code>. The <code>adaptive</code> keyword only accepts integer 
 values and cannot be set lower than 0. 
</p>

<p>
  When performing adaptive sampling POV-Ray starts by shooting a test ray at each of the four corners of the area 
 light. If the amount of light received from all four corners is approximately the same then the area light is assumed 
 to be either fully in view or fully blocked. The light intensity is then calculated as the average intensity of the 
 light received from the four corners. However, if the light intensity from the four corners differs significantly then 
 the area light is partially blocked. The area light is split into four quarters and each section is sampled as 
 described above. This allows POV-Ray to rapidly approximate how much of the area light is in view without having to 
 shoot a test ray at every light in the array. Visually the sampling goes like shown below. 
</p>

<p>
  <br><center><img alt="Area light adaptive samples." src="images/reference/arealigh.png"></center> 
</p>

<p>
  While the adaptive sampling method is fast (relatively speaking) it can sometimes produce inaccurate shadows. The 
 solution is to reduce the amount of adaptive sampling without completely turning it off. The number after the adaptive 
 keyword adjusts the number of times that the area light will be split before the adaptive phase begins. For example if 
 you use <code> adaptive 0</code> a minimum of 4 rays will be shot at the light. If you use <code> adaptive 1</code> a 
 minimum of 9 rays will be shot (<code>adaptive 2</code> gives 25 rays, <code>adaptive 3</code> gives 81 rays, etc). 
 Obviously the more shadow rays you shoot the slower the rendering will be so you should use the lowest value that 
 gives acceptable results. 
</p>

<p>
  The number of rays never exceeds the values you specify for rows and columns of points. For example <code>area_light 
 x,y,4,4</code> specifies a 4 by 4 array of lights. If you specify <code>adaptive 3</code> it would mean that you 
 should start with a 9 by 9 array. In this case no adaptive sampling is done. The 4 by 4 array is used.<a name="s03_04_07_05_i9"><a name="circular"></a><a name="s03_04_07_05_i10"> 
 
</p>

<p>
  The <code>circular</code> command has been added to area lights in order to better create circular soft shadows. 
 With ordinary area lights the pseudo-lights are arranged in a rectangular grid and thus project partly rectangular 
 shadows around all objects, including circular objects. <br>By including the <code>circular</code> tag in an area 
 light, the light is stretched and squashed so that it looks like a circle: this way, circular or spherical light 
 sources are better simulated. 
</p>

<p>
  A few things to remember: 
</p>

<ul>
 
 <li>
   Circular area lights can be ellipses: the AXIS_1_VECTOR and AXIS_2_VECTOR define the shape and orientation of the 
  circle; if the vectors are not equal, the light source is elliptical in shape. 
 </li>

 <li>
   Rectangular artefacts may still show up with very large area grids. 
 </li>

 <li>
   There is no point in using <code>circular</code> with linear area lights or area lights which have a 2x2 size. 
 </li>

 <li>
   The area of a circular light is roughly 78.5 per cent of a similar size rectangular area light. Increase your 
  axis vectors accordingly if you wish to keep the light source area constant. 
 </li>

</ul>
<a name="s03_04_07_05_i11"><a name="orient"></a><a name="s03_04_07_05_i12">
<p>
  The <code>orient</code> command has been added to area lights in order to better create soft shadows. Without this 
 modifier, you have to take care when choosing the axis vectors of an area_light, since they define both its area and 
 orientation. <br>Area lights are two dimensional: shadows facing the area light receive light from a larger surface 
 area than shadows at the sides of the area light.<br><center><img alt="Area light facing object" src="images/reference/area2.png"></center> 
 
</p>

<p>
  Actually, the area from which light is emitted at the sides of the area light is reduced to a single line, only 
 casting soft shadows in one direction.<br><center><img alt="Area light not facing object" src="images/reference/area1.png"></center> 
 
</p>

<p>
  Between these two extremes the surface area emitting light progresses gradually. <br>By including the <code>orient</code> 
 modifier in an area light, the light is rotated so that for every shadow test, it always faces the point being tested. 
 The initial orientation is no longer important, so you only have to consider the desired dimensions (area) of the 
 light source when specifying the axis vectors. <br>In effect, this makes the area light source appear 3-dimensional 
 (e.g. an area_light with perpendicular axis vectors of the same size and dimensions using <code>circular</code> <em>and</em> 
 <code>orient</code> simulates a spherical light source). 
</p>

<p>
  Orient has a few restrictions: 
</p>

<ol>
 
 <li>
   It can be used with &quot;circular&quot; lights only. 
 </li>

 <li>
   The two axes of the area light must be of equal length. 
 </li>

 <li>
   The two axes of the area light should use an equal number of samples, and that number should be greater than one 
 </li>

</ol>

<p>
  These three rules exist because without them, you can get unpredictable results from the orient feature. 
</p>

<p>
  If one of the first two rules is broken, POV will issue a warning and correct the problem. If the third rule is 
 broken, you will only get the error message, and POV will not automatically correct the problem. 
</p>

<h4><a name="s03_04_07_06">3.4.7.6 </a>Shadowless Lights</h4>
<a name="s03_04_07_06_i1"><a name="shadowless"></a><a name="s03_04_07_06_i2"><a name="s03_04_07_06_i3">
<p>
  Using the <code>shadowless</code> keyword you can stop a light source from casting shadows. These lights are 
 sometimes called &quot;fill lights&quot;. They are another way to simulate ambient light however shadowless lights 
 have a definite source. The syntax is: 
</p>

<pre>
SHADOWLESS_LIGHT_SOURCE:
    light_source
    {
        &lt;Location&gt;, COLOR shadowless
        [LIGHT_MODIFIERS...]
    }
LIGHT_MODIFIER:
    AREA_LIGHT_ITEMS | GENERAL_LIGHT_MODIFIERS
</pre>

<p>
  <code>shadowless</code> may be used with all types of light sources. The only restriction is that <code>shadowless</code> 
 should be before or after <em>all</em> spotlight or cylinder option keywords. Do not mix or you get the message 
 &quot;Keyword 'the one following shadowless' cannot be used with standard light source&quot;. Also note that 
 shadowless lights will not cause highlights on the illuminated objects. 
</p>

<h4><a name="s03_04_07_07">3.4.7.7 </a>Looks_like</h4>
<a name="s03_04_07_07_i1"><a name="s03_04_07_07_i2">
<p>
  Normally the light source itself has no visible shape. The light simply radiates from an invisible point or area. 
 You may give a light source any shape by adding a <code>looks_like {</code><em> OBJECT</em> <code>}</code> statement. 
</p>

<p>
  There is an implied <code>no_shadow</code> attached to the <code> looks_like</code> object so that light is not 
 blocked by the object. Without the automatic <code>no_shadow</code> the light inside the object would not escape. The 
 object would, in effect, cast a shadow over everything. 
</p>

<p>
  If you want the attached object to block light then you should attach it with a <code>union</code> and not a <code>looks_like</code> 
 as follows: 
</p>

<pre>
  union {
    light_source { &lt;100, 200, -300&gt; color White }
    object { My_Lamp_Shape }
  }
</pre>

<p>
  Presumably parts of the lamp shade are transparent to let some light out. 
</p>

<h4><a name="s03_04_07_08">3.4.7.8 </a>Projected_Through</h4>
<a name="s03_04_07_08_i1"><a name="s03_04_07_08_i2"><a name="s03_04_07_08_i3"><a name="projected_through"></a>
<p>
  Syntax: 
</p>

<pre>
  light_source {
    LOCATION_VECTOR, COLOR
    [LIGHT_SOURCE_ITEMS...]
    projected_through { OBJECT }
  }
</pre>

<p>
  Projected_through can be used with any type of light source. Any object can be used, provided it has been declared 
 before. <br>Projecting a light through an object can be thought of as the opposite of shadowing: only the light rays 
 that hit the projected_through object will contribute to the scene. <br>This also works with area_lights, producing 
 spots of light with soft edges. <br>Any objects between the light and the projected through object will not cast 
 shadows for this light. Also any surface within the projected through object will not cast shadows. <br>Any textures 
 or interiors on the object will be stripped and the object will not show up in the scene. 
</p>

<h4><a name="s03_04_07_09">3.4.7.9 </a>Light Fading</h4>
<a name="s03_04_07_09_i1"><a name="light_source, fade_power"></a><a name="s03_04_07_09_i2"><a name="s03_04_07_09_i3"><a name="fade_power"></a>
<p>
  By default POV-Ray does not diminish light from any light source as it travels through space. In order to get a 
 more realistic effect <code> fade_distance</code> and <code>fade_power</code> keywords followed by float values can be 
 used to model the distance based falloff in light intensity. 
</p>

<p>
  <a name="s03_04_07_09_i4"><a name="fade_distance"></a> <a name="s03_04_07_09_i5"> <a name="s03_04_07_09_i6"> The <code>fade_distance</code> 
 is used to specify the distance at which the full light intensity arrives, i. e. the intensity which was given by the <em>COLOR</em> 
 specification. The actual attenuation is described by the <code>fade_power</code> <em><code> Fade_Power</code></em>, 
 which determines the falloff rate. For example linear or quadratic falloff can be used by setting <code>fade_power</code> 
 to 1 or 2 respectively. The complete formula to calculate the factor by which the light is attenuated is 
</p>

<p>
  <br><center><img alt="" src="images/reference/lattenua.png"></center> 
</p>

<p>
  with <em><code>d</code></em> being the distance the light has traveled. 
</p>

<p>
  <br><center><img alt="Light fading functions for different fading powers." src="images/reference/lfadefx.png"></center> 
 
</p>

<p>
  You should note two important facts: First, for <em><code>Fade_Distance</code></em> larger than one the light 
 intensity at distances smaller than <em><code>Fade_Distance</code></em> actually increases. This is necessary to get 
 the light source color if the distance traveled equals the <em><code>Fade_Distance</code></em>. Second, only light 
 coming directly from light sources is attenuated. Reflected or refracted light is not attenuated by distance. 
</p>

<h4><a name="s03_04_07_10">3.4.7.10 </a>Atmospheric Media Interaction</h4>
<a name="s03_04_07_10_i1"><a name="s03_04_07_10_i2"><a name="s03_04_07_10_i3"><a name="media_interaction"></a>
<p>
  By default light sources will interact with an atmosphere added to the scene. This behavior can be switched off by 
 using <code>media_interaction off</code> inside the light source statement. 
</p>

<p class="Note">
  <strong>Note:</strong> in POV-Ray 3.0 this feature was turned off and on with the atmosphere keyword. 
</p>

<h4><a name="s03_04_07_11">3.4.7.11 </a>Atmospheric Attenuation</h4>
<a name="s03_04_07_11_i1"><a name="media_attenuation"></a><a name="s03_04_07_11_i2">
<p>
  Normally light coming from light sources is not influenced by fog or atmospheric media. This can be changed by 
 turning the <code>media_attenuation on</code> for a given light source on. All light coming from this light source 
 will now be diminished as it travels through the fog or media. This results in an distance-based, exponential 
 intensity falloff ruled by the used fog or media. If there is no fog or media no change will be seen. 
</p>

<p class="Note">
  <strong>Note:</strong>in POV-Ray 3.0 this feature was turned off and on with the 
 atmospheric_attenuation keyword. 
</p>

<p>
 <a name="l135">
<small><strong>More about &quot;translate&quot;</strong></small>
</a>
 <ul>
  
  <li><small>
   <a href="s_157.html#s03_08_05">3.8.5 Transformations</a> in 3.8 Quick Reference
  </small>

  <li><small>
   <a href="s_63.html#s02_02_07_01_01">2.2.7.1.1 Translate</a> in 2.2.7.1 Transformations
  </small>

 </ul>

</p>

<p>
 <a name="l136">
<small><strong>More about &quot;rotate&quot;</strong></small>
</a>
 <ul>
  
  <li><small>
   <a href="s_157.html#s03_08_05">3.8.5 Transformations</a> in 3.8 Quick Reference
  </small>

  <li><small>
   <a href="s_63.html#s02_02_07_01_03">2.2.7.1.3 Rotate</a> in 2.2.7.1 Transformations
  </small>

  <li><small>
   <a href="s_97.html#s03_02_01_04_05">3.2.1.4.5 Functions</a> in 3.2.1.4 Vector Expressions
  </small>

 </ul>

</p>
 <br> 
<table class="NavBar" width="100%">
  
 <tr>
   
  <td align="left" nowrap="" valign="middle" width="32">
    <a href="s_110.html"><img alt="previous" border="0" src="prev.png"></a> 
   
  </td>
   
  <td align="left" valign="middle" width="30%">
    <a href="s_110.html">3.4.6 Constructive Solid Geometry</a> 
  </td>
   
  <td align="center" valign="middle">
    <strong>3.4.7 Light Sources</strong> 
  </td>
   
  <td align="right" valign="middle" width="30%">
    <a href="s_112.html">3.4.8 Light Groups</a> 
  </td>
   
  <td align="right" nowrap="" valign="middle" width="32">
    <a href="s_112.html"><img alt="next" border="0" src="next.png"></a> 
   
  </td>
   
 </tr>
  
</table>
 </body> </html>