Advertisement
GlobalLiquidity

POV-Ray Sunset Script

Jan 29th, 2023
1,846
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. // Persistence Of Vision raytracer version 1.0 sample file.
  2.  
  3. // By David Buck
  4.  
  5. #include "colors.inc"
  6.  
  7. camera {
  8.    location <0.0  10.0  200.0>
  9.    direction <0.0  0.0  -1.0>
  10.    up <0.0  1.0  0.0>
  11.    right <1.333333 0.0 0.0>
  12.    look_at <0.0  130.0  -300.0>
  13. }
  14.  
  15. /* Define the ocean surface */
  16. object {
  17.    plane { <0.0  1.0  0.0> -10.0 }
  18.  
  19.    texture {
  20.       colour red 1.0 green 0.3
  21.       waves 0.05
  22.       frequency 5000.0
  23.       scale <3000.0 3000.0 3000.0>
  24.       reflection 1.0
  25.    }
  26.    colour red 1.0 green 0.3
  27. }
  28.  
  29. /* Put a floor underneath to catch any errant waves from the ripples */
  30. object {
  31.    plane { <0.0  1.0  0.0> -11.0 }
  32.    texture {
  33.       0.05
  34.       colour red 1.0 green 0.3
  35.       ambient 1.0
  36.       diffuse 0.0
  37.    }
  38.    colour red 1.0 green 0.3
  39. }
  40.  
  41. /* Now draw the sky */
  42. object {
  43.    sphere { <0.0  0.0  0.0> 400.0 }
  44.  
  45.    texture {
  46.       gradient <0.0  1.0  0.0>
  47.       colour_map { [0.0 0.8  colour red 1.0 green 0.3 blue 0.0
  48.                            colour red 0.7 green 0.7 blue 1.0]
  49.                  [0.8 1.0 colour red 0.7 green 0.7 blue 1.0
  50.                           colour red 0.7 green 0.7 blue 1.0]
  51.       }
  52.       scale <400.0  400.0  400.0>
  53.       ambient 0.7
  54.       diffuse 0.0   /* we don't want clouds casting shadows on the sky */
  55.    }
  56.    colour red 0.7  green 0.7 blue 1.0
  57. }
  58.  
  59. /* Put in a few clouds */
  60. object {
  61.    sphere { <0.0  0.0  0.0> 259.0 }
  62.  
  63.    texture {
  64.       bozo
  65.       turbulence 0.5
  66.       colour_map {
  67.           [0.0 0.6  colour red 1.0 green 1.0 blue 1.0 alpha 1.0
  68.                     colour red 1.0 green 1.0 blue 1.0 alpha 1.0]
  69.           [0.6 0.8 colour red 1.0 green 1.0 blue 1.0 alpha 1.0
  70.                     colour red 1.0 green 1.0 blue 1.0]
  71.           [0.8 1.001 colour red 1.0 green 1.0 blue 1.0
  72.                      colour red 0.8 green 0.8 blue 0.8]
  73.       }
  74.       scale <100.0  20.0  100.0>
  75.       rotate <0 20 0>
  76.       ambient 0.7
  77.       diffuse 0.0
  78.    }
  79.    colour red 0.7 green 0.7 blue 1.0
  80. }
  81.  
  82. /* Now to cast some light on the subject */
  83. object {
  84.    union {
  85.       sphere { <0 0 0 > 40
  86.          texture {
  87.             colour red 1.0 green 0.6 alpha 0.35
  88.             ambient 1.0
  89.             diffuse 0.0
  90.         }
  91.       }
  92.       light_source { <0  0  0>  colour White }
  93.    }
  94.     translate <0 60 -300>
  95. }
  96.  
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement