Re: Light & Material's interaction!

New Message Reply Date view Thread view Subject view Author view

John Rohlf (jrohlf++at++tubes)
Sat, 10 Jun 95 12:22:33 PDT


>
>
> I am currently working on quantifying the interaction of Ambient and
> Diffuse light and material properties to try and relate them to some
> physically correct models that we have. In a perfly hack I've set up a
> 4 face pyramid with each face having a different color: red, green, blue
> and white. I've also setup sliders to change the Materials ambient and
> diffuse colors and a toggle to switch between various Material Color
> Modes.
>
> The CONFUSING behavior: When I set the pfMtlColorMode to DIFFUSE and
> then vary the Mtl DIFFUSE color I see no apparent effect on the colors of
> my pyramid. HOWEVER, if I change the material AMBIENT color (with the
> PFMTL_CMODE_DIFFUSE), the pyramid's color are affected and change with
> changing of ambient color. Is this behavior normal? correct? Does it
> make sense that if the MaterialColorMode is PFMTL_CMODE_DIFFUSE the
> AMBIENT material colors are active?
>
> The same behavior is shown when I use the PFMTL_CMODE_AMBIENT. That is
> the pyramids colors are changed by changing the diffuse material colors
> and not the ambient material colors (as I would expect it).
>
> Another, goody: When I change to this PFMTL_CMODE_DIFFUSE mode from
> another mode (like PFMTL_CMODE_AMBIENT) the WHITE face of the pyramid
> turns BLACK. (Is there a force of opposites at work here? ;)
>
>
> I have many more questions which I can't find answers to, but I will
> restrain... I have read all the Performer documentation and only a
> couple of many possible ColorModes are briefly mentioned there. GL
> documentation was not of much help either. I did read the OpenGL Ch 6 on
> Lighting, however, are all the definitions contained therein valid for
> Performer? It seems to me that OpenGL is capable of much more than
> Performer is, in terms of lighting, shadows, etc. Can I depend on the
> lighting and material mathematical definitions given in the OpenGL
> literature and considered them to be same for Performer?
>

        When the pfMtlColorMode is other than PFMTL_CMODE_COLOR,
then pfGeoSet colors will define the indicated material color,
e.g. when using PFMTL_CMODE_DIFFUSE, the diffuse color is specified
the pfGeoSet while the ambient, specular, and emissive colors
are specified by the pfMaterial. If you are not using pfGeoSets,
then in this case the diffuse color is specified by the
current GL color, e.g. - c4f() or cpack().


New Message Reply Date view Thread view Subject view Author view

This archive was generated by hypermail 2.0b2 on Mon Aug 10 1998 - 17:51:35 PDT

This message has been cleansed for anti-spam protection. Replace '++at++' in any mail addresses with the '@' symbol.