POV-Ray : Newsgroups : povray.binaries.images : Another Cloud Scene Server Time
14 Nov 2024 14:19:43 EST (-0500)
  Another Cloud Scene (Message 1 to 3 of 3)  
From: FlaPovFan
Subject: Another Cloud Scene
Date: 30 Apr 2009 02:15:01
Message: <web.49f9418a2b08e069472ff940@news.povray.org>
Another cloud scene using blobs.  The idea of layered media is not original to
me; it was used in a pov-ray media tutorial someplace I've forgotten.

I think the clouds look relatively nuanced and natural and the scene renders
quickly.  I'm posting my convuluted code for the scene in the hope that someone
more knowledgeable can improve it and maybe use it in a macro.





#include "functions.inc"
                                                 #include "colors.inc"

#declare Cloud=

#declare SD=seed(11235);

blob {
 threshold 13.9106
 #declare index=0;
 #while(index<17)
  sphere {<rand(SD),1.7*rand(SD),.5*rand(SD)>,4*rand(sin (radians
(SD*2)))*2,2+sin(radians(SD))
translate <-1.36,1.1,.5>  rotate 4*sin(radians (index*SD))    }
  #declare index=index+1.34;
 #end


hollow no_shadow
  texture { pigment { rgbt 1 } }
  interior {
    media { emission 8 method 3 samples 30,30 intervals 1
      density { spherical
        warp { turbulence .75*.3+.05 lambda 2.75 }
        density_map {
          [1-.99*.75 rgb <0,0,0>]
          [1-.99*.77 rgb <max(0,1-.75*1.5),max(0,1-.75*4.5),max(0,1-.75*6)>]
          [1 rgb <.55,.55,.50>] }
      }
    }
    media { absorption 2 method 3 samples 30,30 intervals 1
      density { spherical
        warp { turbulence .75*.3+.05 lambda 2.75 }
        density_map {
          [1-.99*.75 rgb <0,0,0>]
          [1-.99*.75 rgb <max(0,1-.75*1.5),max(0,1-.75*4.5),max(0,1-.75*6)>]
          [1 rgb <.75,.25,0>] }
      }           density {gradient z}
    }

    media { scattering { 5 .25 eccentricity .5 extinction .8} method 3 samples
30,30 intervals 1
      density { spherical
        warp { turbulence.75*.3+.05 lambda 2.75 omega 4 }
        density_map {
          [1-.99*.75 rgbt 0]
          [1-.99*.75 rgbt 1]
          [1-.49*.75 rgbt 1]
          [1-.49*.75 rgb 0]
         }
      }   density {gradient z  scale 1.6}
    }
    media { absorption 3 method 3 samples 30,30 intervals 1
      density { spherical
        warp { turbulence .75*.3+.05 lambda 2.75 }
        density_map {
          [1-.99*.75 rgb 0 ]
          [1-.99*.75 rgb  1]
          [1-.49*.75 rgb  1]
          [1-.49*.75 rgb 0 ]
        }
      }         density {gradient z scale 13 translate <5,1,-25>}        density
{spherical scale 6.9  translate -5*z}
    }
  }
}




#declare Cloud2=

object {Cloud scale 1.7*z scale 1.4*y scale 1*x}

object {Cloud2 scale <3.5,2.2,2.3>*1.3 rotate -15.5 rotate -26*x rotate -5*z
translate <-.16,-1.3,-.2> }

object {Cloud2 scale <3,2.4,2.4>*1.3 rotate -18 rotate -21*x rotate 6*y rotate
0*z translate <2.7,-1.7,-.2>}




//Ocean

#include "glass.inc"
 #include "glass.inc"
 #declare Sea = texture
{
  pigment
  {
    colour rgbft<0.198,1.355,1.296,1.8,.01>*.2
  }
  normal
  {
    waves 0.2
      frequency 1000
      scale 6000 scale 2.02*y
      }

  finish {
    diffuse 0.62
    brilliance 1.5
    specular 0.66    roughness 0.04
    phong 0.2    phong_size 175
    reflection .45
    ambient <0,2,.7>*.2
    refraction 1    ior 1.333
  }
}


plane { y, -5.3
      texture { Sea }

rotate 182*y
}

light_source {
  0*x
  color rgb <1,1,1>
  translate <-20, 40, -20>
}

camera {
  location <0,0,-5>
  look_at <0,0,0>
}

sky_sphere {
  pigment {
  bumps    scale 2
   // gradient y
    color_map {
      [0.0 color rgb<0.8, 1.0, 1.0>*.5]
        [.6 color rgb<0.0, 0.5, 1.0>*.85]
      [1.0 color rgb<0.0, 0.5, 1.0>*.85]
    }
  }

   pigment { bozo turbulence 0.35 octaves 6 omega 0.7 lambda 2
   color_map {
   [0.0 0.1 color rgb <0.85, 0.85, 0.85>  color rgb <0.75, 0.75, 0.75>]
   [0.1 0.5 color rgb <0.75, 0.75, 0.75>  color rgbt <1, 1, 1, 1>]
   [0.5 1.0 color rgbt <1, 1, 1, 1>  color rgbt <1, 1, 1, 1>] }
   scale <0.6, 0.5, .2>  } rotate 35*x }


Post a reply to this message


Attachments:
Download 'two nice clouds.png' (290 KB)

Preview of image 'two nice clouds.png'
two nice clouds.png


 

From: Thomas de Groot
Subject: Re: Another Cloud Scene
Date: 30 Apr 2009 03:49:39
Message: <49f95813@news.povray.org>
"FlaPovFan" <nomail@nomail> schreef in bericht 
news:web.49f9418a2b08e069472ff940@news.povray.org...
>    media { emission 8 method 3 samples 30,30 intervals 1

As you use method 3 (default) with intervals 1, samples after the comma are 
not read; samples 30 suffices.

Nice clouds by the way.

Thomas


Post a reply to this message

From: Warp
Subject: Re: Another Cloud Scene
Date: 30 Apr 2009 04:15:52
Message: <49f95e38$1@news.povray.org>
FlaPovFan wrote:
> sky_sphere {
>   pigment {
>   bumps    scale 2
>    // gradient y
>     color_map {
>       [0.0 color rgb<0.8, 1.0, 1.0>*.5]
>         [.6 color rgb<0.0, 0.5, 1.0>*.85]
>       [1.0 color rgb<0.0, 0.5, 1.0>*.85]
>     }
>   }

  Regardless of what the documentation mistakenly implies, sky_sphere is
*not* intended to be used for cloud textures. It just doesn't look good
(because it's physically completely incorrect; the camera is not at the
center of the Earth).

  Just use sky_sphere for a color gradient from light blue (at the
horizon) to dark blue (at the zenith).


Post a reply to this message

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