fbpx
Wikipedia

Specular highlight

A specular highlight is the bright spot of light that appears on shiny objects when illuminated (for example, see image on 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.

Specular highlights on a pair of spheres.

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 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. If microfacets are distributed with a preference for a certain direction along the surface, the distribution is anisotropic.

NOTE: In most equations, when it says   it means  

Phong distribution

In the Phong reflection model, the intensity of the specular highlight is calculated as:

 

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:

 

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  ), or approximately Pearson type II distribution, of the corresponding angle.[1] While this is a useful heuristic and produces believable results, it is not a physically based model.

Another similar formula, but only calculated differently:
 
where R is an eye reflection vector, E is an eye vector (view vector), N is surface normal vector. All vectors are normalized ( ). L is a light vector. For example,   then:
 
 
Approximate formula is this:
 
 
If vector H is normalized   then
 

Gaussian distribution

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

 

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

Beckmann distribution

A physically based model of microfacet distribution is the Beckmann distribution:[3]

 

where m is the rms slope of the surface microfacets (the roughness of the material).[4] 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".[5] However, this model can be simplified since  . Also note that the product of   and a surface distribution function is normalized over the half-sphere which is obeyed by this function.

Heidrich–Seidel anisotropic distribution

The Heidrich–Seidel.[6] 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

  •  
  •  
  •  

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:

 

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:

 

Reflected ray needed for specular calculation:

 
Final calculation
 
 

Optimization

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

Diffuse
 
Specular
 

Comments

T can be observed as bump normal and after that it is possible to apply other BRDF than Phong. The anisotropic   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 distribution [2] 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:

 

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 model[5] uses a specular term of the form

 .

Here D is the Beckmann distribution factor as above and F is the Fresnel term. For performance reasons, in real-time 3D graphics Schlick's approximation 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

 .

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

