POV-Ray : Newsgroups : povray.newusers : Atmosphere and BLACK window Server Time
29 Nov 2024 16:39:20 EST (-0500)
  Atmosphere and BLACK window (Message 1 to 4 of 4)  
From: yang444
Subject: Atmosphere and BLACK window
Date: 16 Apr 1998 13:10:33
Message: <35363B88.BE9A12D7@pacbell.net>
(Still) going through the tutorial...

The scene is in a room with a window with sunlight and
blue sky showing through. I am learning to use the
"atmosphere" keyword.

Notice the blue sky through the window with "atmosphere"
code commented out.  But the window turns BLACK with the
"atmosphere" code in.

Neither "background" nor "sky_sphere" show through
the atmosphere, regardless of the values of "distance"
and "scattering".  You can have a very thin atmosphere
with almost no scattering. Still, "background" and
"sky_sphere" colors are blocked.

Would someone please save me a lot of work and tell me
how to stop the window from being black when I add the
atmosphere?

The doc. indicates that you should see the background
through the atmosphere.  In section 7.7.1, it says:
  The light passing through the atmosphere (either coming
  from light sources or the background) is filtered by the
  atmosphere's color if the specified color has a non-zero
  filter value.

----------------------------
#include "colors.inc"
camera {
    location <-10, 8, -19>   look_at <0, 5, 0>    angle 75
  }
light_source { <-.3, 19, .3> color rgb 0.5 atmosphere off }

// background { color rgb <0.2, 0.4, 0.8> }
sky_sphere{ pigment {color rgb <0.2, 0.4, 0.8> } }

  light_source {
    <40, 25, 0> color rgb <1, 1, .8>
    spotlight
    point_at <0, 5, 0>
    radius 20
    falloff 20
    atmospheric_attenuation on
  }

 union {
    difference {
      box { <-21, -1, -21>, <21, 21, 21> }
      box { <-20, 0, -20>, <20, 20, 20> }
      box { <19.9, 5, -3>, <21.1, 15, 3> }
    }
    box { <20, 5, -0.25>, <21, 15, 0.25> }
    box { <20, 9.775, -3>, <21, 10.25, 3> }
    pigment { color red 1 green 1 blue 1 }
    finish { ambient 0.2 diffuse 0.5 }
  }

// Comment the atmosphere out to see the blue sky thru the window

   atmosphere {
    type 1
    samples 5 // very low value to speed rendering for test
    distance 80
    scattering 0.01
  }

// x-y-z axes
cylinder { -100*x, 100*x, .03  pigment {Gold} finish {ambient .8}}
cylinder { -100*z, 100*z, .03  pigment {Gold} finish {ambient .8}}
cylinder { -100*y, 100*y, .03  pigment {Gold} finish {ambient .8}}

---------------------------
Alan


Post a reply to this message

From: Johannes Hubert
Subject: Re: Atmosphere and BLACK window
Date: 17 Apr 1998 05:40:24
Message: <6h784h$5ta$1@oz.aussie.org>
I am not sure, but I guess this is the reason:

The sky sphere has an infinite distance from the origin. So no matter how
thin the atmosphere is, over this inifinite distance it still accumulates to
block all light.

Try using a real (hollow) sphere instead of the sky sphere. Make it very
large and center it around the origin, so that it contains your scene. Use
your sky texture for it. Then you can vary it's radius until it shines
through the atmosphere just the way you want it.

Johannes.


Post a reply to this message

From: Nieminen Mika
Subject: Re: Atmosphere and BLACK window
Date: 17 Apr 1998 06:49:06
Message: <6h7c32$60a$1@oz.aussie.org>
Johannes Hubert (jhu### [at] algonetse) wrote:
: Try using a real (hollow) sphere instead of the sky sphere. Make it very
: large and center it around the origin, so that it contains your scene. Use
: your sky texture for it. Then you can vary it's radius until it shines
: through the atmosphere just the way you want it.

  Another thing to try is to put a totally transparent hollow room-sized
box with a dust halo inside it, into the room. AFAIK dust halo works like
atmosphere. This way you limit the dust into the room (and this is often
the real world analogue situation).

--
                                                              - Warp. -


Post a reply to this message

From: POVRAY
Subject: Re: Atmosphere and BLACK window
Date: 22 Apr 1998 07:19:39
Message: <353DD24B.909FC99D@aol.com>
Here's a simple rewrite that fixes the problem.  Just look for the ***:

#include "colors.inc"
camera {
    location <-10, 8, -19>   look_at <0, 5, 0>    angle 75
  }
light_source { <-.3, 19, .3> color rgb 0.5 atmosphere off }

// background { color rgb <0.2, 0.4, 0.8> }
sky_sphere{ pigment {color rgb <0.2, 0.4, 0.8> } }

  light_source {
    <40, 25, 0> color rgb <1, 1, .8>
    spotlight
    point_at <0, 5, 0>
    radius 20
    falloff 20
    atmospheric_attenuation on
  }

 union {
    difference {
      box { <-21, -1, -21>, <21, 21, 21> }
      box { <-20, 0, -20>, <20, 20, 20> }
      box { <19.9, 5, -3>, <21.1, 15, 3> }
    }
    box { <20, 5, -0.25>, <21, 15, 0.25> }
    box { <20, 9.775, -3>, <21, 10.25, 3> }
    pigment { color red 1 green 1 blue 1 }
    finish { ambient 0.2 diffuse 0.5 }
  }

// Comment the atmosphere out to see the blue sky thru the window

   atmosphere {
    type 1
    color rgbt <1, 1, 1, .8> /*** adding some tranparency will keep the
background from being washed out*/
    samples 5 // very low value to speed rendering for test
    distance 80
    scattering 0.01
  }

// x-y-z axes
cylinder { -100*x, 100*x, .03  pigment {Gold} finish {ambient .8}}
cylinder { -100*z, 100*z, .03  pigment {Gold} finish {ambient .8}}
cylinder { -100*y, 100*y, .03  pigment {Gold} finish {ambient .8}}


Post a reply to this message

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