POV-Ray : Newsgroups : povray.advanced-users : atmospheric scattering - blue skies Server Time
26 Nov 2024 06:58:50 EST (-0500)
  atmospheric scattering - blue skies (Message 1 to 10 of 10)  
From: janger
Subject: atmospheric scattering - blue skies
Date: 31 Oct 2000 15:31:25
Message: <39ff2c1d@news.povray.org>
Does anyone know of a way to model the sky using media, scattering etc to
create a blue sky? I'm not sure if it's possible. Basically I don't want to
use a sky sphere to mimic the sky, but try and create a 'true' atmosphere
which looks blue because of light scattering, and so I can make a 'sun'
which is way out in the distance, in scale with reality, and shines through
the atmosphere as happens in nature.


Post a reply to this message

From: Margus Ramst
Subject: Re: atmospheric scattering - blue skies
Date: 31 Oct 2000 15:37:21
Message: <39FF2D80.BDE761CA@peak.edu.ee>
janger wrote:
> 
> Does anyone know of a way to model the sky using media, scattering etc to
> create a blue sky? I'm not sure if it's possible. Basically I don't want to
> use a sky sphere to mimic the sky, but try and create a 'true' atmosphere
> which looks blue because of light scattering, and so I can make a 'sun'
> which is way out in the distance, in scale with reality, and shines through
> the atmosphere as happens in nature.

Wavelength-dependant scattering is not possible in POV (at least not yet). But
you should be able to simulate it well enough with regular scattering (or even
just emitting & absorbing) media, coloured appropriately.

-- 
Margus Ramst

Personal e-mail: mar### [at] peakeduee
TAG (Team Assistance Group) e-mail: mar### [at] tagpovrayorg


Post a reply to this message

From: janger
Subject: Re: atmospheric scattering - blue skies
Date: 31 Oct 2000 17:32:09
Message: <39ff4869@news.povray.org>
"Margus Ramst" <mar### [at] peakeduee> wrote in message
news:39FF2D80.BDE761CA@peak.edu.ee...
>
> Wavelength-dependant scattering is not possible in POV (at least not yet).
But
> you should be able to simulate it well enough with regular scattering (or
even
> just emitting & absorbing) media, coloured appropriately.
>
> --
> Margus Ramst
>
> Personal e-mail: mar### [at] peakeduee
> TAG (Team Assistance Group) e-mail: mar### [at] tagpovrayorg

Well, I am just trying to simulate it as good as possible. I don't get good
enough results with using a simple sky sphere.
I expected to accomplish my goal with a sphere containing a semi-transparent
pigment (layered with a blue pigment), and then add my clouds, but I just
can't get it to work properly. The reason I want to do this is to try and
model the earth (or any other planet), with all entities their correct size
and relative distance. For example, the earth with an atmosphere surrounding
it, so I can have cloud formations at the correct height, etc. Can I maybe
have a spherical shell ( a sphere with most of its insides removed with CSG
difference, or the inside replaced with my earth) containing cloud media,
and a transparent texture/pigment to "let in the sun"?
Maybe I'm trying to make a mountain out of a mole hill, that's often the
case with pov and I :)


Post a reply to this message

From: Mark Wagner
Subject: Re: atmospheric scattering - blue skies
Date: 1 Nov 2000 00:55:57
Message: <39ffb06d@news.povray.org>
janger wrote in message <39ff2c1d@news.povray.org>...
>Does anyone know of a way to model the sky using media, scattering etc to
>create a blue sky? I'm not sure if it's possible. Basically I don't want to
>use a sky sphere to mimic the sky, but try and create a 'true' atmosphere
>which looks blue because of light scattering, and so I can make a 'sun'
>which is way out in the distance, in scale with reality, and shines through
>the atmosphere as happens in nature.


I've been working on modifying POV-Ray to do this.  The (rather buggy)
source code for my first effort is available at
http://www.geocities.com/rengaw03/download/skypov.zip if anyone is willing
to spend the time trying to compile it.  Since something has added a bunch
of extra newlines to various files, I expect it will take about an hour to
get the source code to where it can be compiled.

I'll try to get a bug-free compiled version ready tomorrow, but I can't
guarentee anything.

Mark


Post a reply to this message

From: MikeH
Subject: Re: atmospheric scattering - blue skies
Date: 1 Nov 2000 01:14:20
Message: <39FFB45A.F729A606@aol.com>
> Well, I am just trying to simulate it as good as possible. I don't get good
> enough results with using a simple sky sphere.
> I expected to accomplish my goal with a sphere containing a semi-transparent
> pigment (layered with a blue pigment), and then add my clouds, but I just
> can't get it to work properly.

You'd get better results using a plane for your clouds.  The problem with your
thinking is that you are placing the viewpoint at the center of a sphere.  In
reality we are on the surface of a sphere surrounded by a slightly larger sphere
of air, so the sky appears largely flat.

Just something to consider.

-Mike


Post a reply to this message

