camera { location -z look_at 0 } #declare LS = <-50000,50000,-50000>; light_source { LS rgb 1 } #declare Translate = 188; #declare Cast=.6; //The main shape of the clouds #declare Clouds1 = function { pigment { bozo color_map { [1-Cast rgb 0] [1-Cast rgb 1] } scale .25 translate Translate warp {turbulence .5 lambda 3} } } //The 'mask' of the clouds... where this pigment is black, there will be no clouds, where it's white, there will be clouds #declare Cloudsb = pigment { bozo color_map { [1-Cast rgb 0] [(1-Cast)+.1 rgb 1] } scale .25 translate Translate warp {turbulence .5 lambda 3} } // This function simulates the shading of the clouds #declare Clouds2 = function { pigment { bozo color_map { [1-Cast rgb 0] [1 rgb 1] } scale .25 translate Translate warp {turbulence .51 lambda 3} translate -vnormalize(LS)*.05 } } // multiply the main shape of the clouds with the shading of the clouds, in other words: apply the shading to the cloud-shapes #declare Clouds= function { Clouds1(x,y,z).gray * Clouds2(x,y,z).gray } union { // this is the visual part of the clouds, but it's not suited for shadows because of the hard edges... sphere {0, 1 pigment { // Because it's all fake, the applied shading 'bleeds' out of the shape of the clouds // That's why Cloudsb, the mask, is needed pigment_pattern {Cloudsb} pigment_map { [0 function{Clouds(x,y,z)} color_map { [0 rgb 3 transmit 1] [.01 rgb 1.5 transmit 1] [.1 rgb 1.125 transmit 1] [1 rgb .375 transmit 1] } ] [1 function{Clouds(x,y,z)} color_map { [0 rgb 3 transmit 1] [.01 rgb 1.5 transmit .25] [.1 rgb 1.125 transmit .125] [1 rgb .375 transmit .125] } ] } scale .75 } finish {ambient 1 diffuse 0} no_shadow } // This sphere is what casts semi-realistic shadows :) sphere { 0,1 pigment { pigment_pattern {function{Clouds2(x,y,z).gray}} color_map { [0 rgbt 1] [.25 rgb 1] } } no_image no_reflection } scale <1000,150,1000> translate -y*10 scale 5 hollow } // simple background :) background {rgb <.4,.5,.9>} fog { fog_type 2 distance 75 color rgb <.6,.7,1> transmit 0 fog_offset -1 fog_alt 2 } plane { y,-5 pigment {green 1} }