[vtkusers] lighting coefficients

Benj Thomas bthomas at engineering.uiowa.edu
Sat Mar 2 16:47:45 EST 2002


I am working on a imaging application using wxPython and vtk.  I am
currently working on the VRMLimporter/exporter.  My problem is that the
application uses diffuse/specular coefficients to adjust the color of
the object(ambient is set to (0,0,0)), and VRML saves colors as just the
RGB components of the diffuse/specular light.  So I'm trying to figure
out a way to set the diffuse and specular lights to there RGB values and
while setting the coefficients to one.  The problem is when I call
GetColor before and after I get different values.  What I really need to
know I guess is how Set/GetColor() are defined.  I have been just
multiplying the coefficient and RGB values and then adding the Diffuse
to Specular but this doesn't give me the right color.  Any information
on lighting coefficient and how the diffuse/specular/ambient come
together to define the actual color would be greatly appreciated. 
Thanks.

Benj



More information about the vtkusers mailing list