HOME

TheInfoList



OR:

A specular highlight is the bright spot of
light Light or visible light is electromagnetic radiation that can be perceived by the human eye. Visible light is usually defined as having wavelengths in the range of 400–700 nanometres (nm), corresponding to frequencies of 750–420 tera ...
that appears on shiny objects when illuminated (for example, see image on right). Specular highlights are important in
3D computer graphics 3D computer graphics, or “3D graphics,” sometimes called CGI, 3D-CGI or three-dimensional computer graphics are graphics that use a three-dimensional representation of geometric data (often Cartesian) that is stored in the computer for th ...
, as they provide a strong visual cue for the shape of an object and its location with respect to light sources in the scene.


Microfacets

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 In geometry, a normal is an object such as a line, ray, or vector that is perpendicular to a given object. For example, the normal line to a plane curve at a given point is the (infinite) line perpendicular to the tangent line to the curve at ...
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. 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

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 Isotropy is uniformity in all orientations; it is derived . Precise definitions depend on the subject area. Exceptions, or inequalities, are frequently indicated by the prefix ' or ', hence ''anisotropy''. ''Anisotropy'' is also used to describe ...
. If microfacets are distributed with a preference for a certain direction along the surface, the distribution is
anisotropic Anisotropy () is the property of a material which allows it to change or assume different properties in different directions, as opposed to isotropy. It can be defined as a difference, when measured along different axes, in a material's physic ...
. NOTE: In most equations, when it says (\hat \cdot \hat) it means \max( 0, (\hat \cdot \hat))


Phong distribution

In the
Phong reflection model The Phong reflection model (also called Phong illumination or Phong lighting) is an empirical model of the local illumination of points on a surface designed by the computer graphics researcher Bui Tuong Phong. In 3D computer graphics, it is somet ...
, the intensity of the specular highlight is calculated as: :k_\mathrm = \, R\, \, V\, \cos ^n\beta = (\hat \cdot \hat)^n Where ''R'' is the mirror reflection of the light vector off the surface, and ''V'' is the viewpoint vector. In the Blinn–Phong shading model, the intensity of a specular highlight is calculated as: :k_\mathrm = \, N\, \, H\, \cos ^n\beta = (\hat \cdot \hat)^n Where ''N'' is the smooth surface normal and ''H'' is the half-angle direction (the direction vector midway between ''L'', the vector to the light, and ''V'', the viewpoint vector). The number ''n'' is called the Phong exponent, and is a user-chosen value that controls the apparent smoothness of the surface. These equations imply that the distribution of microfacet normals is an approximately Gaussian distribution (for large n), or approximately Pearson type II distribution, of the corresponding angle. While this is a useful
heuristic A heuristic (; ), or heuristic technique, is any approach to problem solving or self-discovery that employs a practical method that is not guaranteed to be optimal, perfect, or rational, but is nevertheless sufficient for reaching an immediate, ...
and produces believable results, it is not a physically based model. :Another similar formula, but only calculated differently: :k=(\vec\cdot\vec)^n= vec\cdot (\vec-2\vec(\vec\cdot \vec))n, :where R is an eye reflection vector, E is an eye vector (
view vector This is a glossary of terms relating to computer graphics. For more general computer hardware terms, see glossary of computer hardware terms This glossary of computer hardware terms is a list of definitions of terms and concepts related to com ...
), N is
surface normal vector This is a glossary of terms relating to computer graphics. For more general computer hardware terms, see glossary of computer hardware terms This glossary of computer hardware terms is a list of definitions of terms and concepts related to com ...
. All vectors are normalized ( \, \vec\, =\, \vec\, =1). L is a light vector. For example, \vec=\; \;\; \vec=\; \;\; \vec=\; \;\; n=3 then: :k= vec\cdot (\vec-2\vec(\vec\cdot \vec))n= vec\cdot (\vec-2\vec(0\cdot \frac+1\cdot 0.5 +0\cdot 0))3= := vec\cdot (\vec-\vec)3= vec\cdot (\)3= 0.6\cdot\frac+ 0.8\cdot (-0.5)+ 0\cdot 03=(-0.5196-0.4)^3=0.9196^3=0.7777. :Approximate formula is this: :k=(\vec\cdot \vec)^n=(\vec \cdot ((\vec + \vec) / 2))^n=(\vec \cdot ((\) / 2))^3=(\vec \cdot ((\) / 2))^3= :=(\vec \cdot (\))^3=(0\cdot 0.133 + 1\cdot 0.65 + 0 )^3=0.65^3=0.274625. :If vector H is normalized \frac=\frac=\frac=\, then :k=(\vec\cdot \vec)^n=(0\cdot 0.2+1\cdot 0.9797+0\cdot 0)^3=0.979701^3=0.940332.


