POV-Ray : Newsgroups : povray.general : Scattering media and photons Server Time
3 Aug 2024 14:13:53 EDT (-0400)
  Scattering media and photons (Message 11 to 20 of 21)  
<<< Previous 10 Messages Goto Latest 10 Messages Next 1 Messages >>>
From: Phil Cook
Subject: Re: Scattering media and photons
Date: 17 Mar 2004 05:03:22
Message: <opr4z3mzt0p4ukzs@news.povray.org>
On Tue, 16 Mar 2004 20:42:31 +0000, IMBJR <no### [at] spamhere> wrote:

<snip>
> How odd. Unless I'm misreading the documentation, we should be able to
> do this. I'm sure I've see a classic Dark Side Of The Moon prism with
> refracted beam done in POV. I can't see why reflections should be any
> different.

It was Tim Cook in p.b.i. 28/10/03 a refracting prism using a point light 
inside a sphere with a cut-out, and presumably a interior{dispersion}. If 
you switch off all the reflection on my LightReflector,  add a 
transparency or filter and switch back to the overhead view, the light 
beam does pass straight through and show up on the other side. However if 
you add 'refraction on' to the photon block it vanishes.

It does seem strange to me, but again that may be to do with my ignorance 
in how this works, I'm sure someone else can answer this much better than 
I.

--
Phil

-- 
All thoughts and comments are my own unless otherwise stated and I am 
happy to be proven wrong.


Post a reply to this message

From: Phil Cook
Subject: Re: Scattering media and photons
Date: 18 Mar 2004 10:37:09
Message: <opr42dq2m2p4ukzs@news.povray.org>
Just to see if anyone else can see what's going on here's a rework of the 
full code I'm using; just switch CameraView , I've obviously fiddled with 
the settings declared with no success at getting a reflected beam, 
although I can see that light is being calculated.

--
Phil

//code
#declare GlobalRadiosity=off; //just to check if radiosity makes a 
difference
#declare GlobalPhotons=on; //turn the displayed beams on and off
#declare GlobalMedia=on;  //control

//control the settings for each object
#declare LightSourcePhotons=on;
#declare LightSourcePhotonsReflection=on;
#declare LightSourcePhotonsRefraction=off;
#declare LightReflectorPhotons=on;
#declare LightReflectorPhotonsReflection=on;
#declare LightReflectorPhotonsRefraction=off;
#declare LightReflectorReflection=on;
#declare BoxReflection=on;
#declare RedSphere=on; //in prime light path
#declare BlueSphere=on;  //outside of light paths (control)
#declare GreenSphere=on; //in reflected light path

#declare CameraView=3;
/*
1 view from reflected beams POV
2 overhead shot
3 directly perpendicular to the beam on line with reflected beam showing 
everything
4 shows beam and all three spheres + reflected light beam
*/

global_settings {

#if(GlobalRadiosity)
radiosity{
error_bound 1.2
recursion_limit 5
low_error_factor .5
minimum_reuse 0.015
adc_bailout 0.01/2
normal on
media on
}#end

#if(GlobalPhotons)
photons{
count 20000
media 200
autostop 0
jitter .4
}
}#end

#if(GlobalMedia)
media{scattering{1,rgb 0.01}
}#end

light_source{<0,0,50>, rgb 100 cylinder point_at<0,0,-10>
tightness 0.5
#if(LightSourcePhotons)
photons{
#if(LightSourcePhotonsReflection)
reflection on
#end
#if(LightSourcePhotonsRefraction)
refraction on
#end
}#end
media_attenuation on
media_interaction on
}

camera{
location<0,0,9.99>
look_at 0
#switch(CameraView)
#case(1)
rotate y*-90
#break
#case(2)
rotate <0,-90,-90>
#break
#case(3)
rotate <0,90,30>
#break
#case(4)
rotate <0,45,45>
#end
}

#declare LightReflector=
prism{0,6,4
<3,0>,<3,-3>,<0,-3><3,0>}

