|
|
This occurs under 3.6.1 and 3.7b33, and is so much of an edge case that I am
almost hesitant to report it, but...
While working on a scene that uses scattering media and a spotlight, the media
refused to scatter. Instead, only the absorption component rendered, leaving a
dark, unshaded media. The scattering media behaved as expected when the
spotlight was a point light, but only the emission and absorption medias (or
the absorption component of scattering media) rendered when it was a spotlight,
even to the point that the scattering media became completely transparent with
extinction set to 0.
I couldn't even get it down to a minimal scene until I realized that I was
suffering from my own 'cleverness.' The scene involved spotlights that were
being used as flashlights, and had code like the following (which destroys
scattering media):
#local Camera_location = <0, 5,-22>;
#local Camera_look_at = <2, 5, 5>;
camera
{
location Camera_location
look_at Camera_look_at
}
light_source
{
Camera_location,
color rgb <1,1,1>
spotlight
point_at Camera_look_at
radius 6
tightness 50
falloff 7
fade_distance 15
fade_power 2
}
However, everything worked correctly after changing the camera to this:
camera
{
location Camera_location + <0.001,0,0> // move camera just a little bit
look_at Camera_look_at
}
It is kind of silly, I know, but I am sooo relieved to get it working again
(since the scene heavily depends on the flashlight for lighting), I figured I'd
post it in case someone out there runs into something similar.
Anyway, here is a complete minimal scene for the curious:
//---------CODE:
sphere{
<0,0,0>, 1
pigment{ color rgbt <1,0,0,0.95> }
interior{
media{
samples 10
scattering{ 1, color rgb 1 }
density{ spherical }
}
}
hollow
translate <0,1,0>
}
plane{
y, 0
pigment{ color rgb 1 }
}
camera{
location <0,2,-10> // media is incorrect
// location <0,2,-10> + <0.0001,0,0> // media is correct
look_at <0,1,0>
}
light_source{
<0,2,-10>, color rgb 1
// commenting out spotlight portion yields correct media
spotlight point_at <0,1,0>
radius 10
tightness 1
falloff 20
fade_distance 15
fade_power 2
}
//----------END CODE
Lesson learned: Don't put stuff in the same place as other stuff.
-Reactor
Post a reply to this message
|
|