POV-Ray : Newsgroups : povray.binaries.images : Strange media effect. (20kbu) : Re: Strange media effect. (20kbu) Server Time
4 Nov 2024 13:33:05 EST (-0500)
  Re: Strange media effect. (20kbu)  
From: David Heys
Date: 3 Aug 2000 05:02:51
Message: <3989353b@news.povray.org>
> If anyone can tell me what the problem is, I will be very grateful.

Your problem lies in trying to get absorption, emission and scattering all
in the same media statement. You need to declare each media type separately
within the interior statement. I've listed out below how to get it to work.
BTW, having all three really slows things down. I'd use emission for test
purposes and then try different combinations of the three to get a final
effect.

David


#declare Final=1;

// ground fog
#if (Final=0)
 fog {
  fog_type   2
  distance   0.3
  color      rgb 0.7 // gray
  fog_offset -0.7
  fog_alt    0.15
  turbulence 1.5
  turb_depth 0.8
 }
#else
 box

  <-15,-3,-15>,<15,-0.3,45>
  pigment { rgbf 1 }
  hollow
  interior {
   media {
    absorption 0.7
    method 3
    density {
     bozo
     density_map {
      [0 rgb 1]
      [1 rgb 1]
     }
    }
   }
   media {
    emission 0.7
    method 3
    density {
     bozo
     density_map {
      [0 rgb 1]
      [1 rgb 1]
     }
    }
   }
   media {
    scattering {2, rgb<.25,.25,.25> extinction 1 }
    intervals 1 samples 1
    confidence 0.8 variance 1/32
    method 3
    density {
     gradient y
     color_map {
      [0 rgb 1]
      [1 rgb 1]
     }
    }
   }
  }
 }
#end


Post a reply to this message

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