object{LightReflector hollow
#if(LightReflectorPhotons)
photons{
target
#if(LightReflectorPhotonsReflection)
reflection on
#end
#if(LightReflectorPhotonsRefraction)
refraction on
#end
}#end

pigment{rgb 0.85}
finish{
#if(LightReflectorReflection)
reflection {1.0}
#end
ambient 0 diffuse 1}
translate <-1.5,-3,1.5>
}

#if(RedSphere)
sphere{0,0.2 pigment{rgb <0.8,0,0>} finish{ambient 0} translate <0,0,5>}
#end
#if(GreenSphere)
sphere{0,0.2 pigment{rgb <0,0.8,0>} finish{ambient 0} translate<0,-0.5,5> 
rotate y*-90}
#end
#if(BlueSphere)
sphere{0,0.2 pigment{rgb <0,0,0.8>} finish{ambient 1} translate<0,1.5,5>}
#end

box{0,10 translate <-5,-3,10> rotate y*-90 pigment {rgb 0.85}
finish{
#if(BoxReflection)
reflection {1.0}
#end
ambient 0 diffuse 1}
}

plane{y,-3.0001 pigment{rgb 1} finish{ambient 0}}
//end code
-- 
All thoughts and comments are my own unless otherwise stated and I am 
happy to be proven wrong.


Post a reply to this message

From: Phil Cook
Subject: Re: Scattering media and photons
Date: 30 Mar 2004 08:18:57
Message: <opr5ofawzup4ukzs@news.povray.org>
On Wed, 17 Mar 2004 10:05:13 -0000, Phil Cook 
<phi### [at] nospamdeckingdealscouk> wrote:

> On Tue, 16 Mar 2004 20:42:31 +0000, IMBJR <no### [at] spamhere> wrote:
>
> <snip>
>> How odd. Unless I'm misreading the documentation, we should be able to
>> do this. I'm sure I've see a classic Dark Side Of The Moon prism with
>> refracted beam done in POV. I can't see why reflections should be any
>> different.
>
> It was Tim Cook in p.b.i. 28/10/03 a refracting prism using a point 
> light inside a sphere with a cut-out, and presumably a 
> interior{dispersion}. If you switch off all the reflection on my 
> LightReflector,  add a transparency or filter and switch back to the 
> overhead view, the light beam does pass straight through and show up on 
> the other side. However if you add 'refraction on' to the photon block 
> it vanishes.
>
> It does seem strange to me, but again that may be to do with my 
> ignorance in how this works, I'm sure someone else can answer this much 
> better than I.

Well I've gone through optics.pov which shows reflected beams etc., 
unfortunately without explaining how it works, and pulled together the 
following scene with comments. If anyone can offer an explaination why 
both refraction and reflection need to be on in the light_source; why the 
light_source must be outside the media container in order to get a 
reflected beam; and why a cylinder light_source produces sharp edges in 
the original beam with refraction on, I'd be most interested.

--
Phil

//code
global_settings{
photons{
/*
Photon count seems to be inversely linked to the radius of the cylinder 
light_source
smaller radius needs higher count
*/
count 150000
media 100, 2
}
}

/*
This seems to be important as it appears that the light_source must be 
outside the media
so no global media allowed
*/
box{-20,20 hollow
texture {pigment{rgbt 1}}
interior{
media{
/*
Note the higher rgb value and the extinction 0 to turn absorption off
comment out extinction and beams vanish
*/
scattering{1,rgb 1 extinction 0}
method 3 intervals 1 samples 4
}
}
/*
Without this no reflected beam
*/
photons{target}
}

/*
Light source must originate outside media container
switch to 10 and only original beam shows
*/
light_source{x*25, rgb<1.2,1,1.5>
cylinder
/*
see photon count
*/
radius 0.5 //falloff 0.5
point_at x*-10
/*
This is weird
try
photons{refraction on reflection off}
photons{refraction off reflection on}
photons{refraction off reflection off}
Why does the reflected beam only show up when both are on?
*/
photons{refraction on reflection on}
}

camera{
location y*10
look_at 0
}

prism{-1,1,4
0,<0,6>,<6,0>,0
texture{
pigment {color rgb 1}
finish {ambient 0 diffuse 0 reflection 1}
}
translate <-3,0,-3>
}
//end code

