Question about materials.

Patrick Sweeney ([email protected])
Mon, 16 Oct 1995 17:01:32 -0400 (EDT)


Hi all,
I have a couple questions about Materials (I don't have the open
inventor programming manuals yet...the few stores I checked didn't carry
them...guess I will have to have them ordered). How do the ambientColor,
difsuseColor, specularColor, and shininess fields eslate to the standard
Phong illumination model? I am using:
red = ambientColor[0] + difsuseColor[0] * dotproduct(L,N) +
specularColor[0] * cos(theta) ^ shininess.
green = ambientColor[1] + difsuseColor[1] * dotproduct(L,N) +
specularColor[1] * cos(theta) ^ shininess.
blue = ambientColor[2] + difsuseColor[2] * dotproduct(L,N) +
specularColor[2] * cos(theta) ^ shininess.
L-vector to light, N- surface normal, theta-angle between normal and view
vector.
Also, I have been computing the color of a light as:
red=intensity*color[0]
green=intensity*color[1]
blue=intensity*color[2]
Am I interpreting these fields correctly? Thanks.
- pat

  • Next message: Vassilis Bourdakis: "Re: VRML / QuickTime VR marriage"
  • Previous message: Paul S. Strauss: "Re: Why does DEF do instancing? (fwd)"
  • Next in thesad: Bernie Roehl: "Re: Question about materials."