简体   繁体   English

VTK没有照明

[英]No lighting in VTK

I'd like to just display the polygons in their specified colour with no shading, is this possible? 我想只显示指定颜色的多边形而没有阴影,这可能吗? I've tried setting each of ambient, specular, diffuse etc. to 1 and the others to 0 with no luck. 我已经尝试将环境,镜面反射,漫反射等各自设置为1,其他设置为0,没有运气。

To disable shading you really have to set lightning off. 要禁用阴影,您必须关闭闪电。

To do so specify actor.GetProperty().LightingOff() on the respective vtkActor. 为此,请在相应的vtkActor上指定actor.GetProperty().LightingOff() See eg http://www.vtk.org/doc/nightly/html/classvtkProperty.html 参见例如http://www.vtk.org/doc/nightly/html/classvtkProperty.html

Based on the vtk Pyramid the effect can be seen in the following example 基于vtk金字塔 ,可以在以下示例中看到效果

在此输入图像描述

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM