home *** CD-ROM | disk | FTP | other *** search
/ Amiga MA Magazine 1998 #7 / amigamamagazinepolishissue1998.iso / varia / povray3 / povray3_040 / pov3demo / atmos / atmos1.pov next >
Text File  |  1997-12-12  |  4KB  |  153 lines

  1. // Persistence Of Vision raytracer version 3.0 sample file.
  2. // File by Dieter Bayer
  3. // Atmospheric environment with spotlights.
  4.  
  5. #version 3.0
  6. global_settings { assumed_gamma 2.2 }
  7.  
  8. camera {
  9.   location <10, 6, -20>
  10.   right <4/3, 0, 0>
  11.   up <0, 1, 0>
  12.   direction <0, 0, 1.5>
  13.   look_at <3, 4, 0>
  14. }
  15.  
  16. //
  17. // Declare the various atmospheres. 
  18. //
  19. // Note the different reflectivities due to the different scattering models.
  20. //
  21.  
  22. //
  23. // Atmosphere with isotropic scattering (independent of incident light). 
  24. //
  25.  
  26. #declare Atmosphere1 = atmosphere {
  27.   type 1
  28.   samples 20        // Number of samples in first distance interval
  29.   distance 20       // Atmosphere density, similar to fog
  30.   scattering 0.3    // Reflectivity of atmosphere, determines brightness
  31.   aa_level 8        // Level of binary subdivision in case of aa
  32.   aa_threshold 0.1  // Threshold for aa to push in
  33.   jitter 0.2        // Amount of sample jittering
  34. }
  35.  
  36. //
  37. // Atmosphere with Mie cattering, hazy atmosphere (dependent of incident light). 
  38. //
  39.  
  40. #declare Atmosphere2 = atmosphere {
  41.   type 2
  42.   samples 20        // Number of samples in first distance interval
  43.   distance 20       // Atmosphere density, similar to fog
  44.   scattering 1.2    // Reflectivity of atmosphere, determines brightness
  45.   aa_level 8        // Level of binary subdivision in case of aa
  46.   aa_threshold 0.1  // Threshold for aa to push in
  47.   jitter 0.2        // Amount of sample jittering
  48. }
  49.  
  50. //
  51. // Atmosphere with Mie scattering, murky atmosphere (dependent of incident light). 
  52. //
  53.  
  54. #declare Atmosphere3 = atmosphere {
  55.   type 3
  56.   samples 20        // Number of samples in first distance interval
  57.   distance 20       // Atmosphere density, similar to fog
  58.   scattering 1.5    // Reflectivity of atmosphere, determines brightness
  59.   aa_level 8        // Level of binary subdivision in case of aa
  60.   aa_threshold 0.1  // Threshold for aa to push in
  61.   jitter 0.2        // Amount of sample jittering
  62. }
  63.  
  64. //
  65. // Atmosphere with Rayleigh scattering (dependent of incident light). 
  66. //
  67.  
  68. #declare Atmosphere4 = atmosphere {
  69.   type 4
  70.   samples 20        // Number of samples in first distance interval
  71.   distance 20       // Atmosphere density, similar to fog
  72.   scattering 0.6    // Reflectivity of atmosphere, determines brightness
  73.   aa_level 8        // Level of binary subdivision in case of aa
  74.   aa_threshold 0.1  // Threshold for aa to push in
  75.   jitter 0.2        // Amount of sample jittering
  76. }
  77.  
  78. //
  79. // Use atmosphere. 
  80. //
  81.  
  82. atmosphere { Atmosphere1 }
  83.  
  84. //
  85. // Light source not interacting with the atmosphere. 
  86. //
  87.  
  88. light_source { <0, 15, 0> color red .7 green .7 blue .7 atmosphere off }
  89.  
  90. //
  91. // Spotlights pointing at balls. 
  92. //
  93.  
  94. light_source { 
  95.   <-10, 15, -5> color red 1 green .3 blue .3
  96.   spotlight
  97.   point_at <-5, 5, 0>
  98.   radius 10
  99.   falloff 15
  100.   tightness 1
  101.   atmospheric_attenuation on
  102. }
  103.  
  104. light_source { 
  105.   <-5, 15, -5> color red .3 green 1 blue .3 
  106.   spotlight
  107.   point_at <0, 5, 0>
  108.   radius 10
  109.   falloff 15
  110.   tightness 1
  111.   atmospheric_attenuation on
  112. }
  113.  
  114. light_source { 
  115.   <0, 15, -5> color red .3 green .3 blue 1 
  116.   spotlight
  117.   point_at <5, 5, 0>
  118.   radius 10
  119.   falloff 15
  120.   tightness 1
  121.   atmospheric_attenuation on
  122. }
  123.  
  124. //
  125. // Room. 
  126. //
  127.  
  128. box { <-20, 0, -20>, <20, 20, 20>
  129.   pigment { color red 1 green 1 blue 1 }
  130.   finish { ambient 0.2 diffuse 0.5 }
  131.   hollow
  132. }
  133.  
  134. //
  135. // Balls. 
  136. //
  137.  
  138. sphere { <-5, 5, 0>, 1
  139.   pigment { color red 1 green 1 blue 1 }
  140.   finish { ambient 0.3 diffuse 0.7 phong 1 }
  141. }
  142.  
  143. sphere { <0, 5, 0>, 1
  144.   pigment { color red 1 green 1 blue 1 }
  145.   finish { ambient 0.3 diffuse 0.7 phong 1 }
  146. }
  147.  
  148. sphere { <5, 5, 0>, 1
  149.   pigment { color red 1 green 1 blue 1 }
  150.   finish { ambient 0.3 diffuse 0.7 phong 1 }
  151. }
  152.  
  153.