POV-Ray : Newsgroups : povray.general : Lights and photons glitches (possibly bug) : Re: Lights and photons glitches (possibly bug) Server Time
5 Aug 2024 14:14:12 EDT (-0400)
  Re: Lights and photons glitches (possibly bug)  
From: hughes, b 
Date: 10 Sep 2002 00:51:55
Message: <3d7d7a6b@news.povray.org>
Here's what I think must be Bruce's, changed a little.

// begin scene code

#declare Spot=no; // yes for spotlights, no for cylinder lights

#version 3.5;

global_settings
{
photons
        {
        spacing 0.01
        }
}

// reflected lights

// when using spots, the results are what I expect,
//    3 distinct lit areas on the left
// when using cylinder, photons from all three
//     lights accumulate at one area

#macro spot_or_cylinder()
 #if (Spot=yes)
 spotlight radius 1 falloff 1.5 tightness 10 // parallel
 #else
 cylinder radius 1 falloff 1.5 tightness 10 // parallel
 #end
#end

light_source
{
0,
color blue 3
spot_or_cylinder()
point_at z
photons { reflection on refraction on }
translate <0.5, 0.25, -3>
}

light_source
{
0,
color green 3
spot_or_cylinder()
point_at z
photons { reflection on refraction on }
translate <0.5, 0.5, -3>
}

light_source
{
0,
color red 3
spot_or_cylinder()
point_at z
photons { reflection on refraction on }
translate <0.5, 0.75, -3>
}


// reflecting box
box
{
0, 1
texture
{
pigment { color rgb .5 }
finish { reflection {.6,.9} }
}
rotate y*45

photons
{
target
reflection on
refraction off
collect off
}
}

// refracting box
box
{
0, 1
texture
{
pigment { color rgbf .999 }
finish { diffuse 0 }
}
interior {
        ior 1.5
        }
rotate y*45
translate -.1

photons
{
target
reflection on
refraction on
collect off
}
}

// plain box
box
{
0, 1.5
texture
{
pigment { color rgb 1 }
}
rotate y*225

photons
{
        target
reflection off
refraction off
collect on
}
}

camera { location <0,1,-3> look_at <0,0,0> }

light_source
{
<-3,4,-5> color rgb 1
photons { reflection off refraction off }
}

plane { y,0 texture { pigment { checker rgb 0, rgb 1 } } }

// end scene code


Post a reply to this message

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