home *** CD-ROM | disk | FTP | other *** search
/ ANews 3 / AnewsCD3.iso / atari / GRAPHX / POV / 68030.060 / POV31G30 / POVRAY_3.1G / INCLUDE / SKIES.INC < prev    next >
Text File  |  1999-10-30  |  8KB  |  341 lines

  1. #ifdef(Skies_Inc_Temp)
  2. // do nothing
  3. #else
  4. #declare Skies_Inc_Temp = version;
  5.  
  6. #ifdef(View_POV_Include_Stack)
  7. #   debug "including skies.inc\n"
  8. #end
  9.  
  10. /*
  11.  
  12.               Persistence of Vision Raytracer Version 3.1
  13.  
  14.   Contents:
  15.     Pigments:    (building blocks for the stuff below)
  16.     P_Cloud1     pigment layer, contains clear regions.  Use with background.
  17.     P_Cloud2     pigment layer, contains clear regions.  Use with background.
  18.     P_Cloud3     pigment layer, contains clear regions.  Use with background.
  19.  
  20.     SkySpheres:
  21.     S_Cloud1     sky_sphere, uses P_Cloud2.
  22.     S_Cloud2     sky_sphere  uses P_Cloud2.
  23.     S_Cloud3     sky_sphere  uses P_Cloud3.
  24.     S_Cloud4     sky_sphere  uses P_Cloud3.
  25.     S_Cloud5     sky_sphere.  Opaque.
  26.  
  27.     Textures:
  28.     T_Cloud1     2-layer texture using P_Cloud1 pigment, contains clear regions.
  29.     T_Cloud2     1-layer texture, contains clear regions.
  30.     T_Cloud3     2-layer texture, contains clear regions.
  31.  
  32.     Objects:
  33.     O_Cloud1     sphere, radius 10000 with T_Cloud1 texture.
  34.     O_Cloud2     union of 2 planes, with T_Cloud2 and T_Cloud3.
  35.  
  36. */
  37.  
  38. #declare P_Cloud1 =
  39. pigment {
  40.     bozo
  41.     turbulence 0.65
  42.     octaves 6
  43.     omega 0.7
  44.     lambda 2
  45.     color_map {
  46.         [0.0, 0.1   color red 0.85 green 0.85 blue 0.85
  47.                     color red 0.75 green 0.75 blue 0.75]
  48.         [0.1, 0.5   color red 0.75 green 0.75 blue 0.75
  49.                     color Clear]
  50.         [0.5, 1.001 color Clear
  51.                     color Clear]
  52.     }
  53.     scale <6, 1, 6>
  54. }
  55.  
  56. #declare P_Cloud2 =
  57. pigment {
  58.     wrinkles
  59.     turbulence 0.65
  60.     octaves 6
  61.     omega 0.7
  62.     lambda 2
  63.     color_map {
  64.         [0.0, 0.1   color red 0.85 green 0.85 blue 0.85
  65.                     color red 0.75 green 0.75 blue 0.75]
  66.         [0.1, 0.5   color red 0.75 green 0.75 blue 0.75
  67.                     color rgb <0.258, 0.258, 0.435>  ]
  68.         [0.5, 1.001 color rgb <0.258, 0.258, 0.435>
  69.                     color rgb <0.258, 0.258, 0.435> ]
  70.     }
  71.     scale <6, 1, 6>
  72. }
  73. #declare P_Cloud3 =
  74. pigment {
  75.     bozo
  76.     color_map {
  77.         [0.0, 0.1   color red 0.85 green 0.85 blue 0.85
  78.                     color red 0.55 green 0.60 blue 0.65]
  79.         [0.1, 0.5   color red 0.55 green 0.60 blue 0.65
  80.                     color rgb <0.184, 0.184, 0.309> ]
  81.         [0.5, 1.001 color rgb <0.184, 0.184, 0.309>
  82.                     color rgb <0.1, 0.1, 0.2>]
  83.     }
  84.     turbulence 0.65
  85.     octaves 6
  86.     omega 0.707
  87.     lambda 2
  88.     scale <6, 4, 6>
  89. }
  90.  
  91. #declare P_Cloud4 =
  92. pigment {
  93.     wrinkles
  94.     turbulence 0.1
  95.     lambda 2.2
  96.     omega 0.707
  97.     color_map {
  98.         [0.20 SkyBlue * 0.85 ]
  99.         [0.50 White ]
  100.         [1.00 Gray70 ]
  101.     }
  102.     scale <0.5, 0.15, 1>
  103. }
  104.  
  105. #declare S_Cloud1 =
  106. sky_sphere {
  107.     pigment {
  108.         gradient y
  109.         pigment_map {
  110.             [0.01 rgb <0.847, 0.749, 0.847> ] // horizon
  111.             [0.25 P_Cloud2 scale 0.25 rotate z*5]
  112.             [0.60 P_Cloud3 scale <0.25, 0.15, 0.25> rotate z*10]
  113.         }
  114.     }
  115. }
  116.  
  117. #declare S_Cloud2 =
  118. sky_sphere {
  119.     pigment {
  120.         gradient y
  121.         pigment_map {
  122.             [0.00 rgb <0.847, 0.749, 0.847> ] // horizon
  123.             [0.10 SkyBlue ]                   // horizon
  124.             [0.20 P_Cloud4 ]
  125.         }
  126.     }
  127. }
  128.  
  129. #declare S_Cloud3 =
  130. sky_sphere {
  131.     pigment {
  132.         gradient y
  133.         pigment_map {
  134.             [0.10 rgb <0.258, 0.258, 0.435> ]
  135.             [0.25 P_Cloud2 scale 0.15 ]
  136.         }
  137.     }
  138. }
  139.  
  140. #declare S_Cloud4 =
  141. sky_sphere {
  142.     pigment {
  143.         gradient y
  144.         pigment_map {
  145.             [0.00 rgb <0.184, 0.184, 0.309> ]
  146.             [0.15 P_Cloud3 scale <0.05, 0.40, 0.05> rotate z*30 ]
  147.             [0.45 P_Cloud3 scale <0.25, 0.15, 0.50> ]
  148.         }
  149.     }
  150. }
  151.  
  152.  
  153. #declare S_Cloud5 =
  154. sky_sphere {
  155.     pigment { rgb <0.258, 0.258, 0.435> }
  156.     pigment {
  157.         bozo
  158.         turbulence 1.5
  159.         octaves 10
  160.         omega .5
  161.         lambda 2.5
  162.         color_map {
  163.             [0.0, 0.5 color rgbf<.75, .75, .75, 0>
  164.                       color rgbf<.9, .9, .9, .9> ]
  165.             [0.5, 0.7 color rgbf<.9, .9, .9, .9>
  166.                       color rgbf<1, 1, 1, 1> ]
  167.             [0.7, 1.0 color rgbf<1, 1, 1, 1>
  168.                       color rgbf<1, 1, 1, 1> ]
  169.         }
  170.     scale <1, 0.3, 10>
  171.     }
  172.     pigment {
  173.         bozo
  174.         turbulence 0.6
  175.         octaves 10
  176.         omega .5
  177.         lambda 2.5
  178.         color_map {
  179.             [0.0, 0.4 color rgbf<.75, .75, .75, 0>
  180.                       color rgbf<.9, .9, .9, .9> ]
  181.             [0.4, 0.7 color rgbf<.9, .9, .9, .9>
  182.                       color rgbf<1, 1, 1, 1> ]
  183.             [0.7, 1.0 color rgbf<1, 1, 1, 1>
  184.                       color rgbf<1, 1, 1, 1> ]
  185.         }
  186.     scale <1, 0.3, 10>
  187.     }
  188.     pigment {
  189.         bozo
  190.         turbulence 0.8
  191.         octaves 10
  192.         omega .5
  193.         lambda 2.5
  194.         color_map {
  195.             [0.0, 0.4 color rgbf<.75, .75, .75, 0>
  196.                       color rgbf<.9, .9, .9, .9> ]
  197.             [0.4, 0.6 color rgbf<.9, .9, .9, .9>
  198.                       color rgbf<1, 1, 1, 1> ]
  199.             [0.6, 1.0 color rgbf<1, 1, 1, 1>
  200.                       color rgbf<1, 1, 1, 1> ]
  201.         }
  202.     scale <1, 0.3, 10>
  203.     }
  204. }
  205.  
  206.  
  207. // ***********************************
  208. //  Bill Pulver's FBM Clouds
  209. // A three-layer cloud texture.
  210. // ***********************************
  211. #declare T_Cloud1 =
  212. texture {                              // The upper part of the clouds
  213.     pigment {
  214.         P_Cloud1
  215.     }
  216.     finish {
  217.         ambient 1.0
  218.         diffuse 0
  219.     }
  220. }
  221. texture {                              // The darker underside of the clouds
  222.     pigment {
  223.         P_Cloud1
  224.         translate -0.15*y
  225.     }
  226.     finish {
  227.         ambient 0.6
  228.         diffuse 0
  229.     }
  230. }
  231.  
  232. // T_Cloud1 mapped onto a sphere
  233. #declare O_Cloud1 =
  234. sphere { <0,0,0>, 10000
  235.     texture {
  236.         T_Cloud1
  237.         scale 1000
  238.     }
  239. }
  240.  
  241. // ***********************************
  242. //  Darin Dugger's "Kite" clouds
  243. // ***********************************
  244. #declare T_Cloud2 =
  245. texture {
  246.     pigment {
  247.         bozo
  248.         turbulence 1.5
  249.         octaves 10
  250.         omega .5
  251.         lambda 2.5
  252.         color_map {
  253.             [0.0, 0.5 color rgbf<.75, .75, .75, 0>
  254.                       color rgbf<.9, .9, .9, .9> ]
  255.             [0.5, 0.7 color rgbf<.9, .9, .9, .9>
  256.                       color rgbf<1, 1, 1, 1> ]
  257.             [0.7, 1.0 color rgbf<1, 1, 1, 1>
  258.                       color rgbf<1, 1, 1, 1> ]
  259.         }
  260.     }
  261.  
  262.     finish {
  263.         ambient 0.9
  264.         diffuse 0.1
  265.     }
  266. }
  267.  
  268. #declare T_Cloud3 =
  269. texture {
  270.     pigment {
  271.         bozo
  272.         turbulence 0.8 //0.6
  273.         octaves 10
  274.         omega .5
  275.         lambda 2.5
  276.         color_map {
  277.             [0.0, 0.4 color rgbf<.75, .75, .75, 0>
  278.                       color rgbf<.9, .9, .9, .9> ]
  279.             [0.4, 0.7 color rgbf<.9, .9, .9, .9>
  280.                       color rgbf<1, 1, 1, 1> ]
  281.             [0.7, 1.0 color rgbf<1, 1, 1, 1>
  282.                       color rgbf<1, 1, 1, 1> ]
  283.         }
  284.     }
  285.     finish {
  286.         ambient 1.0
  287.         diffuse 0.0
  288.     }
  289. }
  290. texture {
  291.     pigment {
  292.         bozo
  293.         turbulence 0.8 //0.6
  294.         octaves 10
  295.         omega .5
  296.         lambda 2.5
  297.         color_map {
  298.             [0.0, 0.4 color rgbf<.75, .75, .75, 0>
  299.                       color rgbf<.9, .9, .9, .9> ]
  300.             [0.4, 0.6 color rgbf<.9, .9, .9, .9>
  301.                       color rgbf<1, 1, 1, 1> ]
  302.             [0.6, 1.0 color rgbf<1, 1, 1, 1>
  303.                       color rgbf<1, 1, 1, 1> ]
  304.         }
  305.     }
  306.     finish {
  307.         ambient 0.95
  308.         diffuse 0.0
  309.     }
  310. scale .9
  311. translate y*-0.15
  312. }
  313.  
  314.  
  315.  
  316.  
  317.  
  318. // Darin Dugger's DD_Cloud_Sky texture mapped onto a pair of planes
  319. // NOTE: Lowest plane is at y=500
  320. #declare O_Cloud2 =
  321. union {
  322.     plane { y, 500
  323.         texture {
  324.             T_Cloud3
  325.             scale 600
  326.         }
  327.     }
  328.     plane { y, 3000
  329.         texture {
  330.             T_Cloud2
  331.             scale <900,1,6000>
  332.             translate x*3000
  333.             rotate -30*y
  334.