[vtkusers] flat shading in vtk

David Gobbi david.gobbi at gmail.com
Mon Jan 25 16:55:12 EST 2010


Oh, that's what you meant. Set "Ambient" to 1, and set "Diffuse" and
"Specular" to 0.  That should completely eliminate all directional
lighting.

   David


On Mon, Jan 25, 2010 at 2:43 PM, Liam Kurmos
<quantum.leaf at googlemail.com> wrote:
> On Mon, Jan 25, 2010 at 9:18 PM, David Gobbi <david.gobbi at gmail.com> wrote:
>> Try property->SetInterpolationToFlat().
>
> That produced flat shading, but the shading is still dependant on the
> surface normals. (just not interpolated/smoothed like gourad).
> What i want is a constant colour. Obviously that will mean object
> won't look very 3d but that is what i want in this case (i want to
> measure how much area of an object i can see by how many pixels of its
> colour i can count in the render window)
>
> I thought property->ShadingOff()/SetShading(0) sounded promising but
> they don't seem to be having any effect (i have a coloured sphere and
> it still gourad shaded).
>
> Also, I managed to turn the lights of with
> ren1->SetAutomaticLightCreation(0);
> but then i discovered there isn't an 'emissive color' property in vtk.
>
> Liam
>
>
>
>>
>>  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
>>>
>>> Follow this link to subscribe/unsubscribe:
>>> http://www.vtk.org/mailman/listinfo/vtkusers
>>>
>>
>



More information about the vtkusers mailing list