我有一个 Pov-Ray 场景,正在查看一个球体,轴上的实心圆柱体穿过相机和球体中心。渲染图像在实心圆柱体占据的区域中具有 <89,89,89> 的 rgb 值。这些像素不应该是不透明的(即强度值<0,0,0>)吗?如果实心标枪在这些像素处刺穿 CCD 芯片,光线如何到达这些像素?是不是因为球体和圆柱体占据了同一个空间?这是脚本。我正在尝试测量与各种物体和光源的对比度,因此我需要正确的灰度级。我究竟做错了什么?我使用以下开关运行脚本:
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
}
编辑:我发现使圆柱体变黑的唯一方法是使用“差异”将其从球体中切出。然后将差异对象与圆柱体一起显示。但为什么?两个实体对象的界面不应该是不透明的,因此 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
}
}