POV-Ray : Newsgroups : povray.general : Counter-intuitive behaviour in media scattering : Re: Counter-intuitive behaviour in media scattering Server Time
29 Jul 2024 12:27:29 EDT (-0400)
  Re: Counter-intuitive behaviour in media scattering  
From: Anthony D  Baye
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

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