//******************* // A cloudy media sky // By Juha Leppälä //******************* // The SkyShell macro is from scenes/advanced/mediasky.pov also atmosphere // is somewhat straight from the same place so some kudos to Chris Huff :). // Hope you can make some sense of this. Also notice that I've already // messed with the settings so you won't get the exact pic from b.p.i. // I think the light_source was a bit lower and closer (too close). // // I used these settings +h475 +w1102 +a0.1 // but notice that it took ~5.5 h with my 1.4GHz Athlon // Anyway, have fun #include "functions.inc" global_settings { max_trace_level 20 assumed_gamma 1.0} #declare PRad=100000; #declare s_Clouds=on; #declare s_Atmosphere=on; #declare s_Land=on; #declare s_Water=on; #declare s_Fog=on; #declare s_Media_Quality=1; light_source { 0 rgb <1,1,0.97> translate <60*PRad,50*PRad,300*PRad> } camera { up y right 2.32*x location <0,500,0> look_at <0,500,100> } light_source { <0,500,0> rgb 0.4 shadowless media_attenuation off media_interaction off} #macro SkyShell(minAlt, maxAlt, Int) difference { sphere {< 0, 0, 0>, 1 scale (PRad + maxAlt)} sphere {< 0, 0, 0>, 1 scale (PRad + minAlt)} hollow texture {pigment {color rgbf 1}} translate -y*PRad interior {Int} } #end #if(s_Clouds) SkyShell( 1000,1150, interior { media { #switch(s_Media_Quality) #case(0) samples 1 #break #case(1) samples 10,30 #break #end intervals 1 scattering { 2, rgb 0.0075*2 } density { wrinkles warp { turbulence 0.4 omega 0.7 lambda 3} scale PRad*0.12 warp { turbulence 0.5 octaves 3 lambda 4 omega 0.9} color_map {[0 rgb 0][0.5 rgb 0][0.6 rgb 0.5][0.75 rgb 0.8][1 rgb 1]} } } } ) #end #if(s_Atmosphere) object { SkyShell( 1001,2400, interior { media { samples 1 intervals 1 scattering {4, color rgb < 0.1, 0.35, 0.6>*0.0002 extinction 1} } } ) no_shadow } #end #if(s_Fog) SkyShell( 0.00001,999, interior { media { samples 1 intervals 1 scattering { 4, color rgb 0.00005*<0.65,0.8,1> } } } ) #end #declare F1= function { pigment { bozo turbulence 0.2 color_map {[0 rgb 1][ 1 rgb 0]} scale 0.1 } } #declare F2= function { pigment { bozo turbulence 0.5 color_map {[0 rgb 0][ 1 rgb 1]} scale 0.3 } } #declare Grass= texture { pigment { bozo color_map {[0 rgb <0.2549, 0.47843, 0.09412>][1 rgb <0.125,0.26,0.03>]} scale 0.005} } #declare Sand= texture { pigment { granite scale 0.0001 color_map {[0 rgb <0.83922, 0.67843, 0.53333>][1 rgb <0.83922, 0.67843, 0.53333>*0.8]} } normal { waves 1 scale 0.05 no_bump_scale} } #if(s_Land) isosurface { function { x*x+y*y+z*z-1+0.04*F1(x,y,z).gray-0.04*F2(x,y,z).gray } max_gradient 2.778 contained_by { sphere { <0,0,0>,2 } } texture { spherical texture_map {[0 Grass][0.0079 Grass][0.0092 Sand]} scale 1.01} scale PRad rotate 112 translate <0,-PRad,0> } #end #if(s_Water) sphere { <0,-PRad,0>, PRad*0.9999 pigment { rgbf <1,1,1,1> } finish { diffuse 0 reflection { 0,1 fresnel } conserve_energy specular 0.9 roughness 0.03} interior { ior 1.33 fade_power 1000 fade_distance 20 } normal { function { f_ridged_mf(x,y,z,0.05,2.8,6,0.7,0.9,3) } 2 scale 6 no_bump_scale } } #end