POV-Ray : Newsgroups : povray.general : Counter-intuitive behaviour in media scattering Server Time
29 Jul 2024 14:15:25 EDT (-0400)
  Counter-intuitive behaviour in media scattering (Message 1 to 6 of 6)  
From: Anthony D  Baye
Subject: Counter-intuitive behaviour in media scattering
Date: 24 May 2011 14:40:00
Message: <web.4ddbfaff21a005969c4fb0ad0@news.povray.org>
I'm trying to create a planet with an atmosphere.  I'm using modified code
provided in my thread in p.b.i.

from what I understand, from discussions, intuition and reading the docs,
scattering specifies the type, color and amount of light diffused by the media:
Thus, a scattering of

scattering { 1, <0.3, 0.17, 0.05>*0.005 }

should scatter very little light, allowing most of the light to reach the
planet's surface, while

scattering { 1, <0.3, 0.17, 0.05>*5 }

should scatter 1000 times as much, allowing very little to reach the planet's
surface.

I have, however, observed the reverse for all scattering methods, where the
first is opaque, as if the planet was shrouded in fog, and the second is mostly
transparent, but not at all what it seems I should be getting.

My media statement looks like this:

media {
     method 3
     intervals 1
     scattering {
          4, <0.3, 0.17, 0.05>*1.618
          extinction 1.0
          }
     samples 300
     absorption rgb <0.95, 0.55, 0.15>*0.05
     density {
          function {exp( -(sqrt(x*x+y*y+z*z)-63870)/4 )}
          density_map {
               [0 rgb 0.0]
               [1 rgb 0.1]
               }
          }
     }

This gives me a transparent atmosphere with a cast to the planet and heavy haze
at the terminator.

altering the scattering as in the first example gives a planet shrouded in fog.

I would post images, but they take hours to render.

any help would be appreciated.

Regards,
A.D.B.


Post a reply to this message

From: Alain
Subject: Re: Counter-intuitive behaviour in media scattering
Date: 25 May 2011 13:03:43
Message: <4ddd366f@news.povray.org>

> I'm trying to create a planet with an atmosphere.  I'm using modified code
> provided in my thread in p.b.i.
>
> from what I understand, from discussions, intuition and reading the docs,
> scattering specifies the type, color and amount of light diffused by the media:
> Thus, a scattering of
>
> scattering { 1,<0.3, 0.17, 0.05>*0.005 }
>
> should scatter very little light, allowing most of the light to reach the
> planet's surface, while
>
> scattering { 1,<0.3, 0.17, 0.05>*5 }
>
> should scatter 1000 times as much, allowing very little to reach the planet's
> surface.
>
> I have, however, observed the reverse for all scattering methods, where the
> first is opaque, as if the planet was shrouded in fog, and the second is mostly
> transparent, but not at all what it seems I should be getting.
>
> My media statement looks like this:
>
> media {
>       method 3
>       intervals 1
>       scattering {
>            4,<0.3, 0.17, 0.05>*1.618
>            extinction 1.0
>            }
>       samples 300
>       absorption rgb<0.95, 0.55, 0.15>*0.05
>       density {
>            function {exp( -(sqrt(x*x+y*y+z*z)-63870)/4 )}

You should use pow(x,2) instead of x*x. It's a little bit faster.

>            density_map {
>                 [0 rgb 0.0]
>                 [1 rgb 0.1]
>                 }
>            }
>       }
>
> This gives me a transparent atmosphere with a cast to the planet and heavy haze
> at the terminator.
>
> altering the scattering as in the first example gives a planet shrouded in fog.
>
> I would post images, but they take hours to render.
>
> any help would be appreciated.
>
> Regards,
> A.D.B.
>
>
>

What's the ambient value for your planet? Try setting it to zero.

I realy think that you should get rid of that extra absorbtion. A redish 
cast on the planet is normal.
If needed, alter the light's colour to make it a little bluish.

Alain


Post a reply to this message

From: Anthony D  Baye
Subject: Re: Counter-intuitive behaviour in media scattering
Date: 25 May 2011 14:50:00
Message: <web.4ddd4f3d31a010029c4fb0ad0@news.povray.org>
Alain <aze### [at] qwertyorg> wrote:

