home *** CD-ROM | disk | FTP | other *** search
/ Ray Tracing Box / RAY_CD.mdf / raytrace / _pov_dat / nbglas / nbglas.pov < prev    next >
Text File  |  1994-04-07  |  2KB  |  147 lines

  1. //NBglass demo file for povray 2.x
  2.  
  3. /*
  4. The Glass and Glass2 textures supplied in textures.inc
  5. work OK for spheres, but render too dark when applied
  6. to angular objects.  This file introduces a new texture,
  7. NBglass, which delivers consistent tonal values when
  8. applied to a variety of shapes.  Also demonstrates 3
  9. derived textures: NBoldglass, NBwinebottle, and 
  10. NBbeerbottle.
  11.  
  12. New textures are in front row.  Textures.inc textures
  13. Glass, Glass2, Glass3, and Green_Glass in back row.
  14.  
  15. Enjoy.  Norm Bowler, Richland WA
  16. */
  17.  
  18. //may want to increase max_trace_level if you
  19. //get display artifacts.
  20.  
  21.  
  22. //setup
  23. #include "colors.inc"
  24. #include "textures.inc"
  25.  
  26. camera {
  27.    location   <0, 4,-4>
  28.    direction  <0, 0, 1.75>
  29.    up         <0, 1, 0>
  30.    right      <4/3, 0, 0>
  31.    look_at    <0,.75,0>
  32. }
  33.  
  34. light_source {<0, 30, -10> color White}
  35.  
  36. default {
  37.   finish {ambient .2 diffuse .8}
  38. }
  39.  
  40. background {color White}
  41.  
  42. // ground plane 
  43. plane { y, 0
  44.   pigment {color Gray60}
  45. }
  46.  
  47. //test object -- take yr pick
  48. #declare TestObj=
  49.  
  50. /*
  51. sphere {<0,0,0>, .25
  52.   translate <0,.25,0>
  53. }
  54. */
  55.  
  56. box {
  57.   <-.25,0,0>,
  58.   <.25,.75,.25>
  59. }
  60.  
  61. /*
  62. cylinder {
  63.   <0,0,0>, 
  64.   <0,.75,0>, .25
  65. }
  66. */
  67.  
  68.  
  69. //textures.inc textures -- back row
  70.  
  71. object { TestObj
  72.   texture {Glass}
  73.   translate <-1.5,0,1.5>
  74. }
  75.  
  76. object { TestObj
  77.   texture {Glass2}
  78.   translate <-.5,0,1.5>
  79. }
  80.  
  81. object { TestObj
  82.   texture {Glass3}
  83.   translate <.5,0,1.5>
  84. }
  85.  
  86. object { TestObj
  87.   texture {Green_Glass}
  88.   translate <1.5,0,1.5>
  89. }
  90.  
  91. //norm's textures -- front row
  92.  
  93. #declare NBglass=
  94.   texture {
  95.     pigment {color green 1 blue .99 red .98 filter .75}
  96.     finish{
  97.       ambient 0.1
  98.       diffuse 0.1
  99.       reflection .25
  100.       refraction 1
  101.       ior 1.5
  102.       specular 1
  103.       roughness .001
  104.     }
  105.   }
  106.  
  107. #declare NBoldglass=
  108.   texture { NBglass
  109.     pigment {color green .9 blue .85 red .8 filter .85}
  110.   }
  111.  
  112. #declare NBwinebottle=
  113.   texture { NBglass
  114.     pigment {color red .4 green .72 blue .4 filter .6}
  115.   }
  116.  
  117. #declare NBbeerbottle=
  118.   texture { NBglass
  119.     pigment {color red .7 green .5 blue .1 filter .6}
  120.   }
  121.  
  122. //glass
  123. object { TestObj
  124.   translate <-1.5,0,0>
  125.   texture { NBglass
  126.   }
  127. }
  128.  
  129. //old glass
  130. object { TestObj
  131.   translate <-.5,0,0>
  132.   texture { NBoldglass}
  133. }
  134.  
  135. //wine bottle
  136. object { TestObj
  137.   texture { NBwinebottle}
  138.   translate <.5,0,0>
  139. }
  140.  
  141. //beer bottle
  142. object { TestObj
  143.   texture { NBbeerbottle}
  144.   translate <1.5,0,0>
  145. }
  146.  
  147.