POV-Ray : Newsgroups : povray.beta-test : Photon bug Server Time
4 Nov 2024 23:20:28 EST (-0500)
  Photon bug (Message 1 to 2 of 2)  
From: Kari Kivisalo
Subject: Photon bug
Date: 13 Sep 2001 23:24:09
Message: <3BA17910.EB0FC3F6@engineer.com>
Photons disappear from a light source if a second light source
is defined after the first. Change their order and photons become
visible again.

1GHz AMD TB 256MB DDR Win98 SE beta 2

#declare PHOTON=1;

global_settings{
  #if(PHOTON=1)
    photons {
      spacing 0.05
      autostop 0
      jitter .4
    }
  #end
  max_trace_level 5
  adc_bailout 0.001
  assumed_gamma 1.0  
} 

#macro Spot(Col,Loc,Point,Rad,Fall,Tigh,P)
  #local Nloc=Loc-Point;
  #local R=vlength(Nloc);
  #local Yrot=degrees(atan2(-Nloc.z,Nloc.x));
  #local Zrot=degrees(asin(Nloc.y/R));
  light_source {
    <R,0,0>
    rgb Col 
    spotlight radius Rad falloff Fall tightness Tigh point_at 0
    #if(P=1)  
      photons {
        refraction on
        reflection on
      }
    #else
      photons {
        refraction off
        reflection off
      }
    #end
    rotate Zrot*z
    rotate Yrot*y
    translate Point 
  }
#end

camera{
  location <-100,140,-340>
  direction <0, 0, 50/36>
  up        <0, 0.666, 0>
  right     <1, 0, 0>
  look_at<-100,113,-250>
}

sphere{
  0,10 translate<-100,110,-250> 
  photons{
    target
    collect off
    reflection on
    refraction on
  }

  pigment{ rgbt 1}
  finish{diffuse 0 ambient 0}
  interior{ior 1.5 }
}


// points to the sphere
Spot(<1,0.8,0.6>,<50,290,-350>,<-100,100,-250>,1,14,1,1)

// points to a a wall (removed) behind the sphere
// comment the next line or move it before the 1st Spot() to make photons visible and
smoother 
Spot(<1,0.9,0.8>*16,<-150,220,-200>,<-100,30,0>,1,40,1,1)
    

box{
  <-50,-1,-50>,<50,0,50>
  translate <-100,100,-250>
  pigment{rgb 1}
  finish{diffuse 0.6 ambient 0}
}

_____________
Kari Kivisalo


Post a reply to this message

From: Nathan Kopp
Subject: Re: Photon bug
Date: 30 Sep 2001 23:43:58
Message: <3bb7e67e$1@news.povray.org>
"Kari Kivisalo" <ray### [at] engineercom> wrote...
>
> Photons disappear from a light source if a second light source
> is defined after the first. Change their order and photons become
> visible again.

Fixed for next beta.

-Nathan


Post a reply to this message

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