Export_3ds: Improved distance cue node search
[blender-addons.git] / render_povray / templates_pov / mediasky.pov
blob3c7d1d7ef32583294a8c639f1b0c5bffbba2b054
1 // This work is licensed under the Creative Commons Attribution-ShareAlike 3.0 Unported License.
2 // To view a copy of this license, visit http://creativecommons.org/licenses/by-sa/3.0/ or send a
3 // letter to Creative Commons, 444 Castro Street, Suite 900, Mountain View, California, 94041, USA.
5 // Persistence of Vision Raytracer Scene Description File
6 // File: mediasky.pov
7 // Author: Chris Huff
8 // Description: This file demonstrates the use of scattering media
9 // to create a sky with clouds. It attempts to simulate an actual
10 // atmosphere: there is an outer shell of media that scatters blue
11 // light, and an inner cloud shell that scatters white. The scattered
12 // light from the outer shell makes the sky appear blue, and the light
13 // that passes through is tinted orange by its passage, giving the
14 // clouds an orange color.
16 // Updated: 2013/02/15 for 3.7
18 // -w320 -h180
19 // +w640 +h360 +a0.3
20 // use 16:9 aspect ratio
22 //*******************************************
24 #version 3.7;
26 #include "colors.inc"
28 global_settings {
29 assumed_gamma 1.0
30 max_trace_level 5
33 #declare CamPos = <-5, 1,-25>;
35 camera {
36 location CamPos
37 up y
38 right x*image_width/image_height // keep proportions with any aspect ratio
39 look_at < 0, 7.5, 0>
40 angle 90
43 light_source {CamPos, color Gray30 media_interaction off}
44 //light_source {vrotate(z, <-1, 8, 0>)*500000, color rgb < 1, 0.8, 0.65>}
46 #declare SunPos = vrotate(z, <-12, 8, 0>)*1000000;
47 light_source {SunPos, color White*2}
48 sphere {SunPos, 75000
49 texture {
50 pigment {color White}
51 finish {ambient 10 diffuse 0}
53 no_shadow
57 #declare PlanetSize = 50000;
59 //the ocean
60 sphere {< 0, 0, 0>, 1
61 scale PlanetSize
62 translate -y*PlanetSize
63 hollow
64 texture {
65 // pigment {color rgb < 1, 1, 1>}
66 pigment {color rgbf < 1, 1, 1, 1>}
67 finish {
68 ambient 0 diffuse 0.7
69 reflection {0.5, 1
70 fresnel//use the fresnel form of angle-dependant reflection
71 metallic//use metallic reflection
73 conserve_energy
74 metallic//use metallic highlights
76 normal {bumps bump_size 0.075 scale < 4, 1, 1>*0.025}
78 interior {
79 ior 1.33//required for fresnel reflection
80 media {
81 method 3
82 samples 2 intervals 1
83 absorption color rgb < 0.75, 0.5, 0.25>*0.005
87 //the ocean floor
88 sphere {< 0, 0, 0>, 1
89 scale PlanetSize - 100
90 translate -y*PlanetSize
91 texture {
92 pigment {color rgb 1}
96 #macro SkyShell(minAlt, maxAlt, Int)
97 difference {
98 sphere {< 0, 0, 0>, 1 scale (PlanetSize + maxAlt)}
99 sphere {< 0, 0, 0>, 1 scale (PlanetSize + minAlt)}
100 hollow
101 texture {pigment {color rgbf 1}}
102 translate -y*PlanetSize
103 interior {Int}
105 #end
107 //A much more realistic sky could be done using multiple layers
108 //of clouds to simulate clouds of different densities and with
109 //different altitudes. Of course, this would render a lot slower...
111 //the "cloud shell", creates clouds.
112 SkyShell(1000, 1300,
113 interior {
114 media {
115 method 3 aa_threshold 0.1 aa_level 3
116 samples 4 intervals 1
117 scattering {2, color White*0.0075 extinction 1}
118 density {wrinkles
119 scale < 5, 2, 2>*200
120 warp {turbulence 2}
121 color_map {
122 [0 color rgb 1]
123 [0.5 color rgb 0.85]
124 [0.55 color rgb 0.035]
125 [1 color rgb 0.035]
129 /* media {
130 method 3
131 samples 2 intervals 1
132 scattering {2, color White*0.0075*0.015 extinction 1}
137 //the "atmosphere shell", creates the blue sky and orange light.
138 SkyShell(1001, 2200,
139 interior {
140 media {
141 method 3
142 samples 2 intervals 1
143 scattering {4, color rgb < 0.25, 0.6, 0.9>*0.00075 extinction 1}