[vtkusers] How to display a object without lighting?

Lin M majcjc at gmail.com
Fri Nov 28 21:43:08 EST 2014


Hi David,

Thanks! I did't find these functions in mapper. I assume you mean
actor->GetProperty()->SetAmbient(1.0), etc?
And I also found a function actor->GetProperty()->LightingOff(). This seems
to meet my requirement.

Best,
Lin

On Sat, Nov 29, 2014 at 5:33 AM, David Gobbi <david.gobbi at gmail.com> wrote:

> 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/20141129/54e42c4f/attachment.html>


More information about the vtkusers mailing list