0
\$\begingroup\$

I have a typical Phong shading with specular light. I have all the parameters tuned so to give appropriate highlights from a point light source. Now the problem I have is a new object that has a large flat surface which tends to face directly towards the light source (which is a bit offset from the camera). It also has a normal map which is primarily in one direction (steel panels). This results in a pure white object.

I have a lot of options to try and work around the problem, but I was wondering if this is a common issue and perhaps there is a clean workaround. The various options I see (and am trying) are:

  • Reduce specular map intensity. There are two problems here, first when the object is not facing the camera it looks dull, second on a low quality setting I don't use specular maps.
  • Clamp the range of specular light. This of course limits the highlights for the entire scene. It also limits the highlights when the object isn't facing the camera.
  • Put a per-object specular light limit. This at least doesn't affect the whole scene, but does dullen this object when not facing the camera.
\$\endgroup\$

1 Answer 1

2
\$\begingroup\$

I've seen many variants of lighting code over the years, 90% of the time it just comes down to artistic tweaking, either the specular power, or the specular colour to gain the desired effect (and balancing that with the diffuse colour and ambient).

I've also seen a few cases where the specular factor is additionally multiplied by the diffuse factor as well.

But ultimately if you have a bright specular colour, and a low power, or a very distant point with no fall off (basically a directional light) you'll always get 'lit up' when the normal is close to the half-vector between your view/light vectors. Think of solar panels on a satellite or glass-fronted buildings.

Also be sure to look at Blinn-Phong instead of pure Phong as the specular effect is subtly different for reflections off of objects at an angle to the viewer.

\$\endgroup\$
1
  • \$\begingroup\$ Sorry, I actually am using Blinn-Phong. \$\endgroup\$ May 19, 2014 at 15:02

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .