Can diffuse and specular component of Phong model shine thru object?

| | August 5, 2015

I have been implementing simple 3D engine in OpenGL, mostly based on tutorials by Tom Dalling. I have implemented the Phong lightening model as described in his tutorial, but I see light artifacts on concave shaped objects (and also when using normal mapping). I came to a point, where i donĀ“t know if my code is broken, or this is actually normal behaviour, and you need special handling for it.

I think that these artifacts could be happening, because the normals of concave object at same points head back into the point light source, not actually considering there is a solid object in between. I tried to do a little scetch of this situation in 2D (for diffuse component): Diffuse light on concave object

So I need to know, if this is a common problem of this light model, or my calculations are wrong.

One Response to “Can diffuse and specular component of Phong model shine thru object?”

  1. That simple lighting does not know anything about other objects in scene, nor shadows they cast. It just does the lighting knowing the light position and surface normal (and eye position for specular). That’s it. No occlusion info, no light refraction, no reflection, no anything, just lighting.

    If you need object shadows, there are separate techniques for that (Shadow Mapping, Stencil Shadows, etc.) Some are less well suited for self-shadowing, some are better.

    Does that answer your question?

Leave a Reply