-- 
All thoughts and comments are my own unless otherwise stated and I am 
happy to be proven wrong.


Post a reply to this message

From: IMBJR
Subject: Re: Scattering media and photons
Date: 30 Mar 2004 14:38:15
Message: <rdjj609nmff7832qhfm9deb0trdtsnsr7h@4ax.com>
On Tue, 30 Mar 2004 14:19:34 +0100, Phil Cook
<phi### [at] nospamdeckingdealscouk> wrote:

>On Wed, 17 Mar 2004 10:05:13 -0000, Phil Cook 
><phi### [at] nospamdeckingdealscouk> wrote:
>
>> On Tue, 16 Mar 2004 20:42:31 +0000, IMBJR <no### [at] spamhere> wrote:
>>
>> <snip>
>>> How odd. Unless I'm misreading the documentation, we should be able to
>>> do this. I'm sure I've see a classic Dark Side Of The Moon prism with
>>> refracted beam done in POV. I can't see why reflections should be any
>>> different.
>>
>> It was Tim Cook in p.b.i. 28/10/03 a refracting prism using a point 
>> light inside a sphere with a cut-out, and presumably a 
>> interior{dispersion}. If you switch off all the reflection on my 
>> LightReflector,  add a transparency or filter and switch back to the 
>> overhead view, the light beam does pass straight through and show up on 
>> the other side. However if you add 'refraction on' to the photon block 
>> it vanishes.
>>
>> It does seem strange to me, but again that may be to do with my 
>> ignorance in how this works, I'm sure someone else can answer this much 
>> better than I.
>
>Well I've gone through optics.pov which shows reflected beams etc., 
>unfortunately without explaining how it works, and pulled together the 
>following scene with comments. If anyone can offer an explaination why 
>both refraction and reflection need to be on in the light_source; why the 
>light_source must be outside the media container in order to get a 
>reflected beam; and why a cylinder light_source produces sharp edges in 
>the original beam with refraction on, I'd be most interested.

I shall look foward to having a poke at this.

>
>--
>Phil
>
>//code
>global_settings{
>photons{
>/*
>Photon count seems to be inversely linked to the radius of the cylinder 
>light_source
>smaller radius needs higher count
>*/
>count 150000
>media 100, 2
>}
>}
>
>/*
>This seems to be important as it appears that the light_source must be 
>outside the media
>so no global media allowed
>*/
>box{-20,20 hollow
>texture {pigment{rgbt 1}}
>interior{
>media{
>/*
>Note the higher rgb value and the extinction 0 to turn absorption off
>comment out extinction and beams vanish
>*/
>scattering{1,rgb 1 extinction 0}
>method 3 intervals 1 samples 4
>}
>}
>/*
>Without this no reflected beam
>*/
>photons{target}
>}
>
>/*
>Light source must originate outside media container
>switch to 10 and only original beam shows
>*/
>light_source{x*25, rgb<1.2,1,1.5>
>cylinder
>/*
>see photon count
>*/
>radius 0.5 //falloff 0.5
>point_at x*-10
>/*
>This is weird
>try
>photons{refraction on reflection off}
>photons{refraction off reflection on}
>photons{refraction off reflection off}
>Why does the reflected beam only show up when both are on?
>*/
>photons{refraction on reflection on}
>}
>
>camera{
>location y*10
>look_at 0
>}
>
>prism{-1,1,4
>0,<0,6>,<6,0>,0
>texture{
>pigment {color rgb 1}
>finish {ambient 0 diffuse 0 reflection 1}
>}
>translate <-3,0,-3>
>}
>//end code

--------------------------------
My First Subgenius Picture Book:
http://www.imbjr.com


Post a reply to this message

From: Phil Cook
Subject: Re: Scattering media and photons
Date: 31 Mar 2004 04:57:49
Message: <opr5p0ninmp4ukzs@news.povray.org>
On Tue, 30 Mar 2004 20:43:07 +0100, IMBJR <no### [at] spamhere> wrote:

> On Tue, 30 Mar 2004 14:19:34 +0100, Phil Cook
> <phi### [at] nospamdeckingdealscouk> wrote:

