Fandom

Computer Graphics

Specular highlight

158pages on
this wiki
Add New Page
Talk0 Share
File:Specular highlight.jpg

A specular highlight is the bright spot of light that appears on shiny objects when illuminated (for example, see image at right). Specular highlights are important in 3D computer graphics, as they provide a strong visual cue for the shape of an object and its location with respect to light sources in the scene.

MicrofacetsEdit

The term specular means that light is perfectly reflected in a mirror-like way from the light source to the viewer. Specular reflection is visible only where the surface normal is oriented precisely halfway between the direction of incoming light and the direction of the viewer; this is called the half-angle direction because it bisects (divides into halves) the angle between the incoming light and the viewer. Thus, a specularly reflecting surface would show a specular highlight as the perfectly sharp reflected image of a light source. However, many shiny objects show blurred specular highlights.

This can be explained by the existence of microfacets. We assume that surfaces that are not perfectly smooth are composed of many very tiny facets, each of which is a perfect specular reflector. These microfacets have normals that are distributed about the normal of the approximating smooth surface. The degree to which microfacet normals differ from the smooth surface normal is determined by the roughness of the surface.

The reason for blurred specular highlights is now clear. At points on the object where the smooth normal is close to the half-angle direction, many of the microfacets point in the half-angle direction and so the specular highlight is bright. As one moves away from the center of the highlight, the smooth normal and the half-angle direction get farther apart; the number of microfacets oriented in the half-angle direction falls, and so the intensity of the highlight falls off to zero.

The specular highlight often reflects the color of the light source, not the color of the reflecting object. This is because many materials have a thin layer of clear material above the surface of the pigmented material. For example plastic is made up of tiny beads of color suspended in a clear polymer and human skin often has a thin layer of oil or sweat above the pigmented cells. Such materials will show specular highlights in which all parts of the color spectrum are reflected equally. On metallic materials such as gold the color of the specular highlight will reflect the color of the material.

Models of MicrofacetsEdit

A number of different models exist to predict the distribution of microfacets. Most assume that the microfacet normals are distributed evenly around the normal; these models are called isotropic. If microfacets are distributed with a preference for a certain direction along the surface, the distribution is anisotropic.

Phong distributionEdit

In Phong shading, the intensity of a specular highlight is usually calculated as k_{spec} = \cos ^n (N, H), where N is the smooth surface normal and H is the half-angle direction. (The notation \cos (N, H) means the cosine of the angle between the directions N and H.) The number n is called the Phong exponent, and is a user-chosen value that controls the apparent smoothness of the surface. This equation implies that the distribution of microfacet normals is based on the cosine of the angle between the microfacet normal and the smooth surface normal, raised to a power. While this is a useful heuristic and produces believable results, it is not a physically based model.

Gaussian distributionEdit

A slightly better model of microfacet distribution can be created using a Gaussian distribution. The usual function calculates specular highlight intensity as:

k_{spec} = e^{- \left ( \frac{\cos (N, H)}{m} \right )^2}

where m is a constant between 0 and 1 that controls the apparent smoothness of the surface.

Material from this section adapted from: Glassner, Andrew S. (ed). An Introduction to Ray Tracing. San Diego: Academic Press Ltd, 1989. p. 148.

Beckmann distributionEdit

A physically based model of microfacet distribution is the Beckmann distribution. This function gives very accurate results, but is also rather expensive to compute.

k_{spec} = \frac{1}{4m^2 \cos ^4 (N, H)} e^{ - \left ( \frac{\tan (N, H)}{m} \right )^2 }

where m is as before: a constant between 0 and 1 that controls the apparent smoothness of the surface.

Material from this section adapted from: Foley et al. Computer Graphics: Principles and Practice. Menlo Park: Addison-Wesley, 1990. p. 764.

Heidrich-Seidel anisotropic distributionEdit

The Heidrich-Seidel distribution is a simple anisotropic distribution, based on the Phong model. It can be used to model surfaces that have small parallel grooves or fibers, such as brushed metal, satin, and hair. The specular highlight intensity for this distribution is:

k_{spec} = \left [ \sin(L, T) \sin(V, T) - \cos(L, T) \cos(V, T) \right ] ^n

where n is the Phong exponent, V is the viewing direction, L is the direction of incoming light, and T is the direction parallel to the grooves or fibers at this point on the surface.

Using multiple distributionsEdit

If desired, different distributions (usually, using the same distribution function with different values of m or n) can be combined using a weighted average. This is useful for modelling, for example, surfaces that have small smooth and rough patches rather than uniform roughness.

See alsoEdit

Ad blocker interference detected!


Wikia is a free-to-use site that makes money from advertising. We have a modified experience for viewers using ad blockers

Wikia is not accessible if you’ve made further modifications. Remove the custom ad blocker rule(s) and the page will load as expected.