References

  1. ^ Richard Lyon, "Phong Shading Reformulation for Hardware Renderer Simplification", Apple Technical Report #43, Apple Computer, Inc. 1993 PDF
  2. ^ Glassner, Andrew S. (ed). An Introduction to Ray Tracing. San Diego: Academic Press Ltd, 1989. p. 148.
  3. ^ Petr Beckmann, André Spizzichino, The scattering of electromagnetic waves from rough surfaces, Pergamon Press, 1963, 503 pp (Republished by Artech House, 1987, ISBN 978-0-89006-238-8).
  4. ^ Foley et al. Computer Graphics: Principles and Practice. Menlo Park: Addison-Wesley, 1997. p. 764.
  5. ^ a b R. Cook and K. Torrance. "A reflectance model for computer graphics". Computer Graphics (SIGGRAPH '81 Proceedings), Vol. 15, No. 3, July 1981, pp. 301–316.
  6. ^ Wolfgang Heidrich and Hans-Peter Seidel, "Efficient Rendering of Anisotropic Surfaces Using Computer Graphics Hardware", Computer Graphics Group, University of Erlangen [1]

specular, highlight, this, article, needs, additional, citations, verification, please, help, improve, this, article, adding, citations, reliable, sources, unsourced, material, challenged, removed, find, sources, news, newspapers, books, scholar, jstor, februa. This article needs additional citations for verification Please help improve this article by adding citations to reliable sources Unsourced material may be challenged and removed Find sources Specular highlight news newspapers books scholar JSTOR February 2008 Learn how and when to remove this template message A specular highlight is the bright spot of light that appears on shiny objects when illuminated for example see image on 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 Specular highlights on a pair of spheres Contents 1 Microfacets 2 Models 2 1 Phong distribution 2 2 Gaussian distribution 2 3 Beckmann distribution 2 4 Heidrich Seidel anisotropic distribution 2 4 1 Parameters 2 4 2 Conditions 2 4 3 Formula 2 4 3 1 Final calculation 2 4 4 Optimization 2 4 4 1 Diffuse 2 4 4 2 Specular 2 4 5 Comments 2 5 Ward anisotropic distribution 2 6 Cook Torrance model 2 7 Using multiple distributions 3 See also 4 ReferencesMicrofacets EditThis section does not cite any sources Please help improve this section by adding citations to reliable sources Unsourced material may be challenged and removed June 2015 Learn how and when to remove this template message 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 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 EditA 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 NOTE In most equations when it says A B displaystyle hat A cdot hat B it means max 0 A B displaystyle max 0 hat A cdot hat B Phong distribution Edit In the Phong reflection model the intensity of the specular highlight is calculated as k s p e c R V cos n b R V n displaystyle k mathrm spec R V cos n beta hat R cdot hat V 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 s p e c N H cos n b N H n displaystyle k mathrm spec N H cos n beta hat N cdot hat H 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 displaystyle n or approximately Pearson type II distribution of the corresponding angle 1 While this is a useful heuristic and produces believable results it is not a physically based model Another similar formula but only calculated differently k L R n L E 2 N N E n displaystyle k vec L cdot vec R n vec L cdot vec E 2 vec N vec N cdot vec E n where R is an eye reflection vector E is an eye vector view vector N is surface normal vector All vectors are normalized E N 1 displaystyle vec E vec N 1 L is a light vector For example N 0 1 0 E 3 2 1 2 0 L 0 6 0 8 0 n 3 displaystyle vec N 0 1 0 vec E frac sqrt 3 2 frac 1 2 0 vec L 0 6 0 8 0 n 3 then k L E 2 N N E n L E 2 N 0 3 2 1 0 5 0 0 3 displaystyle k vec L cdot vec E 2 vec N vec N cdot vec E n vec L cdot vec E 2 vec N 0 cdot frac sqrt 3 2 1 cdot 0 5 0 cdot 0 3 L E N 3 L 3 2 0 1 2 1 0 0 3 0 6 3 2 0 8 0 5 0 0 3 0 5196 0 4 3 0 9196 3 0 7777 displaystyle vec L cdot vec E vec N 3 vec L cdot frac sqrt 3 2 0 frac 1 2 1 0 0 3 0 6 cdot frac sqrt 3 2 0 8 cdot 0 5 0 cdot 0 3 0 5196 0 4 3 0 9196 3 0 7777 Approximate formula is this k N H n N L E 2 n N 0 6 3 2 0 8 0 5 0 0 2 3 N 0 266 1 3 0 2 3 displaystyle k vec N cdot vec H n vec N cdot vec L vec E 2 n vec N cdot 0 6 frac sqrt 3 2 0 8 0 5 0 0 2 3 vec N cdot 0 266 1 3 0 2 3 N 0 133 0 65 0 3 0 0 133 1 0 65 0 3 0 65 3 0 274625 displaystyle vec N cdot 0 133 0 65 0 3 0 cdot 0 133 1 cdot 0 65 0 3 0 65 3 0 274625 If vector H is normalized H 0 133 0 65 0 H H 0 133 0 65 0 0 133 2 0 65 2 H 0 133 0 65 0 0 668 0 20048 0 979701 0 displaystyle frac vec H 0 133 0 65 0 vec H frac vec H 0 133 0 65 0 sqrt 0 133 2 0 65 2 frac vec H 0 133 0 65 0 0 668 0 20048 0 979701 0 then k N H n 0 0 2 1 0 9797 0 0 3 0 979701 3 0 940332 displaystyle k vec N cdot vec H n 0 cdot 0 2 1 cdot 0 9797 0 cdot 0 3 0 979701 3 0 940332 Gaussian distribution Edit A slightly better model of microfacet distribution can be created using a Gaussian distribution citation needed The usual function calculates specular highlight intensity as k s p e c e N H m 2 displaystyle k mathrm spec e left frac angle N H m right 2 where m is a constant between 0 and 1 that controls the apparent smoothness of the surface 2 Beckmann distribution Edit A physically based model of microfacet distribution is the Beckmann distribution 3 k s p e c exp tan 2 a m 2 p m 2 cos 4 a a arccos N H displaystyle k mathrm spec frac exp left tan 2 alpha m 2 right pi m 2 cos 4 alpha alpha arccos N cdot H where m is the rms slope of the surface microfacets the roughness of the material 4 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 5 However this model can be simplified since tan 2 a m 2 1 cos 2 a cos 2 a m 2 displaystyle tan 2 alpha m 2 frac 1 cos 2 alpha cos 2 alpha m 2 Also note that the product of cos a displaystyle cos alpha and a surface distribution function is normalized over the half sphere which is obeyed by this function Heidrich Seidel anisotropic distribution Edit The Heidrich Seidel 6 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 Edit 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 Edit If some of the conditions are not satisfied from the list then the color is zero 0 lt N V displaystyle 0 lt N cdot V 0 lt P V displaystyle 0 lt P cdot V 0 lt R V displaystyle 0 lt R cdot V Note This list is not optimized Formula Edit 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 D D N N D D N N displaystyle T frac D D cdot N N D D cdot N N 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 L L T T L L T T displaystyle P frac L L cdot T T L L cdot T T Reflected ray needed for specular calculation R L 2 L P P L 2 L P P displaystyle R frac L 2 L cdot P P L 2 L cdot P P Final calculation Edit k d i f f L P displaystyle k mathrm diff L cdot P k s p e c V R s displaystyle k mathrm spec V cdot R s Optimization Edit Calculation of R and P are expensive operation To avoid their calculation original formula can be rewritten in next form Diffuse Edit k d i f f L P L L L T T L L T T 1 L T 2 displaystyle k mathrm diff L cdot P L cdot frac L L cdot T T L L cdot T T sqrt 1 L cdot T 2 Specular Edit k s p e c V R s 1 L T 2 1 V T 2 L T V T s sin L T sin V T cos L T cos V T s cos L T V T s displaystyle begin aligned k mathrm spec amp V cdot R s amp sqrt 1 L cdot T 2 sqrt 1 V cdot T 2 L cdot T V cdot T s amp left sin angle L T sin angle V T cos angle L T cos angle V T right s amp cos angle L T angle V T s end aligned Comments Edit T can be observed as bump normal and after that it is possible to apply other BRDF than Phong The anisotropic k s p e c displaystyle k mathrm spec should be used in conjunction with an isotropic distribution like a Phong distribution to produce the correct specular highlight Ward anisotropic distribution Edit The Ward anisotropic distribution 2 uses two user controllable parameters ax and ay to control the anisotropy If the two parameters are equal then an isotropic highlight results The specular term in the distribution is k s p e c r s N L N V N L 4 p a x a y exp 2 H X a x 2 H Y a y 2 1 H N displaystyle k mathrm spec frac rho s sqrt N cdot L N cdot V frac N cdot L 4 pi alpha x alpha y exp left 2 frac left frac H cdot X alpha x right 2 left frac H cdot Y alpha y right 2 1 H cdot N right The specular term is zero if N L lt 0 or N V lt 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 Edit The Cook Torrance model 5 uses a specular term of the form k s p e c D F G 4 V N N L displaystyle k mathrm spec frac DFG 4 V cdot N N cdot L Here D is the Beckmann distribution factor as above and F is the Fresnel term For performance reasons in real time 3D graphics Schlick s approximation 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 1 2 H N V N V H 2 H N L N V H displaystyle G min left 1 frac 2 H cdot N V cdot N V cdot H frac 2 H cdot N L cdot N V cdot H right 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 a is the angle between H and N Using multiple distributions Edit 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 EditList of common shading algorithms Specular reflection Diffuse reflection Gamma correction Fresnel equations Retroreflector Reflection physics Refraction SpecularityReferences Edit Richard Lyon Phong Shading Reformulation for Hardware Renderer Simplification Apple Technical Report 43 Apple Computer Inc 1993 PDF Glassner Andrew S ed An Introduction to Ray Tracing San Diego Academic Press Ltd 1989 p 148 Petr Beckmann Andre Spizzichino The scattering of electromagnetic waves from rough surfaces Pergamon Press 1963 503 pp Republished by Artech House 1987 ISBN 978 0 89006 238 8 Foley et al Computer Graphics Principles and Practice Menlo Park Addison Wesley 1997 p 764 a b R Cook and K Torrance A reflectance model for computer graphics Computer Graphics SIGGRAPH 81 Proceedings Vol 15 No 3 July 1981 pp 301 316 Wolfgang Heidrich and Hans Peter Seidel Efficient Rendering of Anisotropic Surfaces Using Computer Graphics Hardware Computer Graphics Group University of Erlangen 1 Retrieved from https en wikipedia org w index php title Specular highlight amp oldid 1137416128, wikipedia, wiki, book, books, library,

article

, read, download, free, free download, mp3, video, mp4, 3gp, jpg, jpeg, gif, png, picture, music, song, movie, book, game, games.