POV-Ray : Newsgroups : povray.general : Media density file and media photons Server Time
23 Dec 2024 22:26:20 EST (-0500)
  Media density file and media photons (Message 1 to 5 of 5)  
From: Penners
Subject: Media density file and media photons
Date: 10 Jul 2003 19:35:00
Message: <web.3f0df7e8c31dadada64e85440@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.


Post a reply to this message

From: Tom Melly
Subject: Re: Media density file and media photons
Date: 11 Jul 2003 04:34:31
Message: <3f0e7697@news.povray.org>
"Penners" <pen### [at] hotmailcom> wrote in message
news:web.3f0df7e8c31dadada64e85440@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.


Post a reply to this message

From: Warp
Subject: Re: Media density file and media photons
Date: 11 Jul 2003 06:40:57
Message: <3f0e9439@news.povray.org>
A minimal (yet complete) scene would help a lot with the answer...

-- 
#macro N(D)#if(D>99)cylinder{M()#local D=div(D,104);M().5,2pigment{rgb M()}}
N(D)#end#end#macro M()<mod(D,13)-6mod(div(D,13)8)-3,10>#end blob{
N(11117333955)N(4254934330)N(3900569407)N(7382340)N(3358)N(970)}//  - Warp -


Post a reply to this message

From: Penners
Subject: Re: Media density file and media photons
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

From: Hughes, B 
Subject: Re: Media density file and media photons
Date: 11 Jul 2003 18:35:02
Message: <3f0f3b96@news.povray.org>
You don't really need photon statements for objects not actually using
reflection or refraction (or media), except to control with collect off
(default is on, or photons affect all objects).

I think what you're saying about photons not being stored is due to there
not being any reflection of refraction for the media-filled sphere. In other
words, the sphere itself hasn't any reflective finish nor ior.

However, having tried your script, if 'refraction on' is added to the
sphere's photon statement they are stored and a caustic is seen. Although
then it's unrealistic. Not sure what you were wanting to have the media do,
besides make shadows and illuminate in the light. It already does that
without photons. So maybe you could explain the desired effect?

Bob H.


Post a reply to this message

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