Reading — step 1 of 5
Read
Phong & Blinn-Phong Specular Lighting
Lambertian diffuse handles the matte component of a surface. To make it look shiny, you need a specular highlight — the bright spot where the light direction reflects through the surface and into the camera.
Phong reflection model (1975):
diffuse = max(0, n . l) * kd
specular = max(0, r . v)^shininess * ks where r = reflect(-l, n) = 2*(n.l)*n - l
ambient = ka
color = ambient + diffuse + specular
The exponent shininess (10-200) tightens the highlight: low = soft, high = mirror-like dot.
Blinn-Phong (1977) — same look, much cheaper:
h = normalize(l + v) // half-vector between light and view
specular = max(0, n . h)^shininess * ks
n . h is geometrically half the angle of r . v, so the shininess exponent needs to roughly double to match Phong (Blinn-shininess ~= 4 * Phong-shininess is a common rule of thumb).
Why Blinn-Phong wins for real-time: no reflection vector. l + v and a normalize is cheaper than three multiplies plus subtract for reflect. OpenGL's fixed-function pipeline shipped Blinn-Phong.
PBR (physically-based rendering) replaces both with energy-conserving microfacet models (GGX/Trowbridge-Reitz), but Blinn-Phong is still the right default for stylized work and education — and it's plenty for a CHIP-8-era game engine.
Common pitfall: forgetting to normalize l and v before forming h. Both must be unit; the half-vector is then normalize(l + v) because the sum of two unit vectors usually isn't unit-length.
Discussion
Ask a question, share an insight, or help someone who’s stuck.
Sign in to post a comment or reply.
Loading…