<snip>

>> Well I've gone through optics.pov which shows reflected beams etc.,
>> unfortunately without explaining how it works, and pulled together the
>> following scene with comments. If anyone can offer an explaination why
>> both refraction and reflection need to be on in the light_source; why 
>> the
>> light_source must be outside the media container in order to get a
>> reflected beam; and why a cylinder light_source produces sharp edges in
>> the original beam with refraction on, I'd be most interested.
>
> I shall look foward to having a poke at this.

Looking at the controversial image you posted I'm not sure how to take 
that :) but glad to be of help beams are well weird.

I've been avoiding that debate as it seems to be running into moralistic 
grounds, personally I think you should have put adult in caps at the 
begining of the subject,  explained that the picture is adult themed at 
the top of the body and then posted either a link or put a page of white 
space between the top and the image. As to the image itself where do you 
draw a line, does this mean I wouldn't be able to post any accurate 
renders of an egyptian statue with a huge phallus?

Ok no more I'll just watch the thread in p.b.i. and p.o-t. but feel free 
to quote me :)

<snip code>

--
Phil

-- 
All thoughts and comments are my own unless otherwise stated and I am 
happy to be proven wrong.


Post a reply to this message

From: Christopher James Huff
Subject: Re: Scattering media and photons
Date: 31 Mar 2004 08:30:13
Message: <cjameshuff-463158.08304231032004@news.povray.org>
In article <opr5ofawzup4ukzs@news.povray.org>,
 Phil Cook <phi### [at] nospamdeckingdealscouk> wrote:

> Well I've gone through optics.pov which shows reflected beams etc., 
> unfortunately without explaining how it works, and pulled together the 
> following scene with comments.

Hmm. I'll try to make some more informative comments for the 3.6 version.


> If anyone can offer an explaination why 
> both refraction and reflection need to be on in the light_source;

Because you use both refraction and reflection. Sort of. It seems that 
photons will only be generated if the target is the first object the ray 
from the light source hits. In this scene, the first object hit is the 
media container, which then blocks the mirror from getting any photons. 
I recently ran into this with a candle scene, where the offending shape 
was the flame container. You can sometimes partially work around it by 
making the media container shadowless, but that won't work for this 
situation. It's almost certainly a bug.


> why the 
> light_source must be outside the media container in order to get a 
> reflected beam;

No idea. I'll have to investigate that further.


> and why a cylinder light_source produces sharp edges in 
> the original beam with refraction on, I'd be most interested.

You might be seeing the difference between the original light source 
beam, rendered by usual raytracing, and the beam of media-deposited 
photons.

-- 
Christopher James Huff <cja### [at] earthlinknet>
http://home.earthlink.net/~cjameshuff/
POV-Ray TAG: <chr### [at] tagpovrayorg>
http://tag.povray.org/


Post a reply to this message

From: Phil Cook
Subject: Re: Scattering media and photons
Date: 31 Mar 2004 09:07:40
Message: <opr5qb7vygp4ukzs@news.povray.org>
On Wed, 31 Mar 2004 08:30:42 -0500, Christopher James Huff 
<cja### [at] earthlinknet> wrote:

> In article <opr5ofawzup4ukzs@news.povray.org>,
>  Phil Cook <phi### [at] nospamdeckingdealscouk> wrote:
>
>> Well I've gone through optics.pov which shows reflected beams etc.,
>> unfortunately without explaining how it works, and pulled together the
>> following scene with comments.
>
> Hmm. I'll try to make some more informative comments for the 3.6 version.

<silly grin> It's a great image, takes ages to do on my computer though; 
it was quite fun dissecting it down to the bare bones

>> If anyone can offer an explaination why
>> both refraction and reflection need to be on in the light_source;
>
> Because you use both refraction and reflection. Sort of. It seems that
> photons will only be generated if the target is the first object the ray
> from the light source hits. In this scene, the first object hit is the
> media container, which then blocks the mirror from getting any photons.
> I recently ran into this with a candle scene, where the offending shape
> was the flame container. You can sometimes partially work around it by
> making the media container shadowless, but that won't work for this
> situation. It's almost certainly a bug.

