[vtkusers] flat shading in vtk

David Doria daviddoria+vtk at gmail.com
Mon Jan 25 16:53:19 EST 2010


On Mon, Jan 25, 2010 at 4:18 PM, David Gobbi <david.gobbi at gmail.com> wrote:
> Try property->SetInterpolationToFlat().
>
>  David
>
> On Mon, Jan 25, 2010 at 2:05 PM, Liam Kurmos
> <quantum.leaf at googlemail.com> wrote:
>> Is there an easy way to disable shading in vtk?
>> I want all pixels drawn for a polygon to be constant colour,
>> independent of surface normals.
>>
>> I'm going to try having only an emissive color and turning off a
>> lights, but now i'm stuck turning off the default light.
>>
>> ren1->RemoveAllLights();
>>
>> doesn't seem to be having any effect.
>>
>> searches like
>>
>> "site:vtk.org/Wiki/VTK/Examples getLights"
>>
>> are coming up blank, so i wonder if i'm on the right track.
>>
>> any help much appreciated,
>>
>>
>> Liam
>> _______________________________________________
>> Powered by www.kitware.com
>>
>> Visit other Kitware open-source projects at http://www.kitware.com/opensource/opensource.html
>>
>> Please keep messages on-topic and check the VTK FAQ at: http://www.vtk.org/Wiki/VTK_FAQ
>>

As David G. mentioned, you can set the properties of each actor, like this:
http://www.vtk.org/Wiki/VTK/Examples/Visualization/FlatShading

It seemed like Liam was looking for a more global way to turn off
shading - is anyone familiar with a way to do that?

Thanks,

David D.



More information about the vtkusers mailing list