POV-Ray : Newsgroups : povray.beta-test : Possible bug w/ photons, reflection and multiple light sources Server Time
12 Nov 2024 16:29:10 EST (-0500)
  Possible bug w/ photons, reflection and multiple light sources (Message 1 to 4 of 4)  
From: Jari Juslin
Subject: Possible bug w/ photons, reflection and multiple light sources
Date: 3 Oct 2001 21:45:05
Message: <3BBBBF20.811FF871@iki.fi>
I have encountered quite strange behaviour, when using photons specified
with count, reflection and more than one light source with object
consisting of intersection on bunch of planes. Code below is the
simplest one I have managed to show the bug. Change the value of showBug
to false to make see what I am expecting to see and true to see the odd
behaviour, which looks like is multiplies intensity of colors at least
by magnitude of five...

Also commenting out reflection of the main object or either of the light
sources, setting max_trace_lever lower than 6, changing photon
definitions of either light sources or changing the main object to
something else (like sphere of box) makes the bug go away. Same code
rendered in MegaPov 0.7 looks ok.

I am using POV-Ray 3.5 beta 4 on Windows 2000 Professional w/ SP2.

---------------------------------------------------------

#version 3.5;

#declare showBug = true;

global_settings{
  photons{
    #if (showBug = true)
      count 4000
    #else
      spacing 0.7
    #end
  }

  max_trace_level 6
}

camera {
  location  <     -0.200,      -0.300,       3.600>
  sky       <    0.00000,     0.00000,     1.00000>
  up        <        0.0,         0.0,         1.0>
  right     <    1.38192,         0.0,         0.0>
  angle         55
  look_at   <      0.000,       0.000,       0>
}

light_source {
  0*x
  color rgb 0.5
  photons { refraction on reflection on }
  translate <0, 0, 5>
  rotate <45, 0, -120>
}

light_source {
  0*x
  color rgb 0.5
  photons { refraction on reflection on }
  translate <0, 0, 5>
  rotate <-50, 0, -110>
}


#declare Cut = intersection {
  #declare planeCount = 0;
  #while (planeCount < 4)
    plane {
      z, 0
      rotate <-137.75, 0.0, -11.25>
      translate 1.0*y
      rotate <0, 0, -90*planeCount>
    }
    plane {
      z, 0
      rotate <-42.0, 0.0, -11.25>
      translate  <0.0, 1.0, 0.03>
      rotate <0, 0, -90*planeCount>
    }
    #declare planeCount = planeCount +1;
  #end
}

intersection {
  object { Cut }
  material {   
      texture {      
         pigment {
           color rgbf <0.2, 1, 0.1, 0.97>
         }      
         finish {
            reflection { 0.02 }
         }
      }   
  }
  
  photons {
    target
  }
}

plane {
  z,0
  material {
    texture {
      pigment { rgb <0.8, 0.8, 0.8> }
    }
  }
  translate  -0.851*z   
}


Post a reply to this message

From: Nathan Kopp
Subject: Re: Possible bug w/ photons, reflection and multiple light sources
Date: 3 Oct 2001 22:35:00
Message: <3bbbcad4@news.povray.org>
"Jari Juslin" <zds### [at] ikifi> wrote...
> I have encountered quite strange behaviour, when using photons specified
> with count, reflection and more than one light source with object
> consisting of intersection on bunch of planes. Code below is the
> simplest one I have managed to show the bug. Change the value of showBug
> to false to make see what I am expecting to see and true to see the odd
> behaviour, which looks like is multiplies intensity of colors at least
> by magnitude of five...

I'm not sure if the bug still exists... I wasn't able to get anything
strange to show up in my development version of POV 3.5 beta.  I did
make some minor photon changes recently... so you may want to be on the
lookout for the next beta.

However, please note that your object is unbound (is that the right word?),
which will cause problems for the estimate that "count" uses to set the
spacing.  If you place a manual bounding box on your object, it might work
better. Otherwise, stick with "spacing" when using photons on unbound
objects.

Also, it would be best to use autostop, especially if the object remains
unbound.

I was able to get expected results with the following photon settings:
    spacing 0.7/40
    autostop 0

-Nathan


Post a reply to this message

From: Jari Juslin
Subject: Re: Possible bug w/ photons, reflection and multiple light sources
Date: 4 Oct 2001 04:35:24
Message: <3BBC1F4B.FF47063@iki.fi>
Nathan Kopp wrote:
> I'm not sure if the bug still exists... I wasn't able to get anything
> strange to show up in my development version of POV 3.5 beta.  I did
> make some minor photon changes recently... so you may want to be on the
> lookout for the next beta.

Ok. Strange enough, now on the morning when I started a brand new
instance of POV and tried to reproduce the problem, it has vanished. I
assume the minimization of the scene file might have caused that, since
with more complicated files I have had similar problems systematically.
Or then beta 4 already has different behaviour compared to 1 and 2 in
this case.

> If you place a manual bounding box on your object, it might work
> better. Otherwise, stick with "spacing" when using photons on unbound
> objects.

Ok.
 
> Also, it would be best to use autostop, especially if the object
> remains unbound.

In fact, I used it originally, but I removed the autostop directive when
minimizing the scene file showing the bug. Using or not using the
autostop didn't seem to have any relation to the bug appearing or not
appearing when I was able to reproduce the bug at all...

I think this is Murphy's Law or something, that the bug that has annoyed
me for weeks now disappears as soon as I start extracting it :-).

-- 
          /"\                           |    iki.
          \ /     ASCII Ribbon Campaign |    fi/
           X      Against HTML Mail     |    zds
          / \


Post a reply to this message

From: Jari Juslin
Subject: Re: Possible bug w/ photons, reflection and multiple light sources
Date: 4 Oct 2001 05:04:57
Message: <3BBC2638.5682C50F@iki.fi>
Nathan Kopp wrote:
> However, please note that your object is unbound (is that the right
> word?), which will cause problems for the estimate that "count" uses

I made tests with more complicated scene and I got my original problem
(photons not appearing at all when using count instead of spacing)
disappear, so consider this "bug" closed for now. Strange thing is, that
it did work with MegaPov, and that lead me thinking the 3.5 was somehow
broken.

Thank you for your advice.

-- 
          /"\                           |    iki.
          \ /     ASCII Ribbon Campaign |    fi/
           X      Against HTML Mail     |    zds
          / \


Post a reply to this message

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