Well I'm glad it's not just me that has all this fun :) Hmm trying to 
follow that, so photons only penetrate through the media container (first 
target) if both reflection and refraction are on; that does seem weird as 
I thought refraction was just for caustics and there are none in the scene 
I posted just reflections, seems a lot of calculation is going on for 
something that as far as I can tell isn't used.

>> why the
>> light_source must be outside the media container in order to get a
>> reflected beam;
>
> No idea. I'll have to investigate that further.

It does explain why reflected beams don't show for a global media, which 
is what first stumped me as too why nothing seemed to work. I've also 
tried it for a point light in a hollow open cylinder as soon as the 
light_source enters the media though...

>> and why a cylinder light_source produces sharp edges in
>> the original beam with refraction on, I'd be most interested.
>
> You might be seeing the difference between the original light source
> beam, rendered by usual raytracing, and the beam of media-deposited
> photons.

Yep "media_interaction off" on the light removes the edges. However it now 
shows that when the light_source is inside the media container all beams 
vanish, so the original beam I saw must have been created solely by 
media_interaction. What fun <deep voice> By Grabtar's Hammer I *will* 
master the strange phenonemon that is media :)

--
Phil
-- 
All thoughts and comments are my own unless otherwise stated and I am 
happy to be proven wrong.


Post a reply to this message

From: Lonnie
Subject: Re: Scattering media and photons
Date: 2 Jun 2005 18:45:01
Message: <web.429f899689a510e13cb015b90@news.povray.org>
IMBJR <no### [at] spamhere> wrote:
> On Tue, 16 Mar 2004 10:03:13 -0000, Phil Cook
> <phi### [at] nospamdeckingdealscouk> wrote:
>
> >On Mon, 15 Mar 2004 21:19:25 +0000, IMBJR <no### [at] spamhere> wrote:
> >
> >> On Mon, 15 Mar 2004 09:31:18 -0000, Phil Cook
> >> <phi### [at] nospamdeckingdealscouk> wrote:
> >>
> >>> On Sat, 13 Mar 2004 15:58:50 +0000, IMBJR <no### [at] spamhere> wrote:
> >>>
> >>>> On Fri, 12 Mar 2004 23:18:50 -0500, "Slime" <slm### [at] slimelandcom> wrote:
> >>>>
> >>>>>> Currently, I've a cylinder of light
> >>>>>
> >>>>> Hmm, I vaguely remember other people having troubles with cylinder
> >>>>> lights
> >>>>> and photons... but I don't remember what the solutions were.
> >>>>
> >>>> LOL
> >>>>
> >>>> Cheers, that fills me with hope!
> >>>>
> >>>>>
> >>>>> - Slime
> >>>>> [ http://www.slimeland.com/ ]
> >>>>>
> >>>
> >>> Hopefully you won't object to comments from a newbie, but as I've been
> >>> messing with this sort of thing I may know what's happening.
> >>> The parallel light source beam diameter seems to be controlled by the
> >>> tightness keyword, as for reflecting the light beam off a reflected
> >>> surface; it doesn't.
> >>> As they say a picture is worth a thousand words;
> >>>
> ><snip code>
> >>>
> >>> As you can see from the top view the light beam isn't reflected, but if
> >>> you switch to the other camera view the white sphere is reflected in the
> >>> prism. The only way round this I think is to point a cylinder light
> >>> where
> >>> the beam should reflect.
> >>>
> >>> Hope this helps
> >>
> >> Interesting. I've had a play with your scene and still can't see why
> >> this does not work. After all I'm sure the documentation does talk
> >> about photons being trapped/held/sampled in media.
> >
> >Yeah I've fiddled with it at lot too, add a new camera at:
> >
> >location <10,7,3>
> >look_at <-10,3,3>
> >
> >add a box at:
> >
> >box{0,<-10,10,-100> rotate y*22.5 translate <-10,0,10> pigment {rgb 0.8}
> >finish{reflection {1.0} ambient 0.5 diffuse 1}}
> >
> >then switch the LightReflector to ambient 0.5 diffuse 1
> >
> >you can see that the light beam is being calculated as there is a patch on
> >the box however note the lack of a shadow from the first sphere which
> >should appear in the middle of it, also note the lack of the reflected
> >shadow in the box part which is showing the reflection of the
> >LightReflector.
> >
> >So unless there's something I'm missing it appears POV-Ray can't do this
> >sort of thing with media.
>
> How odd. Unless I'm misreading the documentation, we should be able to
> do this. I'm sure I've see a classic Dark Side Of The Moon prism with
> refracted beam done in POV. I can't see why reflections should be any
> different.
>
> >
> >--
> >Phil
>
> --------------------------------
> My First Subgenius Picture Book:
> http://www.imbjr.com

I am about to tear out my hair over the same problem only with refracted
light.  It seems that photons and media exclude each other.  My scene is a
glass model of a Greek temple, totally transparent material, with ior and
dispersion, photons enabled (target) and illiminated by a spotlight.  It is
surrounded by a hollow, transparent cylinder filled with scattering media.
Interior dispersion works fine, BUT:

1.  When both media and photons are enabled where the media is shadowed by
the (transparent) material the media vanishes.  Caustics completely
diappear leaving black shadows.

2.  When media is diabled and photons are enabled the caustics work fine and
the shadows are correctly rendered in shades of grey.

3.  When photons are diabled and media is enabled the media works fine,
showing up even in the shadows.

I have spent many hours going over the documentation and I can find nothing
about the cause of this.  Here is the code:

#version 3.5;

#include "colors.inc"

global_settings {
  assumed_gamma 1.0
  max_trace_level 15

   photons {
     count 20000
     jitter .4
     media 300
     max_trace_level 35
   }
}

// ----------------------------------------

camera {
  location  <-2.0, 19.0, -32>
  direction 1.5*z
  right     x*image_width/image_height
  look_at   <0.0, 4.0,  0.0>
}




sky_sphere {
  pigment {
    gradient y
    color_map {
      [0.0 rgb <0.6,0.7,1.0>]
      [0.7 rgb <0.0,0.1,0.8>]
    }
  }
}

light_source {
  <60, 58,21>
  color rgb <1, 1, 1>
  spotlight
  radius 6
  falloff 6.1
  tightness 22
  point_at <0,0,0>
}



// ----------------------------------------

#declare M_Mymat1=material{
  texture{
    pigment{
      color rgbt <.9,.9,.9,.9>
    }
    finish{
      ambient .1
      diffuse .7
      specular .3
      reflection 0
    }
    normal{
      crackle .4
      warp{turbulence .3}
      scale .7
    }
  }
  interior{
    ior 2.2
    dispersion 1.9
    dispersion_samples 120
  }
}

