|
The Fresnel Mask determines the reflectivity of a surface depending on its refractive index (IOR).
When used as a Mask on the reflectivity of a shader, the grazing-angles surfaces become more reflective than those facing the camera, adding realism to the material illumination.
Contrarily to other shaders (such as Dielectric, provided by XSI) the FresnelMask is based on the "real-physics" Fresnel Laws, and doesn't have to be set arbitrarily. Three mathematical models (Schlick, Fresnel and complex Fresnel) can be used to evaluate this function, allowing you allow to choose between accuracy and speed.
The Fresnel Laws, discovered by Augustin Jean Fresnel (1788-1827), describe the behaviour of light at the interface between two different media.
A part of the incoming light is reflected, while another part is trasmitted (i.e. refracted or absorbed). The proportion of reflected light only depends on on the (complex) refractive index and on the angle of incidence.
The Fresnel equations determine the Reflection coefficient R and the Transimission coefficient T = 1 - R, depending on the light polarization (s or p).
and
where n1 and n2 are the "In" and "Out" complex refractive index,
qi is the incident angle and qt the transmitted angle deduced by the Snell Law ( n1 sin(qi) = n2 sin(qt) )
Rs and Rp correspond therefore to the fraction of s-polarized and p-polarized light which is reflected.
If the refractive index are complex, an absorbtion coefficient k , which determines how fast the light is absorbed, needs to be determined.
The Schlick approximation can be made for fast calculations.
For more details concerning the Fresnel equations, please refer to
http://www.odforce.net/wiki/index.php/ReflectanceFunctions#The_Fresnel_Effect
Download our xsiaddon T2S_FresnelMask (Framework .NET 2.0 needed )
t2s_fresnelmask 02/06/2006,18:18 6.86 Kb
Here is an illustration of the Fresnel Effect.
- The first image has been rendered with a simple Lambert with a Reflectivity of 0.5.
- The second image has been rendered with the T2S_FresnelMask plugged into the reflectivity port of the Lambert node, using a refractive index of 5 with Schlick's approximation. It can be seen how the grazing angles become much more reflective, adding realism to the scene.
|