POV-Ray : Newsgroups : povray.newusers : Atmosphere and BLACK window : Atmosphere and BLACK window Server Time
6 Sep 2024 12:15:07 EDT (-0400)
  Atmosphere and BLACK window  
From: yang444
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

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