POV-Ray : Newsgroups : povray.text.scene-files : Kevin Wampler's Cloud clode : Kevin Wampler's Cloud clode Server Time
28 Jul 2024 12:38:33 EDT (-0400)
  Kevin Wampler's Cloud clode  
From: Mick Hazelgrove
Date: 24 Aug 2000 14:42:46
Message: <39a56ca6@news.povray.org>
#version unofficial MegaPov 0.5;

#include "colors.inc"

global_settings
{
  assumed_gamma 1.0
  max_trace_level 255
}

// ----------------------------------------
#declare Image_Length = 640;
#declare Image_Height = 480;

camera
{
  location  <0.0, 0, -25.0>
  direction 1.5*z
  right Image_Length/Image_Height*x
  up.6
  look_at   <0.0, 5,  0.0>
}

sky_sphere
{
  pigment
  {
    gradient y turbulence .3 lambda 3
    color_map { [0.0 color rgb <0,.45,.65>] [1.0 color rgb 1] }
  }
}

light_source{<0, 93000000,0> color rgb<1,.9,.775/1.125> rotate z*-45 rotate
x*30} // change the highlight colour of the clouds

// ----------------------------------------

#declare R = seed(45376);
#declare Dfoff = 1.5;  file://was 1 higher bulks out clouds
#declare FS = 1.25; // .5 wispy 2 very solid default 1
#declare Int_F = 2; // should be 0 or 2 two more solid, rounder

#declare Cloud_form = function { pigment {
  blob {
    sphere { <0,0,0>, 10, FS density_function Int_F, Dfoff }
    sphere { <1,8,0>, 5, FS density_function Int_F, Dfoff }
    sphere { <0, 0, 0>, 8, FS density_function Int_F, Dfoff scale <1, .7, 1>
translate<6, 1, 1>}
    sphere { <0, 0, 0>, 6, FS density_function Int_F, Dfoff scale <1, .6, 1>
translate<10, 4, -2> }
    sphere { <0,0,0>, 13, FS density_function Int_F,Dfoff scale <1, .5, .6>
translate<-10, 3, 4> }
    threshold 0.075 file://varying this produces some interesting variations
0 to .05 to .2
        // 0 keeps media contained within the sphere?
    max_density 1//leave
  }
  color_map {
    [0 rgb 0]
    [1 rgb 1]// seems to break up cloud lower more broken up higher more
solid(no higher than 1.1)
  }
} }

#declare Cloud_turb = function { pigment {   file://Play with this to get
best cloud quality
  granite
  file://warp{turbulence .25 octaves 3 omega .7 lambda .3}
  color_map {
    [0 rgb 0]
    [.325 rgb .8] // .375generally keep above .325
    [1 rgb .5] file://play with
  }
  scale 15 // size of turbulence 10 to 25
} }

#declare Cloud1 = function { max(0, Cloud_form -.6*(1-Cloud_turb) ) }
file://#declare Cloud = function { min(Cloud1^.3, .07) } file://gives very
hard edges and shapes I havn't used

#declare Cloud_Mass =
intersection {
  box { <-20, -15, -20>, <20, 20, 20> } // you can control the shape of the
base of the clouds with this

  blob {
    sphere { <0,0,0>, 10, 1 }
    sphere { <1,8,0>, 5, 1 }
    sphere { <0, 0, 0>, 8, 1 scale <1, .7, 1> translate <6, 1, 1>}
    sphere { <0, 0, 0>, 6, 1 scale <1, .6, 1> translate <10, 4, -2> }
    sphere { <0,0,0>, 13, 1 scale <1, .5, .6> translate <-10, 3, 4> }
    threshold .001
  }

  texture { pigment { color rgbf 1 }}
  interior {
    media {
      method 2
      intervals 3  file://3 for final?
      scattering { 5, color rgb <.14,.15,.14> extinction .6}// eccentricity
.2 } file://changes colour of clouds raising extinction Darkens Clouds
      density {
        function { Cloud1 }
        color_map {
          [0  color rgb 0]
          [1  color rgb .05]//was 1 lightens the contrast, the bigger the
number the higher the contrast &
               file://the darker the base, more dramatic .01 whispy 1 too
dark 0.05 good .075 darker
        }
      }
    }
  }
  scale 30
  hollow
}
// Comment out for a single cloud use object{Cloud_Mass translate <0, 1200,
2500>}
#declare Xpos = -5000;
#declare Zpos = 15000;
#declare T = 0;

#while (Zpos>1000)

   #declare Xpos = -5000;

   #while(Xpos<5000)

  object{Cloud_Mass translate <Xpos, 1200, Zpos> rotate y*rand(R)*360}

   #declare Xpos = Xpos+275;
   #end

 #declare Zpos = Zpos-300;

#end


Post a reply to this message

Copyright 2003-2023 Persistence of Vision Raytracer Pty. Ltd.