POV-Ray : Newsgroups : povray.general : attenuation in object interior Server Time
31 Oct 2024 14:11:06 EDT (-0400)
  attenuation in object interior (Message 1 to 4 of 4)  
From: Reynald
Subject: attenuation in object interior
Date: 5 Aug 2005 08:45:00
Message: <web.42f35e1a3d56aaecf5f6f3660@news.povray.org>
Hi,
I'm playing around with light attenuation (fade_distance and fade_power) in
a container interior block. I noticed some behaviour that I don't
understand: the light source has to be positioned inside the fading
container for attenuation to occur. If the source is outside the container
then by rendering the effect of the beam on a screen we observe that
attenuation does not occur. If we activate Photons and add a scattering
media then we can verify this behaviour along the beam path from the source
up to the screen... same result, attenuation only occur when the source is
inside the container.

I'm probably missing something?... or is it a well known feature of object
attenuation?

Reynald


Post a reply to this message

From: Ross
Subject: Re: attenuation in object interior
Date: 5 Aug 2005 10:19:01
Message: <42f37555$1@news.povray.org>
"Reynald" <rpa### [at] bluewinch> wrote in message
news:web.42f35e1a3d56aaecf5f6f3660@news.povray.org...
> Hi,
> I'm playing around with light attenuation (fade_distance and fade_power)
in
> a container interior block. I noticed some behaviour that I don't
> understand: the light source has to be positioned inside the fading
> container for attenuation to occur. If the source is outside the container
> then by rendering the effect of the beam on a screen we observe that
> attenuation does not occur. If we activate Photons and add a scattering
> media then we can verify this behaviour along the beam path from the
source
> up to the screen... same result, attenuation only occur when the source is
> inside the container.
>
> I'm probably missing something?... or is it a well known feature of object
> attenuation?
>
> Reynald
>
>

the only thing i know of is this, from 3.3.7.9 of the docs:

"Second, only light coming directly from light sources is attenuated.
Reflected or refracted light is not attenuated by distance."


Post a reply to this message

From: Lonnie
Subject: Re: attenuation in object interior
Date: 6 Aug 2005 17:30:00
Message: <web.42f5291d29ee637b3b3a698d0@news.povray.org>
"Ross" <rli### [at] everestkcnet> wrote:
> "Reynald" <rpa### [at] bluewinch> wrote in message
> news:web.42f35e1a3d56aaecf5f6f3660@news.povray.org...
> > Hi,
> > I'm playing around with light attenuation (fade_distance and fade_power)
> in
> > a container interior block. I noticed some behaviour that I don't
> > understand: the light source has to be positioned inside the fading
> > container for attenuation to occur. If the source is outside the container
> > then by rendering the effect of the beam on a screen we observe that
> > attenuation does not occur. If we activate Photons and add a scattering
> > media then we can verify this behaviour along the beam path from the
> source
> > up to the screen... same result, attenuation only occur when the source is
> > inside the container.
> >
> > I'm probably missing something?... or is it a well known feature of object
> > attenuation?
> >
> > Reynald
> >
> >
>
> the only thing i know of is this, from 3.3.7.9 of the docs:
>
> "Second, only light coming directly from light sources is attenuated.
> Reflected or refracted light is not attenuated by distance."

Yes to all of above.  Using photons (and then <GASP> radiosity on top) can
give VERY unexpected results.  Using the automatics when U have a
transparent/refractive object is a no-no in my book.  Decide how deep U want
to go,
and then set how many bounces manually.  You are VERY COOL- Keep it up and
re-read the docs that came with POV-Ray a thousand times!!!


Post a reply to this message

From: Reynald
Subject: Re: attenuation in object interior
Date: 8 Aug 2005 05:45:01
Message: <web.42f7284229ee637bf5f6f3660@news.povray.org>
OUPS!... crotte de biche!
I'm so confused, I mixed up two different cases...
For the case explained in the first post (a light source, a fading interior
and a screen) the situation is exactely opposite as described, i.e. light
is attenuated only when placed OUTSIDE of the transparent fading container
(no refraction, neither reflection, no radiosity in this case). See below a
piece of code to check it.

The second case I planed to talk about is when using a mirror (just switch
to "material {gold}" in the "Mirror" section). The strange
thing  (to me!) is now the source has to be placed INSIDE the container for
reflection to occure! ... and as seen above in that case attenuation is not
effective...

I would like to have both... reflection and attenuation?




/////////////////////////////////////////////////////////////////////////
//
//                          REYNALD PASSERINI
//                              28.07.05

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


#include "colors.inc"


global_settings {
  max_trace_level 100
  photons {
    count 200000
    //autostop 0
    jitter .4
    media 100, 2
    }
  }


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

#declare source = sphere {
  <0,0,0> 0.1
  pigment { color Yellow }
  finish {ambient .8 diffuse .6}
  }


#declare visible =  material {
  texture {
    pigment { color NeonBlue }
    finish {ambient 0.3}
    }

  }


#declare gold = material{
  texture {
    pigment { color Gold }
    finish {
      ambient 0.1
      diffuse 0.001
      reflection 0.9
    //  specular 1
      roughness .001
      conserve_energy
      }
    }
  }

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

/*
media {
  scattering {
    1 ,  rgb 10*<0.1, 0.1, 0.1>                   // isotropic scattering
    extinction 0.001
    }
  }
*/


////////////////////////////////////////////////////////////////////
//                                                                //
//                          CAMERA - SOURCE                       //
//                                                                //





/*

  location  <px-10,0,0>
  look_at <px,0,0>
  angle 60
  }
*/



  location  <10,5,-20>
  look_at <0,0,0>
  angle 40
  }



light_source { <0,-10, 0>                    // Source
  color 1*<1,1,1>
  cylinder
  //spotlight
  looks_like {source}
  radius 0.5
  falloff 0.5              // Ouverture (a) de la fibre CIR
  tightness 0
  point_at <0,1,0>
  //fade_distance 50
  //fade_power 2
  media_attenuation on
  photons {
    refraction on
    reflection on
    }
  }



light_source { <-500,500,-500> Gray50
  media_interaction off
  media_attenuation off
  photons { reflection off refraction off }
  }



disc { <px,0,0>, <1,0,0>, 5                // Ecran
  rotate <0,0,0>
  pigment {checker White Aquamarine}
  }


plane {
  y, -100
  pigment {checker White Wheat scale 100 }     // plan de base
  }


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




// Mirror //////////////////////////////////////////////////////////

box {<-1,-10,-10> <0,10,10>
 material {visible}                         // blue screen
   //material {gold}                        // mirror
  rotate <0,0,-45>
  photons {
       target
       reflection on
       refraction on
       collect off
       }
  }





// interior fading and media ////////////////////////////////////////////

#declare transparent_avec_media =  material{
    texture {pigment { White filter 1 }}
    interior{
      fade_distance 5
      fade_power 2
      media {
        scattering {
          1 ,  rgb 5*<0.1, 0.1, 0.1>                   // isotropic
scattering
          extinction 0.01
          }
        }
      }
    }


box {
  <-10,-12,-10> <100,10,10>                  // including the light source
  //<-10,-9,-10> <100,10,10>                  // light outside of this box
  material {transparent_avec_media}
  hollow
  }


Post a reply to this message

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