Specular Reflection in Phong Lighting Model

Specular Reflection in Phong Lighting Model

Post by Gordon G. Bowma » Fri, 16 Oct 1998 04:00:00

When implemting the Phong Light Equation

I = (Ka * Ia) +( Kd * I * NdotL) + (Ks * I * (VdotR)^n),

the specular coefficient Ks is usually not the same as the diffuse
coefficient Kd. The assumption is often made that specular highlights
are determined by the color of the light source, not the material, e.g.
for white light, Ksr=Ksg=Ksb=1.0 (this is true of plastic).

By making this assumption, however, lowering the sharpness value (n) to
mimic a dull surface such as cardboard has the effect of broadening the
range of specular visibility (which is good) but the specular highlight
is too bright (with white light).

The fact is, specular highlights are determined by both the light and
the material. Thus what appears to be needed is an array of specular
coefficients, which vary with the light intensity, for various surfaces.

Do such arrays exists anywhere?



1. Phong specular light/intensity?

Merry xmas and happy new year to all :)

I'm doing Phong interpolating the X/Y/Z normals. Ok, thats normal :)
And  for each pixel I'm doing:

    len = cx*cx+cy*cy+cz*cz; len = sqrt(ilen);
    out = (cx*Light.outnml.x + cy*Light.outnml.y + cz*Light.outnml.z) / len;

    out = 0+out*256; //where it starts, colors of the ramp;
    if (out < 0)   out = 0;    else
    if (out > 255) out = 255;

    putpixel (x, y, out);

from where the cx, cy, cz are the interpolated normals, Light.outnml is
the normal of the light source that has been precalced, and out is the
color value of the pixel to plot.

Now my question is how can I control the specular light/intensity? I tried
to play with the out variable, but didnt get me anywhere.

And if anyone knows how to speed up this leaving out the "standard" optimizes
like unrolling, fixfloat & integer square, I'd like to know (but this is

Any help is greatly greatly appreciated                       MARAUDER *Synergy
There only can be one, and I'll be him   <!Anonymous>  Eat my steel!
Uhh, wouldn't be that a bit boring?  <Ragnar H0jland>  Mmm.. Tasty. More please

2. Looking for raytraced robots, battletech/mechs, soccerballs, motorcycles?

3. Material constants for Phong lighting model

4. PSD in Corel

5. Extended Phong lighting model weakness?


7. Lighting - reflection models (mathematical Q)

8. Oops, sorry about the previous posted image

9. WAVE OPTICS Light Reflection Model?

10. Self-reflection in physical light models.

11. Lighting - reflection models (mathematical Q)

12. WAVE OPTICS Light Reflection Model?

13. Phong Illumination and Specular highlights problem...