plane {
  y, 0
  pigment { color rgb <0.1,0.1,0.1> }
}

union{
  cylinder{<0,-.001,0>,<0,.502,0>,7}
  cylinder{<0,.5,0>,<0,1.002,0>,6.5}
  cylinder{<0,1,0>,<0,1.502,0>,6}
  #declare ix=0;
  #while (ix<360)
    torus{.5,.3 translate <4.9,1.5> rotate <0,ix,0>}
    torus{.5,.3 translate <4.9,8,0> rotate <0,ix,0>}
    cylinder{<4.9,1.5,0>,<4.9,8,0>,.5 rotate <0,ix,0>}
    #declare ix=ix+45;
  #end
  difference{
    cylinder{<0,8,0>,<0,8.501,0>,6}
    cylinder{<0,7.9,0>,<0,8.6,0>,4}
  }
  torus {6,.1 translate <0,8.25>}
  difference{
    sphere{<0,0,0>,5}
    sphere{<0,0,0>,4.8}
    box{<-5.1,0,-5.1>,<5.1,-5.1,5.1>}
    translate <0,8.5,0>
  }
  material{M_Mymat1}
  photons{
    target
    reflection on
    refraction on
  }
}

cylinder{
  <0,-.01,0>,<0,14,0>,8
  texture{
    pigment{ color rgbt <1,1,1,1>}
  }
  interior{
    media{
      scattering { 1, rgb 0.03}
      intervals 1
      samples 5
      method 3
    }
  }
  hollow
}


