|
|
There is a bug in UVPov, but it's probably not exactly what you'd expect.
I'll paste in a modified version of your code that does show photons in
media. The problem is that UVPov incorrectly handles cylinder lights. It
does not shoot parallel rays, so the photons coming out of cylinder lights
act more like photons coming out of a spot light. I thought I documented
this, but I guess I didn't. The moral of the story is to use spot lights,
not cylinder lights. I'll eventually fix cylinder lights. Someday.
-Nathan
Ok, here's the changed scene, with comments:
// First, I added
plane{-y, 0 pigment{ checker color rgb 1, color rgb .5}}
camera{location 11 look_at 0}
#declare phd = 1;
global_settings{
max_trace_level 20
photons{
gather 20, 100
radius .1*phd, 2, .1*phd
autostop 0
jitter .2
expand_thresholds 0.2, 40
max_trace_level 20
max_media_steps 100
}
}
/* VERY IMPORTANT:
I moved the light source up a bit so it is not exactly on the
surface of the plane. It kept thinking that it was inside the
plane (which was non-hollow) and thus put no photons in
media.
*/
light_source{
x*50+.01*y rgb <1,0,0>
cylinder
radius .1
point_at <0,0,0>
}
box{<-2,0,-.1>,<2,1,0>
pigment{rgb 1}
finish{ambient 0 diffuse 0 reflection 1}
rotate y*-45
photons{
separation 0.05*phd // changed to a more reasonable number
refraction off
reflection on
}
}
difference{
cylinder{0, y*2, 10}
cylinder{y*-.1, y*2.1, 9.9}
box{<10.01, -.001, -1>,<9.5, 2.02, 1>}
pigment{rgb 1}
finish{
ambient .1
diffuse 1
}
}
sphere{ // Media to scatter light
0, 11
pigment{rgbt 1}
finish{ambient 0 diffuse 0}
hollow
interior{
ior 1
media{
scattering{ 1, 1 extinction 0}
method 3
intervals 1
samples 20,20
/* increased the samples. One sample and one interval just don't
cut it. You'll miss everything interesting that way. Don't forget that
method 3 _ignores_ the max_samples number and only pays attention
to min_samples */
}
}
photons{photo
ns_pass_through}
/* photons_pass_through was added so that photons go through this
media-containing object on their way to the mirror. Otherwise, when they
don't hit the target object (they hit this instead) they are discarded */
}
Post a reply to this message
|
|