Gaussian distribution

A slightly better model of microfacet distribution can be created using a Gaussian distribution. The usual function calculates specular highlight intensity as: :k_\mathrm = e^ where ''m'' is a constant between 0 and 1 that controls the apparent smoothness of the surface.


Beckmann distribution

A physically based model of microfacet distribution is the Beckmann distribution: :k_\mathrm = \frac, ~ \alpha = \arccos(N \cdot H) where ''m'' is the rms slope of the surface microfacets (the roughness of the material). Compared to the empirical models above, this function "gives the absolute magnitude of the reflectance without introducing arbitrary constants; the disadvantage is that it requires more computation". However, this model can be simplified since \tan^2(\alpha)/m^2=\frac. Also note that the product of \cos(\alpha) and a surface distribution function is normalized over the half-sphere which is obeyed by this function.


Heidrich–Seidel anisotropic distribution

The Heidrich–Seidel.Wolfgang Heidrich and Hans-Peter Seidel, "Efficient Rendering of Anisotropic Surfaces Using Computer Graphics Hardware", Computer Graphics Group, University of Erlange

/ref> 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.


Parameters

Input parameters: * ''D'' = Thread direction ( In original papers this appears as ''T'' ) * ''s'' = Shininess exponent. Values are between 0 and infinity * ''N'' = Real surface normal * ''L'' = Vector from point to light * ''V'' = Vector from point to viewer * ''T'' = Thread direction based on real surface normal. * ''P'' = Projection of vector L onto plane with normal T ( in original paper this appears as ''N'' ). * ''R'' = Reflected incoming light ray against ''T''. Incoming light ray is equal to negative ''L''. All vectors are unit.


Conditions

If some of the conditions are not satisfied from the list then the color is zero * 0 < N \cdot V * 0 < P \cdot V * 0 < R \cdot V Note: This list is not optimized.


Formula

First we need to correct original direction of fiber ''D'' to be perpendicular to real surface normal ''N''. This can be done by projection fiber direction on to plane with normal ''N'': :T = \frac It is expected that fiber is cylindrical. Note the fact that normal of fiber depends on light position. Normal of fiber at given point is: :P = \frac Reflected ray needed for specular calculation: :R = \frac


= Final calculation

= :k_\mathrm = L \cdot P :k_\mathrm = ( V \cdot R ) ^ s


Optimization

Calculation of ''R'' and ''P'' are expensive operation. To avoid their calculation original formula can be rewritten in next form:


= Diffuse

= : k_\mathrm = L \cdot P = L \cdot \frac = ... = \sqrt


= Specular

= : \begin k_\mathrm & = ( V \cdot R ) ^ s \\ & = ( \sqrt * \sqrt - (L \cdot T ) * (V \cdot T ) ) ^s \\ & = \left \sin(\angle(L, T)) \sin(\angle(V, T)) - \cos(\angle(L, T)) \cos(\angle(V, T)) \right ^s \\ & = (-\cos(\angle(L, T)+\angle(V, T)))^s \end


Comments

''T'' can be observed as bump normal and after that it is possible to apply other BRDF than Phong. The anisotropic k_\mathrm should be used in conjunction with an isotropic distribution like a Phong distribution to produce the correct specular highlight


