I have a Pov-Ray scene looking at a sphere with a solid cylinder on axis passing through the camera and the sphere center. The rendered image has rgb values of <89,89,89> in the area occupied by the solid cylinder. Shouldn't these pixels be opaque (i.e. have intensity values <0,0,0>)? How does light get to these pixels if there's in effect a solid javelin piercing the CCD chip at those pixels? Is it because the sphere and the cylinder occupy the same space? Here's the script. I am trying to measure contrast with various objects and light sources so I need the correct grey levels. What am I doing wrong? I run the script with the following switches:
pvengine.exe file.pov -W1000 -H1000 Antialias_Threshold=0.0
.
#version 3.7;
#include "colors.inc" // The include files contain
#include "textures.inc" // pre-defined scene elements
#include "shapes.inc"
global_settings { assumed_gamma 1.0 }
background { color Black }
camera {
orthographic
location <2.43875, 12.26, 0.>
look_at <0, 0, 0>
sky <0, 0, 1>
right <-1, 0, 0>
angle 1.2
}
#declare sph = sphere {
<0, 0, 0>, 1
texture { pigment { color White }}
finish { diffuse albedo .3 }
}
#declare cyl = cylinder {
<0.,0., 0.>, // Center of one end
<195.277, 981.69, 0.>, // Center of other end
0.01 // Radius
color Black
no_image}
#declare LS1 = light_source {
<-1.5955, 2.38744, -0.323932>
color rgb<0.065,0.065,0.065>
area_light <-1.37019, -0.915683, 0.>, <0., 0., 2.36> 3, 3
circular
area_illumination on
}
light_group {
light_source {LS1}
cyl
sph
global_lights off
}
Edit: The only way I've found to make the cylinder black is to chop it out of the sphere using "difference". Then display the difference object along with the cylinder. But why? Shouldn't the interface of two solid objects be opaque, hence rgb 0,0,0?
#declare chopped = difference {
sphere {
<0, 0, 0>, 1
finish { diffuse albedo .3 }
texture { pigment { color White }}
color White
}
cylinder {
<0.,0., 0.>, // Center of one end
<195.277, 981.69, 0.>, // Center of other end
0.01 // Radius
}
}