POV-Ray : Newsgroups : povray.general : Photons scattering and saturation Server Time
28 Dec 2024 19:55:47 EST (-0500)
  Photons scattering and saturation (Message 1 to 3 of 3)  
From: IGM
Subject: Photons scattering and saturation
Date: 30 Dec 2011 05:45:00
Message: <web.4efd956b3dba9ea2ffd83c460@news.povray.org>
Hi all,
I'm a newbie.. I've two problems with this file:
1) there is no media scattering on the central beam (that collimated by the
reflector) while there is scattering on the direct radiation. How to obtain
light scattering from the central beam?
2) The central beam is not uniform, but it appears so: the spot is saturated.
How to avoid this? How to have a more gradual representation of the
illumination? (note: this happens always, also even when the media scattering is
not present).

Thanks anybody!

/////////////////////////////

global_settings
{ photons
  { count 5000
   media 100   //  This parameter has no influence !?
  }
}

#if (1)
        camera { location <-60,30,-150> look_at <50,-20,0> angle 60} // lateral
prospective view
#else
        camera {orthographic location <5,0,0> look_at <50,0,0>}   // frontal
orthographic view
#end

// screen
#declare xpos = 60;
box {
     <xpos, -60, -60>, <xpos+10, 60, 60>
        pigment {rgb <1,1,1>}
        finish {ambient 0.1 reflection 0 diffuse 1}
        photons {target}
}

#declare lampandreflectorxpos = -20;

// lamp
light_source
{ <lampandreflectorxpos, 0, 0>,
  color rgb<1, 1, 1> * .1
  //area_light z,y,4,4
  photons { refraction off reflection on }
}

#if (0) // stop for the direct radiation, placed in front of the lamp
cylinder
{<lampandreflectorxpos+1,0,0>,<lampandreflectorxpos+1.5,0,0>,1.5}
#end

#if (1) // smoke block for scattering
cylinder { <lampandreflectorxpos-3, 0, 0>, <xpos+1, 0, 0>, 60
  pigment { rgbt 1 }
  interior {media {scattering { 1, rgb .05 extinction 0}}}
  hollow
}
#end

// Reflector

// Internal specular surface
lathe {quadratic_spline 61,
<15.0506,26.2944>
<14.9282,25.8564>
<13.7045,21.4767>
<12.6537,18.0146>
<11.7408,15.2308>
<10.9395,12.9592>
<10.23,11.0815>
<9.5966,9.5118>
<9.0272,8.1864>
<8.5122,7.0572>
<8.0436,6.0874>
<7.615,5.2486>
<7.2212,4.5183>
<6.8577,3.8786>
<6.5209,3.3153>
<6.2076,2.8168>
<5.9151,2.3736>
<5.6413,1.978>
<5.384,1.6234>
<5.1417,1.3046>
<4.9128,1.0169>
<4.696,0.7566>
<4.4903,0.52035>
<4.2946,0.30541>
<4.1079,0.10939>
<3.9296,-0.069755>
<3.7589,-0.23381>
<3.5952,-0.38432>
<3.4379,-0.52263>
<3.2864,-0.64992>
<3.1404,-0.76722>
<2.9994,-0.87545>
<2.863,-0.9754>
<2.7309,-1.0678>
<2.6027,-1.1533>
<2.4781,-1.2324>
<2.357,-1.3056>
<2.2389,-1.3734>
<2.1238,-1.4362>
<2.0113,-1.4943>
<1.9014,-1.5481>
<1.7937,-1.5978>
<1.6881,-1.6438>
<1.5845,-1.6862>
<1.4827,-1.7252>
<1.3826,-1.761>
<1.284,-1.7939>
<1.1868,-1.8239>
<1.0908,-1.8513>
<0.99606,-1.876>
<0.90231,-1.8982>
<0.8095,-1.9181>
<0.71751,-1.9356>
<0.62626,-1.951>
<0.53564,-1.9641>
<0.44556,-1.9752>
<0.35592,-1.9842>
<0.26663,-1.9911>
<0.17761,-1.9961>
<0.08876,-1.999>
<0,-2>
  photons { target reflection on collect off }
  finish { reflection 1 ambient 0 diffuse 0 }
  rotate -90*z
  translate <lampandreflectorxpos,0,0>
 }