Post a reply to this message

From: Alain
Subject: Re: Scattering media and photons
Date: 2 Jun 2005 22:24:33
Message: <429fbf61$1@news.povray.org>
Lonnie nous apporta ses lumieres en ce 2005-06-02 18:42:

> I am about to tear out my hair over the same problem only with refracted
> light.  It seems that photons and media exclude each other.  My scene is a
> glass model of a Greek temple, totally transparent material, with ior and
> dispersion, photons enabled (target) and illiminated by a spotlight.  It is
> surrounded by a hollow, transparent cylinder filled with scattering media.
> Interior dispersion works fine, BUT:
> 
> 1.  When both media and photons are enabled where the media is shadowed by
> the (transparent) material the media vanishes.  Caustics completely
> diappear leaving black shadows.
> 
> 2.  When media is diabled and photons are enabled the caustics work fine and
> the shadows are correctly rendered in shades of grey.
> 
> 3.  When photons are diabled and media is enabled the media works fine,
> showing up even in the shadows.
> 
> I have spent many hours going over the documentation and I can find nothing
> about the cause of this.  Here is the code:
> 
> global_settings {
>   assumed_gamma 1.0
>   max_trace_level 15
> 
>    photons {
>      count 20000
>      jitter .4
>      media 300
>      max_trace_level 35
// Add this
	media 10
// Add this
>    }
> }
>
You need to add: media <max_steps> to switch media photons on. The default is media 0
means that NO 
photons are deposited in any media. In that case, direct illumination will light the
media, but 
transmited and reflected light (photons) will ignore your media.
The mandatory parameter "max_steps" indicate how many photons to deposit in a given
interval.
Try the test value given. You will probably need to increase it, maybe around 1000 or
more to get 
optimum results.

Alain


Post a reply to this message

From: Lonnie
Subject: Re: Scattering media and photons
Date: 3 Jun 2005 14:40:00
Message: <web.42a0a3bb89a510e13cb015b90@news.povray.org>
Alain <ele### [at] netscapenet> wrote:
> Lonnie nous apporta ses lumieres en ce 2005-06-02 18:42:
>
> > I am about to tear out my hair over the same problem only with refracted
> > light.  It seems that photons and media exclude each other.  My scene is a
> > glass model of a Greek temple, totally transparent material, with ior and
> > dispersion, photons enabled (target) and illiminated by a spotlight.  It is
> > surrounded by a hollow, transparent cylinder filled with scattering media.
> > Interior dispersion works fine, BUT:
> >
> > 1.  When both media and photons are enabled where the media is shadowed by
> > the (transparent) material the media vanishes.  Caustics completely
> > diappear leaving black shadows.
> >
> > 2.  When media is diabled and photons are enabled the caustics work fine and
> > the shadows are correctly rendered in shades of grey.
> >
> > 3.  When photons are diabled and media is enabled the media works fine,
> > showing up even in the shadows.
> >
> > I have spent many hours going over the documentation and I can find nothing
> > about the cause of this.  Here is the code:
> >
> > global_settings {
> >   assumed_gamma 1.0
> >   max_trace_level 15
> >
> >    photons {
> >      count 20000
> >      jitter .4
> >      media 300
> >      max_trace_level 35
> // Add this
>  media 10
> // Add this
> >    }
> > }
> >
> You need to add: media <max_steps> to switch media photons on. The default is media
0 means that NO
> photons are deposited in any media. In that case, direct illumination will light the
media, but
> transmited and reflected light (photons) will ignore your media.
> The mandatory parameter "max_steps" indicate how many photons to deposit in a given
interval.
> Try the test value given. You will probably need to increase it, maybe around 1000
or more to get
> optimum results.
>
> Alain

Thanks Alain, but I tried that and my machine is still not buying.  Indeed,
whenever I enable media it generates NO photons at all.  I tried saving the
photon map and got a message "Could not save photon map.  No photons!"  I
wonder if a have a bad install of 3.6?


Post a reply to this message

<<< Previous 10 Messages Goto Latest 10 Messages Next 1 Messages >>>

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