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

  1.  
  2. <H1><A ID="SECTION00810000000000000000">
  3. Surface Description</A>
  4. </H1>
  5.  
  6. <P>
  7. A surface definition consists of a number of component keywords, each
  8. of which is usually followed by either a single number or a red-green-blue
  9. color triple.   Each of the values in the color triple are normalized,
  10. with zero indicating zero intensity, and one indicating full intensity.
  11.  
  12. <P>
  13. If any surface component is left unspecified, its value defaults to zero,
  14. with the exception of the index of refraction, which is assigned the
  15. default index of refraction (normally 1.0).
  16.  
  17. <P>
  18. Surface descriptions are used in <#548#><#1969#><EM>rayshade</EM><#1969#><#548#> to compute the color of a ray
  19. that strikes the surface at a point <tex2html_verbatim_mark>#math129#<tex2html_image_mark>#tex2html_wrap_inline4912#⇧. The normal to the surface
  20. at <tex2html_verbatim_mark>#math130#<tex2html_image_mark>#tex2html_wrap_inline4914#⇧, <tex2html_verbatim_mark>#math131#<tex2html_image_mark>#tex2html_wrap_inline4916#⇧, is also computed.
  21.  
  22. <P>
  23. <DL>
  24. <DT><STRONG><#4917#><#4917#></STRONG></DT>
  25. <DD><#1401#><TT>ambient</TT><#1401#> <tex2html_verbatim_mark>#math132#<tex2html_image_mark>#tex2html_wrap_inline4919#⇧ 
  26. <BR>    Use the given <#555#><EM>color</EM><#555#> to approximate those surface-surface 
  27.     interactions (e.g., diffuse interreflection) not modeled by the
  28.     ray tracing process.
  29. </DD>
  30. </DL>A surface's ambient color is always applied to a ray.  The color
  31. applied is computed by multiplying the ambient color by the intensity
  32. of the ambient light source.
  33.  
  34. <P>
  35. If <tex2html_verbatim_mark>#math133#<tex2html_image_mark>#tex2html_wrap_inline4921#⇧ is in shadow with respect to a given light source,
  36. that light source makes no contribution to the shading of <tex2html_verbatim_mark>#math134#<tex2html_image_mark>#tex2html_wrap_inline4923#⇧.
  37.  
  38. <P>
  39. <DL>
  40. <DT><STRONG><#4924#><#4924#></STRONG></DT>
  41. <DD><#1405#><TT>diffuse</TT><#1405#> <tex2html_verbatim_mark>#math135#<tex2html_image_mark>#tex2html_wrap_inline4926#⇧ 
  42. <BR>    Specifies the diffuse color.
  43. </DD>
  44. </DL>The diffuse contribution from each non-shadowed light source at <tex2html_verbatim_mark>#math136#<tex2html_image_mark>#tex2html_wrap_inline4928#⇧
  45. is equal to the diffuse color of the surface scaled by the cosine of
  46. the angle between <tex2html_verbatim_mark>#math137#<tex2html_image_mark>#tex2html_wrap_inline4930#⇧
  47. and the vector from <tex2html_verbatim_mark>#math138#<tex2html_image_mark>#tex2html_wrap_inline4932#⇧ to the light source.
  48.  
  49. <P>
  50. <DL>
  51. <DT><STRONG><#4933#><#4933#></STRONG></DT>
  52. <DD><#1409#><TT>specular</TT><#1409#> <tex2html_verbatim_mark>#math139#<tex2html_image_mark>#tex2html_wrap_inline4935#⇧ 
  53. <BR>    Specifies the base color of specular reflections.
  54. </DD>
  55. </DL>
  56. <P>
  57. <DL>
  58. <DT><STRONG><#4936#><#4936#></STRONG></DT>
  59. <DD><#1413#><TT>specpow</TT><#1413#> <#1414#><EM>exponent</EM><#1414#> 
  60. <BR>    Controls the size of the specular highlight. The larger
  61.     the <#573#><EM>exponent</EM><#573#>, the smoother the apparent finish.
  62. </DD>
  63. </DL>The intensity of specular highlights from light sources are
  64. scaled by the specular color of the surface.
  65.  
  66. <P>
  67. <DL>
  68. <DT><STRONG><#4937#><#4937#></STRONG></DT>
  69. <DD><#1417#><TT>reflect</TT><#1417#> <#1418#><EM>reflectivity</EM><#1418#> 
  70. <BR>    Specifies the specular reflectivity of the surface.  If non-zero,
  71.     reflected rays will be spawned.
  72. </DD>
  73. </DL>The intensity of specularly reflected rays will be proportional to
  74. the specular color of the surface scaled by the reflectivity.
  75.  
  76. <P>
  77. <DL>
  78. <DT><STRONG><#4938#><#4938#></STRONG></DT>
  79. <DD><#1421#><TT>transp</TT><#1421#> <#1422#><EM>transparency</EM><#1422#> 
  80. <BR>    Specifies the specular transmissivity of the surface.  If
  81.     non-zero,
  82.     transmitted (refracted) rays will be spawned.
  83. </DD>
  84. </DL>
  85. <P>
  86. <DL>
  87. <DT><STRONG><#4939#><#4939#></STRONG></DT>
  88. <DD><#1425#><TT>body</TT><#1425#> <tex2html_verbatim_mark>#math140#<tex2html_image_mark>#tex2html_wrap_inline4941#⇧ 
  89. <BR>    Specifies the body color of the object.  The body color
  90.     affects the color of rays that are transmitted through the
  91.     object.
  92. </DD>
  93. </DL>
  94. <P>
  95. <DL>
  96. <DT><STRONG><#4942#><#4942#></STRONG></DT>
  97. <DD><#1429#><TT>extinct</TT><#1429#> <#1430#><EM>coefficient</EM><#1430#> 
  98. <BR>    Specifies the extinction coefficient of the interior
  99.     of the object.
  100. </DD>
  101. </DL>The extinction coefficient is raised to a power equal to the distance
  102. the transmitted ray travels through the object.
  103. The overall intensity of specularly transmitted rays will be proportional to
  104. this factor multiplied by the surface's body color
  105. multiplied by the transparency of the object.
  106.  
  107. <P>
  108. <DL>
  109. <DT><STRONG><#4943#><#4943#></STRONG></DT>
  110. <DD><#1433#><TT>index</TT><#1433#> <#1434#><EM>N</EM><#1434#> 
  111. <BR>    Specifies the index of refraction.  The default value is equal
  112.     to the index of refraction of the atmosphere surrounding the eye.
  113. </DD>
  114. </DL>
  115. <P>
  116. <DL>
  117. <DT><STRONG><#4944#><#4944#></STRONG></DT>
  118. <DD><#1437#><TT>translucency</TT><#1437#> <#1438#><EM>translu</EM><#1438#> <tex2html_verbatim_mark>#math141#<tex2html_image_mark>#tex2html_wrap_inline4946#⇧ <#1440#><EM>stexp</EM><#1440#> 
  119. <BR>    Specifies the translucency, diffusely transmitted color,
  120.     and Phong exponent for transmitted specular highlights.
  121. </DD>
  122. </DL>If a light source illuminates a translucent surface from the side opposite
  123. that from which a ray approaches, illumination computations are performed,
  124. using the given color as the surface's diffuse color, and the given
  125. exponent as the Phong highlight exponent.  The resulting color is then
  126. scaled by the surface's translucency.
  127.  
  128. <P>
  129.