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

  1.  
  2. <H1><A ID="SECTION00910000000000000000">
  3. Texturing Functions</A>
  4. </H1>
  5.  
  6. <P>
  7. <DL>
  8. <DT><STRONG><#4982#><#4982#></STRONG></DT>
  9. <DD><#1477#><TT>blotch</TT><#1477#> <#1478#><EM>BlendFactor surface</EM><#1478#> 
  10. <BR>Produces a mildly interesting blotchy-looking surface.
  11. <#673#><EM>BlendFactor</EM><#673#> is used to control the interpolation between
  12. the default surface characteristics and the characteristics of
  13. the given surface.  A value of 0 results in a roughly 50-50 mix
  14. of the two surfaces.  Higher values result in a great portion of
  15. the default surface characteristics.
  16. </DD>
  17. </DL>
  18. <P>
  19. <DL>
  20. <DT><STRONG><#4983#><#4983#></STRONG></DT>
  21. <DD><#1481#><TT>bump</TT><#1481#> <#1482#><EM>scale</EM><#1482#> 
  22. <BR>Apply a random bump map.  The point of intersection is passed to
  23. <#678#><EM>DNoise()</EM><#678#>.
  24. The returned normalized vector is weighted by <#679#><EM>scale</EM><#679#>
  25. and the result is added to the normal vector at the point of intersection.
  26. </DD>
  27. </DL>Using an image texture applied to the ``bump'' component offers a more
  28. direct way to control the modification of surface normals (see below).
  29.  
  30. <P>
  31. <DL>
  32. <DT><STRONG><#4984#><#4984#></STRONG></DT>
  33. <DD><#1485#><TT>checker</TT><#1485#> ;SPMlt;<#1486#><EM>Surface</EM><#1486#>;SPMgt; 
  34. <BR>Applies a 3D checkerboard texture.  Every point that falls within an
  35. ``even'' unit cube will be assigned the characteristics of the named surface
  36. applied to it, while points that fall within ``odd'' cubes will have
  37. its usual surface characteristics.  Be wary of strange effects due
  38. to roundoff error that occur when a planar checkered surface lies
  39. in a plane of constant integral value (e.g., <I>z</I> = 0) in texture space.
  40. In such cases,
  41. simply translate the texture to ensure that the planar surface is not
  42. coincident with an integral plane in texture space
  43. (e.g., <#684#><TT>translate 0 0 0.1</TT><#684#>).
  44. </DD>
  45. </DL>
  46. <P>
  47. <DL>
  48. <DT><STRONG><#4988#><#4988#></STRONG></DT>
  49. <DD><#1489#><TT>cloud</TT><#1489#> <#1490#><EM>scale H <I>λ</I> octaves cthresh lthresh tscale</EM><#1490#> 
  50. <BR>    This texture is a variant on Geoff Gardner's ellipsoid-texturing
  51.     algorithm.  It should be applied to unit spheres centered
  52.     at the origin.  These spheres may, of course, be transformed
  53.     at will to form the appropriately-shaped cloud or tree.
  54.  
  55. <P>
  56. A sample of normalized <#689#><EM>fBm</EM><#689#> (see the <#690#><EM>fbm</EM><#690#> texture) is
  57.     generated
  58.     at the point of intersection.  This sample is used to
  59.     modulate the surface transparency.  The final transparency
  60.     if a function of the sample value, the
  61.     the proximity of the point of intersection to the edge of
  62.     the sphere (as seen from the ray origin), and three parameters
  63.     to control the overall ``density.''  The proximity of the point
  64.     to the sphere edge is determined by evaluating a <#691#><EM>limb</EM><#691#> function,
  65.     which varies from 0 on the limb to 1 at the center of the sphere.
  66. <P><tex2html_verbatim_mark>#math149#</P><DIV ALIGN="CENTER">
  67. <I>transp</I> = 1. - <tex2html_image_mark>#tex2html_wrap_indisplay4991#⇧
  68. </DIV><P></P>
  69. </DD>
  70. </DL>
  71. <P>
  72. <DL>
  73. <DT><STRONG><#4992#><#4992#></STRONG></DT>
  74. <DD><#1493#><TT>fbm</TT><#1493#> <#1494#><EM>offset scale H <I>λ</I> octaves thresh</EM><#1494#>
  75. [<#1495#><EM>colormap</EM><#1495#>] 
  76. <BR>Generate a sample of discretized fractional Brownian motion (fBm) and
  77. uses it to scale the diffuse and ambient component of an object's surface.
  78. <#699#><EM>Scale</EM><#699#> is used to scale the value
  79. returned by the fBm function.  <#700#><EM>Offset</EM><#700#> allows one to control the minimum
  80. value of the fBm function.  <#701#><EM>H</EM><#701#> is the <#702#><EM>Holder exponent</EM><#702#>
  81. used in the fBm function (a value of 0.5 works well).  <I>λ</I> is
  82. used to control <#703#><EM>lacunarity</EM><#703#>, and specifies the the frequency
  83. difference between successive samples of the fBm basis function (a
  84. value of 2.0 will suffice).  <#704#><EM>Octaves</EM><#704#> specifies the number of
  85. octaves (samples) to take of the fBm basis function (in this case, Noise()).
  86. Between five and seven octaves usually works well.  <#705#><EM>Thresh</EM><#705#> is used
  87. to specify a lower bound onthe output of the fBm function.  Any
  88. value lower than <#706#><EM>thresh</EM><#706#> is set to zero.
  89.  
  90. <P>
  91. If a <#707#><EM>colormap</EM><#707#> is named, a 256-entry colormap is read from the named
  92. file, and the sample of fBm is scaled by 255 and is used as an index into
  93. the colormap.  The resulting colormap entry
  94. is used to scale the ambient and diffuse components of the
  95. object's surface.
  96. </DD>
  97. </DL>
  98. <P>
  99. <DL>
  100. <DT><STRONG><#4995#><#4995#></STRONG></DT>
  101. <DD><#1498#><TT>fbmbump</TT><#1498#> <#1499#><EM>offset scale H <I>λ</I> octaves</EM><#1499#> 
  102. <BR>Similar to the <#712#><EM>fbm</EM><#712#> texture.  Rather than modifying the color of
  103. a surface, this texture acts as a bump map.
  104. </DD>
  105. </DL>
  106. <P>
  107. <DL>
  108. <DT><STRONG><#4997#><#4997#></STRONG></DT>
  109. <DD><#1502#><TT>gloss</TT><#1502#> <#1503#><EM>glossiness</EM><#1503#> 
  110. <BR>Gives reflective surfaces a glossy appearance. This texture perturbs
  111. the object's surface normal such that the normal ``samples'' a cone of
  112. unit height with radius <tex2html_verbatim_mark>#math150#1. - <I>glossiness</I>.  A value of 1 results
  113. in perfect mirror-like reflections, while a value of 0 results
  114. in extremely fuzzy reflections.  For best results, jittered sampling
  115. should be used to render scenes that make use of this texture.
  116. </DD>
  117. </DL>
  118. <P>
  119. <DL>
  120. <DT><STRONG><#4999#><#4999#></STRONG></DT>
  121. <DD><#1506#><TT>marble</TT><#1506#> [<#1507#><EM>colormap</EM><#1507#>] 
  122. <BR>Gives a surface a marble-like appearance.  The texture is implemented as
  123. roughly parallel alternating veins of marble, each of which is
  124. separated by 1/7 of a unit and runs perpendicular to the Z axis.
  125. If a colormap is named, the surface's ambient and diffuse colors
  126. will be scaled using the RGB values in the colormap.  If no colormap is
  127. given, the diffuse and ambient components are simply scaled by the
  128. value of the marble function.  One may transform the texture to
  129. control the density and orientation of the marble veins.
  130. </DD>
  131. </DL>
  132. <P>
  133. <DL>
  134. <DT><STRONG><#5000#><#5000#></STRONG></DT>
  135. <DD><#1510#><TT>sky</TT><#1510#> <#1511#><EM>scale H <I>λ</I> octaves cthresh ltresh</EM><#1511#> 
  136. <BR>    Similar to the <#725#><EM>fbm</EM><#725#> texture.  Rather than modifying the
  137.     color of a surface, this texture modulates its transparency.
  138.     <#726#><EM>cthresh</EM><#726#> is the value of the <#727#><EM>fBm</EM><#727#> function above
  139.     which the surface is totally opaque.  Below <#728#><EM>lthresh</EM><#728#>,
  140.     the surface is totally transparent.
  141. </DD>
  142. </DL>
  143. <P>
  144. <DL>
  145. <DT><STRONG><#5002#><#5002#></STRONG></DT>
  146. <DD><#1514#><TT>stripe</TT><#1514#> ;SPMlt;<#1515#><EM>Surface</EM><#1515#>;SPMgt; <#1516#><EM>size bump</EM><#1516#> ;SPMlt;Mapping;SPMgt; 
  147. <BR>    Apply a ``raised'' stripe pattern to the surface.
  148.     The surface properties used to color the stripe are those
  149.     of the given surface.  The width of the stripe, as compared
  150.     to the unit interval, is given by <#734#><EM>size</EM><#734#>.  The magnitude
  151.     of <#735#><EM>bump</EM><#735#> controls the extent to which the bump appears
  152.     to be displaced from the rest of the surface.  If negative,
  153.     the stripe will appear to
  154.     sink into the surface; if positive, it will appear to stand
  155.     out of the surface.
  156. </DD>
  157. </DL>Mapping functions are described below.
  158.  
  159. <P>
  160. <DL>
  161. <DT><STRONG><#5007#><#5007#></STRONG></DT>
  162. <DD><#1519#><TT>wood</TT><#1519#>  
  163. <BR>Gives a surface a wood-like appearance.  The feature size of this texture
  164. is approximately 0.01 of a unit, making it often necessary to
  165. scale the texture in order to achieve the desired appearance.
  166. </DD>
  167. </DL>
  168. <P>
  169.