// External case
lathe {quadratic_spline 61,
<15.0506,26.2944>
<14.9282,25.8564>
<13.7045,21.4767>
<12.6537,18.0146>
<11.7408,15.2308>
<10.9395,12.9592>
<10.23,11.0815>
<9.5966,9.5118>
<9.0272,8.1864>
<8.5122,7.0572>
<8.0436,6.0874>
<7.615,5.2486>
<7.2212,4.5183>
<6.8577,3.8786>
<6.5209,3.3153>
<6.2076,2.8168>
<5.9151,2.3736>
<5.6413,1.978>
<5.384,1.6234>
<5.1417,1.3046>
<4.9128,1.0169>
<4.696,0.7566>
<4.4903,0.52035>
<4.2946,0.30541>
<4.1079,0.10939>
<3.9296,-0.069755>
<3.7589,-0.23381>
<3.5952,-0.38432>
<3.4379,-0.52263>
<3.2864,-0.64992>
<3.1404,-0.76722>
<2.9994,-0.87545>
<2.863,-0.9754>
<2.7309,-1.0678>
<2.6027,-1.1533>
<2.4781,-1.2324>
<2.357,-1.3056>
<2.2389,-1.3734>
<2.1238,-1.4362>
<2.0113,-1.4943>
<1.9014,-1.5481>
<1.7937,-1.5978>
<1.6881,-1.6438>
<1.5845,-1.6862>
<1.4827,-1.7252>
<1.3826,-1.761>
<1.284,-1.7939>
<1.1868,-1.8239>
<1.0908,-1.8513>
<0.99606,-1.876>
<0.90231,-1.8982>
<0.8095,-1.9181>
<0.71751,-1.9356>
<0.62626,-1.951>
<0.53564,-1.9641>
<0.44556,-1.9752>
<0.35592,-1.9842>
<0.26663,-1.9911>
<0.17761,-1.9961>
<0.08876,-1.999>
<0,-2>
  pigment {rgb .5}
  finish { reflection 0 ambient .8 phong 0.5 }
  rotate -90*z
  translate <lampandreflectorxpos,0,0>
  scale 1.05
 }


Post a reply to this message

From: IGM
Subject: Re: Photons scattering and saturation
Date: 30 Dec 2011 06:15:00
Message: <web.4efd9cbc1a64677affd83c460@news.povray.org>
"IGM" <iar### [at] gmailcom> wrote:
> 1) there is no media scattering on the central beam (that collimated by the
> reflector) while there is scattering on the direct radiation. How to obtain
> light scattering from the central beam?

I've just found the solution to the first problem (after 3 days without
results!!): the reflector and its shell must be declared hollow. Without the
"hollow" parameter, the media does not work well.

I'm really a newbie :)
IGM


Post a reply to this message

From: Alain
Subject: Re: Photons scattering and saturation
Date: 30 Dec 2011 20:57:09
Message: <4efe6bf5@news.povray.org>

> Hi all,
> I'm a newbie.. I've two problems with this file:
> 1) there is no media scattering on the central beam (that collimated by the
> reflector) while there is scattering on the direct radiation. How to obtain
> light scattering from the central beam?
> 2) The central beam is not uniform, but it appears so: the spot is saturated.
> How to avoid this? How to have a more gradual representation of the
> illumination? (note: this happens always, also even when the media scattering is
> not present).
>
> Thanks anybody!
>
> /////////////////////////////
>
> global_settings
> { photons
>    { count 5000

That's a very small value. You should use AT LEAST 10 times that amount, 
more probably even something like 100 to 1000 times more.
I prefer to use spacing. Try replacing your count by spacing 0.3.

>     media 100   //  This parameter has no influence !?

It allow your media to receive photons. Without it, no photons effect 
will be visible in your media.

>    }
> }
>
> #if (1)
>          camera { location<-60,30,-150>  look_at<50,-20,0>  angle 60} // lateral
> prospective view
> #else
>          camera {orthographic location<5,0,0>  look_at<50,0,0>}   // frontal
> orthographic view
> #end
>
> // screen
> #declare xpos = 60;
> box {
>       <xpos, -60, -60>,<xpos+10, 60, 60>
>          pigment {rgb<1,1,1>}
>          finish {ambient 0.1 reflection 0 diffuse 1}
>          photons {target}
NOT needed. This object collect the protons, it never reflect nor 
refract them.
> }
>
> #declare lampandreflectorxpos = -20;
>
> // lamp
> light_source
> {<lampandreflectorxpos, 0, 0>,
>    color rgb<1, 1, 1>  * .1
>    //area_light z,y,4,4
This is a realy bad area_light array. You should reasonably don't go 
under 9,9 and use adaptive. circular orient is also very usefull.

>    photons { refraction off reflection on }
Not needed as it is, use photons{area_light} if you plan on using an 
area_light.

> }
>
> #if (0) // stop for the direct radiation, placed in front of the lamp
> cylinder
> {<lampandreflectorxpos+1,0,0>,<lampandreflectorxpos+1.5,0,0>,1.5}
> #end
>
> #if (1) // smoke block for scattering
> cylinder {<lampandreflectorxpos-3, 0, 0>,<xpos+1, 0, 0>, 60
>    pigment { rgbt 1 }
>    interior {media {scattering { 1, rgb .05 extinction 0}}}
>    hollow
Here, adding photons{passthrough} can prove usefull whenever the 
light_source is outside the container and your target is in or beyong it.
Not absolutely needed here as the light is inside the container. It's 
good idea to take the habit of adding that just in case.
> }
> #end
>



Alain


Post a reply to this message

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