Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

No lighting in VTK

Tags:

python

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.

like image 399
Peter Greaves Avatar asked Mar 04 '14 15:03

Peter Greaves


1 Answers

To disable shading you really have to set lightning off.

To do so specify actor.GetProperty().LightingOff() on the respective vtkActor. See e.g. http://www.vtk.org/doc/nightly/html/classvtkProperty.html

Based on the vtk Pyramid the effect can be seen in the following example

enter image description here

like image 56
Jakob Avatar answered Sep 28 '22 07:09

Jakob