> > I'm trying to create a planet with an atmosphere.  I'm using modified code
> > provided in my thread in p.b.i.
> >
> > from what I understand, from discussions, intuition and reading the docs,
> > scattering specifies the type, color and amount of light diffused by the media:
> > Thus, a scattering of
> >
> > scattering { 1,<0.3, 0.17, 0.05>*0.005 }
> >
> > should scatter very little light, allowing most of the light to reach the
> > planet's surface, while
> >
> > scattering { 1,<0.3, 0.17, 0.05>*5 }
> >
> > should scatter 1000 times as much, allowing very little to reach the planet's
> > surface.
> >
> > I have, however, observed the reverse for all scattering methods, where the
> > first is opaque, as if the planet was shrouded in fog, and the second is mostly
> > transparent, but not at all what it seems I should be getting.
> >
> > My media statement looks like this:
> >
> > media {
> >       method 3
> >       intervals 1
> >       scattering {
> >            4,<0.3, 0.17, 0.05>*1.618
> >            extinction 1.0
> >            }
> >       samples 300
> >       absorption rgb<0.95, 0.55, 0.15>*0.05
> >       density {
> >            function {exp( -(sqrt(x*x+y*y+z*z)-63870)/4 )}
>
> You should use pow(x,2) instead of x*x. It's a little bit faster.
>
> >            density_map {
> >                 [0 rgb 0.0]
> >                 [1 rgb 0.1]
> >                 }
> >            }
> >       }
> >
> > This gives me a transparent atmosphere with a cast to the planet and heavy haze
> > at the terminator.
> >
> > altering the scattering as in the first example gives a planet shrouded in fog.
> >
> > I would post images, but they take hours to render.
> >
> > any help would be appreciated.
> >
> > Regards,
> > A.D.B.
> >
> >
> >
>
> What's the ambient value for your planet? Try setting it to zero.
>
> I realy think that you should get rid of that extra absorbtion. A redish
> cast on the planet is normal.
> If needed, alter the light's colour to make it a little bluish.
>
> Alain

The planet is using my default pigment for now.

default {
    pigment { White }
    finish { ambient 0.0 diffuse 0.6 }
    }

anyway.  I realize that a reddish cast at the terminator is normal. But I'm not
talking about the terminator here.  I'm talking about the entire surface of the
planet being distinctly red.  Blue objects look closer to grey and the landmass,
which is white, looks blue at lower altitudes.

I'm also still getting a fresnel-like ring effect that gets denser as it moves
outward.  I think it's actually on the surface, rather than in the atmosphere,
but it's definitely caused by the atmosphere.  It only appears on the oceans,
though, which may have something to do with the fact that they are smooth, and
don't diffuse the light much at low angles.

I'll try removing the absorption.

A.D.B.


Post a reply to this message

From: clipka
Subject: Re: Counter-intuitive behaviour in media scattering
Date: 25 May 2011 16:11:00
Message: <4ddd6254$1@news.povray.org>
Am 24.05.2011 20:38, schrieb Anthony D. Baye:

> any help would be appreciated.

I tried your settings, but don't see the effects you describe. Maybe a 
more complete scene will help, for instance your choice of media 
container or placement of light source may have an influence.


Post a reply to this message

From: Thomas de Groot
Subject: Re: Counter-intuitive behaviour in media scattering
Date: 26 May 2011 03:57:36
Message: <4dde07f0@news.povray.org>
"Alain" <aze### [at] qwertyorg> schreef in bericht 
news:4ddd366f@news.povray.org...
> You should use pow(x,2) instead of x*x. It's a little bit faster.

Of course! Thanks for the reminder. :-)

Thomas


Post a reply to this message

From: Warp
Subject: Re: Counter-intuitive behaviour in media scattering
Date: 28 May 2011 07:43:17
Message: <4de0dfd5@news.povray.org>
Alain <aze### [at] qwertyorg> wrote:
> You should use pow(x,2) instead of x*x. It's a little bit faster.

  Can you give a technical explanation of why? (Note that in C/C++ calling
the math library function pow() is, in general, significantly slower than
a floating point multiplication.)

-- 
                                                          - Warp


Post a reply to this message

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