[vtkusers] How to display a object without lighting?

David Gobbi david.gobbi at gmail.com
Fri Nov 28 16:33:24 EST 2014


Hi Lin,

Lighting is always required (otherwise everything is black, so I think
that what you need is ambient lighting, instead of directional lighting:

mapper->SetAmbient(1.0);
mapper->SetDiffuse(0.0);
mapper->SetSpecular(0.0);

 - David


On Fri, Nov 28, 2014 at 3:55 AM, Lin M <majcjc at gmail.com> wrote:

>
> Hi guys,
>
> I implemented a Spherical Harmonics Lighting in my program and set the
> illuminance as the vertex color. I hope to display the object just with the
> color array which I set and do not add any effect from the light in vtk.
> (Or it can be interpreted each vertex illuminated itself, the brightness is
> stored in its color) If I just switch off the light, it shows all dark. So
> this is not workable. Any suggestions? Thank you!
>
> Best,
> Lin
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://public.kitware.com/pipermail/vtkusers/attachments/20141128/8c40c8bc/attachment.html>


More information about the vtkusers mailing list