POV-Ray : Newsgroups : povray.general : Media density file and media photons : Re: Media density file and media photons Server Time
5 Nov 2024 03:19:02 EST (-0500)
  Re: Media density file and media photons  
From: Penners
Date: 11 Jul 2003 14:05:01
Message: <web.3f0efb89e4926c25c85284930@news.povray.org>
Tom Melly wrote:
>"Penners" <pen### [at] hotmailcom> wrote in message
>news:web.3f0df7e8c31dadada64e85440[at]news.povray.org...
>> Hi,
>>   I am new to POVray and I am trying to render a scene with smoke by reading
>> in a density file for the media.  I try to shoot photons at the smoke,
>> however none get stored.  I am wondering if it is because of my set up of
>> the scene or if it is because media photons don't work with a density file.
>>  Anyone run into this problem or know the answer?
>> Thanks.
>
>Hard to say without code - try replacing the density file with a straightforward
>density and see if the photons show up. Alternatively, post the code and I'm
>sure someone will take a look at it.
>

Hi,
  So I took your advice and replaced the density file with a sphere media
container.  Still no media photons are saved, so I guess it is a problem
with my scene!!  Here is the script with the sphere media container.

#include "colors.inc"
#include "textures.inc"


global_settings {
   assumed_gamma 1.0
   max_trace_level 5
   photons {
      spacing 0.1  // higher value 'lower' quality, faster parsing.
      autostop 0
      jitter 0.5
      max_trace_level 15
      media 50
  }
}

background { color Black }

camera {
  location  <0.0, 2.5, -9.0>
  look_at   <0.0, 0.5,  0.0>
}

light_source {
  <75.0, 100, -20.0>
  rgb <1, 1, 1>
  spotlight
  radius 10
  falloff 1.1
  tightness 1
  point_at  <0.0, 0.5,  0.0>
  media_interaction on  // So media casts shadows.
  media_attenuation off
  photons {
    reflection on
  }
}

union {                     //plane & background
   difference {
      box {<-20,-1,0>,<20,13,13>}
      cylinder{<-21,13,0>,<21,13,0>,13}
   }
   plane {y, 0}
   translate <0,-1.9999,7>
   pigment {rgb .5}
   finish {diffuse .5 ambient 0}
   photons {
     target
     reflection on
     collect on
   }
}

cylinder {
  -y*2,y*1,
   1.0            // Radius
   open           // Remove end caps
   texture {
     pigment { brick Gray75, Red scale .25 }
   }
   photons {
      collect on
      reflection on
   }
}

sphere {0,2 // media container
pigment {rgbf <1.0,0.0,0.0,1.0>}
interior {
media { method 2 // hasten the render more
 scattering { 1,.5 extinction 0.25}
} }
hollow
   translate <2.0,2,1>

}

 Any suggestions would be GREATLY appreciated!


Post a reply to this message

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