POV-Ray : Newsgroups : povray.binaries.images : clouds Server Time
1 Oct 2024 13:16:40 EDT (-0400)
  clouds (Message 1 to 6 of 6)  
From: Kevin Wampler
Subject: clouds
Date: 23 Aug 2000 16:12:35
Message: <39A42EB0.97D01B8A@u.arizona.edu>
This is in response to a message in povray.general by Mick Hazelgrove
about realistic clouds.  This was originally intended to be part of an
entry of mine for the IRTC, but I stopped working on it when I got
sidetracked by other projects.  It's still quite rough (for instance,
bottoms of the clouds suck, but I think that I know how to fix that) and
I had intended to add more cloud layers, but it still may be useful.
Megapov was required to render this image.  The bottom of the image is
black because the ocean that goes there was commented out to improve
rendering time.


Post a reply to this message


Attachments:
Download 'clouds.jpg' (12 KB)

Preview of image 'clouds.jpg'
clouds.jpg


 

From: Mick Hazelgrove
Subject: Re: clouds
Date: 23 Aug 2000 18:07:14
Message: <39a44b12@news.povray.org>
Interesting, definately has possibilities. Are you going to let us in how it
was done?

Mick

"Kevin Wampler" <wam### [at] uarizonaedu> wrote in message
news:39A42EB0.97D01B8A@u.arizona.edu...
> This is in response to a message in povray.general by Mick Hazelgrove
> about realistic clouds.  This was originally intended to be part of an
> entry of mine for the IRTC, but I stopped working on it when I got
> sidetracked by other projects.  It's still quite rough (for instance,
> bottoms of the clouds suck, but I think that I know how to fix that) and
> I had intended to add more cloud layers, but it still may be useful.
> Megapov was required to render this image.  The bottom of the image is
> black because the ocean that goes there was commented out to improve
> rendering time.
>


----------------------------------------------------------------------------
----


Post a reply to this message

From: Kevin Wampler
Subject: Re: clouds
Date: 23 Aug 2000 18:46:54
Message: <39A452DB.74C4FD24@u.arizona.edu>
Sorry that I forgot to tell how I did it.  Basically, the clouds are built using
Megapov's blob function.  This lets you build the general shape very precisely.
The more details forms are from a granite pattern which I subtracted from the
blob pattern.  Next, for realistic looking results, the cloud needs to be a more
or less constant density inside.  I do this by clipping the maximum value
allowed for the blob function at a very low value, then multiplying it by a
large value (or raising the scattering intensity) to compensate.  This gives the
cloud a sharp edge, but still lets light shine through it reasonably well.  This
method has the advantage that it lets you create a cloud with any basic shape
you wish, while allowing you to not worry about it's more detailed structure.
Since the granite pattern is subtracted from the blob pattern, the resulting
shape is contained entirely within the original blob pattern (provided the
threshold is set to 0).  This means that you can speed up rendering quite a bit
by bounding the media with the appropriate blob.  Unfortunately, it can still
take quite a bit of tinkering to get it to look just so.  In case I am not
explaining myself well, here it the relevant code.

#declare Cloud_form = function { pigment {
  blob {
    sphere { <0,0,0>, 10, 1 density_function 0, 1 }
    sphere { <1,8,0>, 5, 1 density_function 0, 1 }
    sphere { <0, 0, 0>, 8, 1 density_function 0, 1 scale <1, .7, 1> translate
<6, 1, 1>}
    sphere { <0, 0, 0>, 6, 1 density_function 0, 1 scale <1, .6, 1> translate
<10, 4, -2> }
    sphere { <0,0,0>, 13, 1 density_function 0, 1 scale <1, .5, .6> translate
<-10, 3, 4> }
    threshold 0
    max_density 1
  }
  color_map {
    [0 rgb 0]
    [1 rgb 1]
  }
} }

#declare Cloud_turb = function { pigment {
  granite
  color_map {
    [0 rgb 0]
    [.5 rgb 1]
    [1 rgb 1]
  }
  scale 15
} }

#declare Cloud1 = function { max(0, Cloud_form-.6*(1-Cloud_turb) ) }
#declare Cloud = function { min(Cloud1^.3, .07) }

intersection {
  box { <-20, 0, -20>, <20, 20, 20> }

  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 rgbt 1 } }
  interior {
    media {
      method 2
      intervals 3
      scattering { 5, color rgb 1/5 extinction 1 eccentricity .2 }
      density {
        function { Cloud }
        color_map {
          [0  color rgb 0]
          [1  color rgb 1]
        }
      }
    }
  }
  scale 45
  translate <50, 200, 2500>
  hollow
}

Mick Hazelgrove wrote:

> Interesting, definately has possibilities. Are you going to let us in how it
> was done?
>
> Mick
>
> "Kevin Wampler" <wam### [at] uarizonaedu> wrote in message
> news:39A42EB0.97D01B8A@u.arizona.edu...
> > This is in response to a message in povray.general by Mick Hazelgrove
> > about realistic clouds.  This was originally intended to be part of an
> > entry of mine for the IRTC, but I stopped working on it when I got
> > sidetracked by other projects.  It's still quite rough (for instance,
> > bottoms of the clouds suck, but I think that I know how to fix that) and
> > I had intended to add more cloud layers, but it still may be useful.
> > Megapov was required to render this image.  The bottom of the image is
> > black because the ocean that goes there was commented out to improve
> > rendering time.
> >
>
> ----------------------------------------------------------------------------
> ----


Post a reply to this message

From: Tom Melly
Subject: Re: clouds
Date: 24 Aug 2000 11:52:43
Message: <39a544cb$1@news.povray.org>
"Kevin Wampler" <wam### [at] uarizonaedu> wrote in message
news:39A452DB.74C4FD24@u.arizona.edu...

>     sphere { <0,0,0>, 10, 1 density_function 0, 1 }

What is density_function ? I can't find any reference in the docs.


Post a reply to this message

From: Chris Huff
Subject: Re: clouds
Date: 24 Aug 2000 12:23:04
Message: <chrishuff-1FCFA3.11242924082000@news.povray.org>
In article <39a544cb$1@news.povray.org>, "Tom Melly" 
<tom### [at] tomandlucouk> wrote:

> What is density_function ? I can't find any reference in the docs.

It *is* documented: Section 8.3.1 "Blob pattern & pigment" of the 
MegaPOV 0.5 docs. It specifies the falloff function to use for the blob 
pattern components.

-- 
Christopher James Huff
Personal: chr### [at] maccom, http://homepage.mac.com/chrishuff/
TAG: chr### [at] tagpovrayorg, http://tag.povray.org/

<><


Post a reply to this message

From: Tom Melly
Subject: Re: clouds
Date: 24 Aug 2000 16:36:51
Message: <39a58763@news.povray.org>
Many thanks.

--
Tom Melly
tom### [at] tomandlucouk
http://www.tomandlu.co.uk


Post a reply to this message

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