[vtkusers] Re: displaying polydata without lighting

Tushar Udeshi udeshi at mcs.anl.gov
Wed Jul 12 19:46:22 EDT 2000


Hello!
In respone to my own email, the desired effect can be acheived by:

vtkRenderer->SetAmbient(1);
then for all actors 'a' to be displayed without lighting
a->GetProperty()->SetDiffuse(0);
a->GetProprty()->SetAmbient(1);
for all actors 'l' to be lit
l->GetProperty()->SetDiffuse(color);
l->GetProperty()->SetAmbient(small ammount);

This works but seems rather wasteful since lighting calculations are
being done even for the polygons which need to be rendered as unlit?

Thanks,
Tushar

On Wed, 12 Jul 2000, Tushar Udeshi wrote:

> 
> Hello!
> This may be a trivial quesiton but I've been trying to do the following
> for the past 2 days without any success:
> 
> I need to display vtkPolyData as flat shaded unlit polygons. The OpenGL
> equivalent of that would be:
> 
> glDisable(GL_LIGHTING);
> render the polygons
> 
> How do I do the same using vtk? I've tried setting the StartMethod of the
> corresponding vtkPolyDataMapper to do glDisable(GL_LIGHTING) but that
> has no effect.
> 
> Any help would be greatly appreciated.
> 
> Regards,
> Tushar
> 
> 
> 
> 
> 
> 





More information about the vtkusers mailing list