home *** CD-ROM | disk | FTP | other *** search
/ Amiga MA Magazine 1998 #7 / amigamamagazinepolishissue1998.iso / varia / povray3 / povray3_fpu / pov3demo / atmos / atmos5.pov < prev    next >
Text File  |  1997-12-12  |  3KB  |  131 lines

  1. //
  2. // Persistence Of Vision raytracer version 3.0 sample file.
  3. //
  4. // This scene shows the effect of a partially transparent image
  5. // map inside an atmopshere.
  6. //
  7.  
  8. #version 3.0
  9.  
  10. global_settings { assumed_gamma 2.2 }
  11.  
  12. camera {
  13.   location <0, 3, -10>
  14.   look_at <0, -0.5, 0>
  15.   angle 13
  16. }
  17.  
  18. //
  19. // Declare the various atmospheres. 
  20. //
  21. // Note the different reflectivities due to the different scattering models.
  22. //
  23.  
  24. //
  25. // Atmosphere with isotropic scattering (independent of incident light). 
  26. //
  27.  
  28. #declare Atmosphere1 = atmosphere {
  29.   type 1
  30.   samples 10        // Number of samples in first distance interval
  31.   distance 50       // Atmosphere density, similar to fog
  32.   scattering 0.8    // Reflectivity of atmosphere, determines brightness
  33.   aa_level 5        // Level of binary subdivision in case of aa
  34.   aa_threshold 0.1  // Threshold for aa to push in
  35.   jitter 0.1        // Amount of sample jittering
  36. }
  37.  
  38. //
  39. // Atmosphere with Mie cattering, hazy atmosphere (dependent of incident light). 
  40. //
  41.  
  42. #declare Atmosphere2 = atmosphere {
  43.   type 2
  44.   samples 10        // Number of samples in first distance interval
  45.   distance 50       // Atmosphere density, similar to fog
  46.   scattering 1.0    // Reflectivity of atmosphere, determines brightness
  47.   aa_level 5        // Level of binary subdivision in case of aa
  48.   aa_threshold 0.1  // Threshold for aa to push in
  49.   jitter 0.1        // Amount of sample jittering
  50. }
  51.  
  52. //
  53. // Atmosphere with Mie scattering, murky atmosphere (dependent of incident light). 
  54. //
  55.  
  56. #declare Atmosphere3 = atmosphere {
  57.   type 3
  58.   samples 10        // Number of samples in first distance interval
  59.   distance 50       // Atmosphere density, similar to fog
  60.   scattering 1.0    // Reflectivity of atmosphere, determines brightness
  61.   aa_level 5        // Level of binary subdivision in case of aa
  62.   aa_threshold 0.1  // Threshold for aa to push in
  63.   jitter 0.1        // Amount of sample jittering
  64. }
  65.  
  66. //
  67. // Atmosphere with Rayleigh scattering (dependent of incident light). 
  68. //
  69.  
  70. #declare Atmosphere4 = atmosphere {
  71.   type 4
  72.   samples 10        // Number of samples in first distance interval
  73.   distance 50       // Atmosphere density, similar to fog
  74.   scattering 0.8    // Reflectivity of atmosphere, determines brightness
  75.   aa_level 5        // Level of binary subdivision in case of aa
  76.   aa_threshold 0.1  // Threshold for aa to push in
  77.   jitter 0.1        // Amount of sample jittering
  78. }
  79.  
  80. //
  81. // Use atmosphere. 
  82. //
  83.  
  84. atmosphere { Atmosphere1 }
  85.  
  86. //
  87. // A shadowless light source that does not interact with the atmosphere.
  88. //
  89.  
  90. light_source { <100, 100, -100> color rgb 0.3 atmosphere off shadowless }
  91.  
  92. //
  93. // A spotlight pointing at the image map.
  94. //
  95.  
  96. light_source { 
  97.   <0, 5, 0> 
  98.   color rgb 1 
  99.   spotlight 
  100.   point_at <0, 0, 0>
  101.   falloff 10
  102.   radius 8
  103. }
  104.  
  105. //
  106. // The partially translucent image map.
  107. //
  108.  
  109. polygon {
  110.   5, <-1, -1, 0>, <1, -1, 0>, <1, 1, 0>, <-1, 1, 0>, <-1, -1, 0>
  111.   pigment { 
  112.     image_map { 
  113.       gif "test.gif" 
  114.       once 
  115.       interpolate 4 
  116.       transmit 5, 1 
  117.     } 
  118.     translate <-0.5, -0.5, 0> 
  119.   }
  120.   scale 2
  121.   rotate 90*x
  122.   hollow
  123. }
  124.  
  125. //
  126. // The ground. 
  127. //
  128.  
  129. plane { y, -1 pigment { color rgb 1 } hollow }
  130.  
  131.