Ward anisotropic distribution

The Ward anisotropic distributio

uses two user-controllable parameters ''αx'' and ''αy'' to control the anisotropy. If the two parameters are equal, then an isotropic highlight results. The specular term in the distribution is: :k_\mathrm = \frac\frac \exp \left -2 \frac \right/math> The specular term is zero if ''N''·''L'' < 0 or ''N''·''V'' < 0. All vectors are unit vectors. The vector ''V'' is the viewing direction, ''L'' is the direction from the surface point to the light, ''H'' is the half-angle direction between ''V'' and ''L'', ''N'' is the surface normal, and ''X'' and ''Y'' are two orthogonal vectors in the normal plane which specify the anisotropic directions.


Cook–Torrance model

The Cook–Torrance modelR. Cook and K. Torrance.
A reflectance model for computer graphics
. Computer Graphics (SIGGRAPH '81 Proceedings), Vol. 15, No. 3, July 1981, pp. 301–316.
uses a specular term of the form :k_\mathrm = \frac. Here D is the Beckmann distribution factor as above and F is the
Fresnel Augustin-Jean Fresnel (10 May 1788 – 14 July 1827) was a French civil engineer and physicist whose research in optics led to the almost unanimous acceptance of the wave theory of light, excluding any remnant of Newton's corpuscular the ...
term. For performance reasons, in real-time 3D graphics
Schlick's approximation In 3D computer graphics, Schlick’s approximation, named after Christophe Schlick, is a formula for approximating the contribution of the Fresnel factor in the specular reflection of light from a non-conducting interface (surface) between two medi ...
is often used to approximate the Fresnel term. G is the geometric attenuation term, describing selfshadowing due to the microfacets, and is of the form :G = \min. In these formulas V is the vector to the camera or eye, H is the half-angle vector, L is the vector to the light source and N is the normal vector, and α is the angle between H and N.


Using multiple distributions

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 also

*
List of common shading algorithms {{Short description, none This article lists common shading algorithms used in computer graphics. Interpolation techniques These techniques can be combined with any illumination model: * Flat shading * Gouraud shading * Phong shading Illuminatio ...
*
Specular reflection Specular reflection, or regular reflection, is the mirror-like reflection of waves, such as light, from a surface. The law of reflection states that a reflected ray of light emerges from the reflecting surface at the same angle to the surf ...
*
Diffuse reflection Diffuse reflection is the reflection (physics), reflection of light or other radiation, waves or particles from a surface such that a ray (optics), ray incident on the surface is scattering, scattered at many angles rather than at just one angle ...
*
Gamma correction Gamma correction or gamma is a nonlinear operation used to encode and decode luminance or tristimulus values in video or still image systems. Gamma correction is, in the simplest cases, defined by the following power-law expression: : V_\text = ...
*
Fresnel equations The Fresnel equations (or Fresnel coefficients) describe the reflection and transmission of light (or electromagnetic radiation in general) when incident on an interface between different optical media. They were deduced by Augustin-Jean Fres ...
*
Retroreflector A retroreflector (sometimes called a retroflector or cataphote) is a device or surface that reflects radiation (usually light) back to its source with minimum scattering. This works at a wide range of angle of incidence, unlike a planar mirror, ...
*
Reflection (physics) Reflection is the change in direction of a wavefront at an interface between two different media so that the wavefront returns into the medium from which it originated. Common examples include the reflection of light, sound and water waves. The ' ...
*
Refraction In physics, refraction is the redirection of a wave as it passes from one medium to another. The redirection can be caused by the wave's change in speed or by a change in the medium. Refraction of light is the most commonly observed phenomeno ...
*
Specularity Specularity is the visual appearance of specular reflections. In computer graphics In computer graphics, it means the quantity used in three-dimensional (3D) rendering which represents the amount of reflectivity a surface has. It is a key com ...


References

{{DEFAULTSORT:Specular Highlight Imaging Shading