POV-Ray : Newsgroups : povray.binaries.images : Scattering media help : Re: Scattering media help Server Time
7 Nov 2024 11:34:06 EST (-0500)
  Re: Scattering media help  
From: Kenneth
Date: 25 Jan 2016 04:30:06
Message: <web.56a5e94e53fb38f933c457550@news.povray.org>
Here's a 'complete' scene including your scattering media (with a camera and a
light-- having a LIGHT is important for seeing this media type) plus a HOLLOW
container object for the media to be enclosed in. (A simple sphere here.) At
least you'll see *something* now! ;-)

Note a few changes: I changed the material's pigment color to plain srgbt 1, for
simplicity. I eliminated the '10000' divisor in your media color, as that would
have made the media way too dark to see (or not enough 'density'). I also
commented-out the scale and rotation at the end of the material statement;
that's probably best done in the OBJECT instead. (But note that scaling an
object with media also scales the media density, which you may not want.
Here's a kind of rule-of-thumb: If you scale up the size of the final object,
say scale 10, then you should probably scale the media itself to 1/10, to
compensate. *Then* experiment with further scaling if you want.)

#version 3.7
global_settings{assumed_gamma 1.0}

camera {
  perspective
  location  <0, 0, -5>
  look_at   <0, 0,  0>
  right     x*image_width/image_height
  // angle 67
}

light_source {
  0*x  // light's position (translated below)
  color rgb <1,1,1>
  translate <-20, 40, -20>
}



#local atmos_material =
     material
     {
 // check TexQual here?
     texture {
       pigment {srgbt 1}}
       interior
        {
         media
        {
          scattering
         {
         4, color rgb <0.2,0.4,1.0>// crappy approximaion of TerraPOV value
          extinction 1
          }
          samples 1,1
          density
               {
               cylindrical
               poly_wave 0.25
              color_map
                {
                 [0 srgb 1.0]
                 [1 srgb 0.0]
                 }
              }
           }
        }
 //scale 10
 //rotate x * 90
}

sphere{0,1
 hollow // IMPORTANT!
 material{atmos_material}
 }


Post a reply to this message

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