home *** CD-ROM | disk | FTP | other *** search
/ Crawly Crypt Collection 1 / crawlyvol1.bin / tt / raysh402 / guide.tex / node18_mn.html < prev    next >
Text File  |  1992-02-09  |  7KB  |  129 lines

  1.  
  2. <H1><A ID="SECTION00610000000000000000">
  3. Light Source Types</A>
  4. </H1>
  5.  
  6. <P>
  7. The amount of ambient light present in a scene is controlled by a
  8. pseudo light source of type <#270#><EM>ambient</EM><#270#>.
  9.  
  10. <P>
  11. <DL>
  12. <DT><STRONG><#4664#><#4664#></STRONG></DT>
  13. <DD><#1231#><TT>light</TT><#1231#> <#1232#><EM>Intensity</EM><#1232#> ambient 
  14. <BR>    Define the amount of ambient light present in the entire
  15.     scene.
  16. </DD>
  17. </DL>
  18. <P>
  19. There is only one ambient light source; its default intensity is
  20. <#275#>1, 1, 1<#275#>.  If more than one ambient light source is defined,
  21. only the last instance is used.  A surface's ambient color
  22. is multiplied by the intensity of the ambient source to give the
  23. total ambient light reflected from the surface.
  24.  
  25. <P>
  26. Directional sources are described by a direction alone, and are useful
  27. for modeling light sources that are effectively infinitely far away
  28. from the objects they illuminate.   
  29.  
  30. <P>
  31. <DL>
  32. <DT><STRONG><#4665#><#4665#></STRONG></DT>
  33. <DD><#1235#><TT>light</TT><#1235#> <#1236#><EM>Intensity</EM><#1236#> <#1237#><TT>directional</TT><#1237#> <tex2html_verbatim_mark>#math53#<tex2html_image_mark>#tex2html_wrap_inline4667#⇧ 
  34. <BR>    Define a light source with the given intensity that is
  35.     defined to be in the given direction from every point
  36.     it illuminates.  The direction need not be normalized.
  37. </DD>
  38. </DL>
  39. <P>
  40. Point sources are defined as a single point in space.  They produce
  41. shadows with sharp edges and are a good replacement for extended
  42. and other computationally expensive light source.
  43.  
  44. <P>
  45. <DL>
  46. <DT><STRONG><#4668#><#4668#></STRONG></DT>
  47. <DD><#1241#><TT>light</TT><#1241#> <#1242#><EM>Intensity</EM><#1242#> <#1243#><TT>point</TT><#1243#> <tex2html_verbatim_mark>#math54#<tex2html_image_mark>#tex2html_wrap_inline4670#⇧ 
  48. <BR>    Place a point light source with the given intensity at the
  49.     given position.
  50. </DD>
  51. </DL>
  52. <P>
  53. Spotlights are useful for creating dramatic localized lighting effects.
  54. They are defined by their position, the direction in which they
  55. are pointing, and the width of the beam of light they produce.
  56.  
  57. <P>
  58. <DL>
  59. <DT><STRONG><#4671#><#4671#></STRONG></DT>
  60. <DD><#1247#><TT>light</TT><#1247#> <#1248#><EM>Intensity</EM><#1248#> <#1249#><TT>spot</TT><#1249#> <tex2html_verbatim_mark>#math55#<tex2html_image_mark>#tex2html_wrap_inline4673#⇧ <tex2html_verbatim_mark>#math56#<tex2html_image_mark>#tex2html_wrap_inline4675#⇧
  61.     <#1252#><I>α</I><#1252#> [ <tex2html_verbatim_mark>#math57#<I>θ</I><SUB>in</SUB> <tex2html_verbatim_mark>#math58#<I>θ</I><SUB>out</SUB> ] 
  62. <BR>    Place a spotlight at <tex2html_verbatim_mark>#math59#<tex2html_image_mark>#tex2html_wrap_inline4680#⇧, oriented as to be pointing at
  63.     <tex2html_verbatim_mark>#math60#<tex2html_image_mark>#tex2html_wrap_inline4682#⇧.  The intensity of the light falls off as
  64.     <tex2html_verbatim_mark>#math61#(<I>cosineθ</I>)<SUP><I>α</I></SUP>, where <I>θ</I> is the angle between the
  65.     spotlight's main axis and the vector from the spotlight to the
  66.     point being illuminated.  <tex2html_verbatim_mark>#math62#<I>θ</I><SUB>in</SUB> and
  67.     <tex2html_verbatim_mark>#math63#<I>θ</I><SUB>out</SUB> may be used to control the radius of the cone of light
  68.     produced by the spotlight.
  69. </DD>
  70. </DL><tex2html_verbatim_mark>#math64#<I>θ</I><SUB>in</SUB> is the the angle at which
  71. the light source begins to be attenuated.  At <tex2html_verbatim_mark>#math65#<I>θ</I><SUB>out</SUB>,
  72. the spotlight intensity is zero.
  73. This affords control
  74. over how ``fuzzy'' the edges of the spotlight are.  If neither angle
  75. is given, they both are effectively set to 180 degrees.
  76.  
  77. <P>
  78. Extended sources are meant to model spherical light sources.  Unlike
  79. point sources, extended sources actually possess a radius, and as such
  80. are capable or producing shadows with fuzzy edges (<#305#><EM>penumbrae</EM><#305#>).  If
  81. you do not specifically desire penumbrae in your image, use a point
  82. source instead.
  83.  
  84. <P>
  85. <DL>
  86. <DT><STRONG><#4689#><#4689#></STRONG></DT>
  87. <DD><#1257#><TT>light</TT><#1257#> <#1258#><EM>Intensity</EM><#1258#> <#1259#><TT>extended</TT><#1259#> <#1260#><EM>radius</EM><#1260#> <tex2html_verbatim_mark>#math66#<tex2html_image_mark>#tex2html_wrap_inline4691#⇧ 
  88. <BR>    Create an extended light source at the given position and with
  89.     the given <#312#><EM>radius</EM><#312#>.
  90. </DD>
  91. </DL>The shadows cast by
  92. extended sources are modeled by taking samples of the source at
  93. different locations on its surface.  When the source is partially
  94. hidden from a given point in space, that point is in partial shadow
  95. with respect to the extended source, and the sampling process is
  96. usually able to determine this fact.
  97.  
  98. <P>
  99. Quadrilateral light sources are computationally more expensive than extended
  100. light sources, but are more flexible and produce more realistic results.
  101. This is due to the fact that an area source is approximated by a
  102. number of point sources whose positions are jittered to reduce aliasing.
  103. Because each of these point sources has shading calculations performed
  104. individually, area sources may be placed relatively close to the
  105. objects it illuminates, and a reasonable image will result.
  106.  
  107. <P>
  108. <DL>
  109. <DT><STRONG><#4692#><#4692#></STRONG></DT>
  110. <DD><#1264#><TT>light</TT><#1264#> <#1265#><EM>Intensity</EM><#1265#> <#1266#><TT>area</TT><#1266#> <tex2html_verbatim_mark>#math67#<tex2html_image_mark>#tex2html_wrap_inline4694#⇧ <tex2html_verbatim_mark>#math68#<tex2html_image_mark>#tex2html_wrap_inline4696#⇧ <#1269#><EM>usamp</EM><#1269#>
  111.     <tex2html_verbatim_mark>#math69#<tex2html_image_mark>#tex2html_wrap_inline4698#⇧ <#1271#><EM>vsamp</EM><#1271#> 
  112. <BR>    Create a quadrilateral area light source.
  113.     The <I>u</I> axis
  114.     is defined by the vector from <tex2html_verbatim_mark>#math70#<tex2html_image_mark>#tex2html_wrap_inline4701#⇧ to <tex2html_verbatim_mark>#math71#<tex2html_image_mark>#tex2html_wrap_inline4703#⇧.  Along
  115.     this axis a total of <#325#><EM>usamp</EM><#325#> samples will be taken.
  116.     The <I>v</I> axis of the light source is defined by the vector
  117.     from <tex2html_verbatim_mark>#math72#<tex2html_image_mark>#tex2html_wrap_inline4706#⇧ to <tex2html_verbatim_mark>#math73#<tex2html_image_mark>#tex2html_wrap_inline4708#⇧.  Along this axis a total of
  118.     <#328#><EM>vsamp</EM><#328#> samples will be taken.
  119. </DD>
  120. </DL>The values of <#330#><EM>usamp</EM><#330#> and <#331#><EM>vsamp</EM><#331#> are usually chosen to be
  121. proportional to the lengths of the <I>u</I> and <I>v</I> axes.  Choosing a
  122. relatively high number of samples will result in a good approximation
  123. to a ``real'' quadrilateral source.  However, because complete
  124. lighting calculations are performed for each sample,
  125. the computational cost is directly proportional to the product
  126. of <#332#><EM>usamp</EM><#332#> and <#333#><EM>vsamp</EM><#333#>.
  127.  
  128. <P>
  129.