Introduction

After light ray falls on a point of an object's surface, after reflection, the light is dispersed in all directions. The mathematical function expressing the ray intensity of the dispersed light depends on its direction, intensity and wavelength of the falling ray is called the reflection function; it is the basis of lighting models. sing them, we can determine such attributes as color and glossiness of objects.

Light after reflection changes its color composition, and in this way, it gives information about the given surface of an object. A computer simulated model image of an area object must take into account all physical and optical attributes of a surface, that are decisive in determining the resulting realisticness.

$$$APPLET

Applet Reflection of a ray

In the sample applet, a light ray from the source IL (yellow color) falls on the point P, and after reflection, light is dispersed in all directions. The unit vector N perpendicular to the surface in the point P is called normalN. The direction unit vectors L, V and N lying on the lines: of the falling ray, of the view direction, and of the normal of the surface. The surface of a body is not perfect. In fact, the surface comprises individual tiny patches, the size and shape of which relate to the composition of the given material.

If we focus on only one dot of the surface, we could perceive a large number of falling rays with various trajectories, where already before their falls on the observed point they could have been refracted and reflected several times.

The intensity of reflected light is expressed as the sum of two components:

Iv = Is + Id.

The component Is is called specular, and its main feature is directivity. The smoother the surface of an object the higher its directivity. Light reflected from a perfect, utter mirror has only this component. The specular component is the reason for reflections and glittering on bodies, while such reflection can have another color other than the color of the body.

The component Id is called diffusion. It is all-direction and the probability of a new direction of ray is equal for every direction. The amplitude of this component depends only on the cosine of the falling angle. Diffusion light determines the color of a surface.

$$$APPLET

Applet Diffusion and specular components of reflected light of a ray

Empirical lighting models

In 1997 Bui-Tuong Phong suggested empirical formulas for calculating reflected light

Refraction of light into components

The specular component is expressed as:
Is = IL * rs (V*R) ^ h,

where
  • IL is the color component of falling light.
  • Vector V is the unit vector of view.
  • Vector R is a symmetric vector to vector L according to the normal.
  • The coefficient of specular reflection rs determines the share of specular component in the resulting reflected light. It comprises three vectors representing the individual primary colors.
  • The scalar coefficient h expresses the sharpness of the specular image. Its value is from the interval <1,...,A >.

While the value is (V*R)< 0, the observer is, in relation to the mirror, in the same semi-area as the light source, and therefore, the observer cannot see the image. Then, we assign a zero color vector to the coefficient of the specular component, which represents black color.

The diffusion component is expressed as:

Id = IL * rd * (L.N),

where rd is the coefficient of diffusion light expressed by three vectors representing color components. It determines the amplitude of the diffusion component in the resulting reflected light. Amplitude Id is growing with approximation from the direction of the light's fall to the normal. The value of (L. N) must be greater than 0, otherwise surface is turned away from the light and the coefficient Id is zero.

The ambient component, representing all-directional light is expressed as:

Ia = IA . ra,

where Ia is the intensity of ambient light; this intensity in the case of the empirical lighting model is constant for the whole scene. The value of ra expresses the coefficient of reflection of the surrounding light. <\p>

The overall light perceived by the observer can be expressed as:

Iv = Is + Id + Ia,

Bouknight model

The simplest model of Bouknight dates from the year 1970. It used only a diffusion and an ambient component

Iv = Ia . ra + rd * SUM (n=1,...,M)(Ln . N) In],

where M is the number of light sources, ra is the coefficient of ambient light, In the intensity of n-th light source.

Phong lighting model

For the point P of a surface on which light is falling from M light sources is valid:

Iv = Ia . ra + SUM(k=1,..,M) [rs (V.Rk)^h + rd (Lk.N)].

The ambient component is added only once, the diffusion and specular components for each light source are added separately.

Copyright (c) 1999-2017 Juraj Štugel. www.netgraphics.sk