From: Lutz-Peter Hooge
Subject: Re: atmospheric scattering - blue skies
Date: 1 Nov 2000 17:34:37
Message: <MPG.146ab8e679379197989684@news.povray.org>
> You'd get better results using a plane for your clouds.  The problem with your
> thinking is that you are placing the viewpoint at the center of a sphere.
So why not use a very big sphere?
something like sphere{<0,-100000,0>, 100500} 
when the camera near the origin.

Lutz-Peter


Post a reply to this message

From: Margus Ramst
Subject: Re: atmospheric scattering - blue skies
Date: 1 Nov 2000 19:16:57
Message: <3A00B27B.70B810F5@peak.edu.ee>
janger wrote:
> 
> Well, I am just trying to simulate it as good as possible. I don't get good
> enough results with using a simple sky sphere.

I usually create a plane or a large sphere to represent the ground, and a
slightly larger sphere to contain the atmosphere. The second sphere needs to be
hollow of course, in order for the atmospheric media to show up.
By using scattering media or a combination of emitting & absorbing media, you
will also get the natural darkening of the sky towards the zenith, since the
atmosphere is thinnest in that direction (relative to your viewpoint).

Here's a (very) crude example:

// This is the ground
sphere{
  -10000*y,10000
  texture{Whatever}
}

// The atmosphere
sphere{
  -10000*y,10500
  pigment{rgbf 1}
  interior{
    media{
      emission rgb <.5,.5,1>
      absorption rgb <1,1,.5>
    }
  }
  hollow
}

-- 
Margus Ramst

Personal e-mail: mar### [at] peakeduee
TAG (Team Assistance Group) e-mail: mar### [at] tagpovrayorg


Post a reply to this message

From: Nathan Kopp
Subject: Re: atmospheric scattering - blue skies
Date: 1 Nov 2000 21:30:39
Message: <3a00d1cf@news.povray.org>
"Margus Ramst" <mar### [at] peakeduee> wrote...
> janger wrote:
> >
> > Does anyone know of a way to model the sky using media, scattering etc
to
> > create a blue sky? I'm not sure if it's possible. Basically I don't want
to
> > use a sky sphere to mimic the sky, but try and create a 'true'
atmosphere
> > which looks blue because of light scattering, and so I can make a 'sun'
> > which is way out in the distance, in scale with reality, and shines
through
> > the atmosphere as happens in nature.
>
> Wavelength-dependant scattering is not possible in POV (at least not yet).
But
> you should be able to simulate it well enough with regular scattering (or
even
> just emitting & absorbing) media, coloured appropriately.

There seems to be a misconception here.  POV can do "almost" wavelength
dependent scattering.  The closest thing to wavelength in POV is color.  And
POV can _easily_ do color-dependent scattering.  That is as close as you'll
get until POV supports an arbritary division of the color spectrum, instead
of breaking it up into only three components (i.e. instead of using a
3-component RGB color vector, you might use a 7-component ROYGBIV color
vector).

That said, wavelength-dependent scattering can be simulated quite well using
POV.  It can even be simulates so well that simply moving the sun to the
horizon will produce nice shades of red, orange, and yellow for a sunset.
Different scattering colors can be used to achieve different sunset colors,
such as pinks and purples (this could be used to simulate different
atmospheric conditions, such as humidity and temperature).  Please see
"Scattering media sky" that I just posted in p.b.s-f.  Note that the
original code was created by somebody else, I only tweaked it.

-Nathan


Post a reply to this message

From: janger
Subject: Re: atmospheric scattering - blue skies
Date: 2 Nov 2000 00:00:56
Message: <3a00f508@news.povray.org>
Thanx for the feedback everyone. I'll give Nathan's example a go and see if
it's what I want. But I'm pretty sure it is what I'm after...

"janger" <d_j### [at] hotmailcom> wrote in message
news:39ff2c1d@news.povray.org...
> Does anyone know of a way to model the sky using media, scattering etc to
> create a blue sky? I'm not sure if it's possible. Basically I don't want
to
> use a sky sphere to mimic the sky, but try and create a 'true' atmosphere
> which looks blue because of light scattering, and so I can make a 'sun'
> which is way out in the distance, in scale with reality, and shines
through
> the atmosphere as happens in nature.
>
>


Post a reply to this message

From: Warp
Subject: Re: atmospheric scattering - blue skies
Date: 2 Nov 2000 11:28:16
Message: <3a01961f@news.povray.org>
Lutz-Peter Hooge <lpv### [at] gmxde> wrote:
: So why not use a very big sphere?
: something like sphere{<0,-100000,0>, 100500} 
: when the camera near the origin.

  You might get some accuracy problems with numbers that are too big.

-- 
main(i,_){for(_?--i,main(i+2,"FhhQHFIJD|FQTITFN]zRFHhhTBFHhhTBFysdB"[i]
):_;i&&_>1;printf("%s",_-70?_&1?"[]":" ":(_=0,"\n")),_/=2);} /*- Warp -*/


Post a reply to this message

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