Tratado de París (1951)

Today, the term shade of Phong is used at the same time for the model of illumination of Phong , and the interpolation of Phong , two algorithms of treatment 3D in computer graphics. Both were developed by Bui Tuong Phong.

Model of illumination of Phong

The illumination of Phong is a local model, i.e. which calculates the intensity in each point, and which combines three elements - the diffuse light (model lambertien), the specular light and the ambient light.

It several presupposed there with this model: all the lights are comparable to a point, there can be only surfaces (not returned in volume), and the ambient light is supposed to be constant.

The diffuse component, Id is given by:

I_d = I_i k_d \ sin \ theta 0 \ the \ theta \ 2 \ pi

With I_i the intensity of the light, θ the angle enters surface and the source of light and k_d the coefficient of diffuse reflection. One can note that, more often, one uses the cosine of the angle between the normal of surface and the light - this technique is simpler to implement, but returns, mathematically, with same.

For several sources of light, one a:

I_d = k_d \ sum_ {N} I_ {I, N} (L_n \ cdot NR)

With L and NR of the unit vectors, L_n the vector direction of the source of light N .

The specular component Is is given by:

I_s = I_i k_s \ cos^n \ Omega = I_i k_s (R \ cdot V) ^n

With N reflectivity of surface (a perfect mirror would have N infinite), Ω the angle between R direction of the specular light (perfect reflection of the luminous ray by surface) and V the vector seen of the observer, that one calculation in practice by a scalar product, these two vectors being normalized. N thus determines the spreading out of the luminous task had with the specularity, for a large N the task is very concentrated.

It is a first fault of the model of Phong: one cannot apply the Radiosité here.

By combining the diffuse and specular light, one obtains an overall sufficient model, but, to simulate the residual light, Phong a third component, the light " added; ambiante" , independent from the point of view or the object.

The ambient component Ig is a constant, given by:

I_g = I_a k_a

What gives the general model of illumination of Phong:

I = I_a k_a + I_i (k_d (L \ cdot NR) + k_s (R \ cdot V) ^n)

Faults of the model of Phong

  • mentioned We it above, the specular component bases themselves on two directional vectors, the observer and the light, and prohibits any radiosity of the model.
  • This model is purely empirical, founded on any physical theory, only on the observations of Phong
  • This model does not envisage the diffusion of the light with the distance

The interpolation of Phong

This method, to put in parallel with the interpolation of Gouraud, produced good performances of made, often more realistic than its predecessor.

The main issue of the shade of Gouraud, it is that it calculates only the tops (vertex) polygons: a specular source of light placed at the center of a triangle will not appear. This problem is regulated with the interpolation of Phong.

Are three distinct tops: v 1, v 2 and v 3, having for normal unit vectors N 1, N 2 and N 3. As for the interpolation of Gouraud, this one is made in a linear way on all surface of the triangle v_1v_2v_3, only it is done since the three normal vectors of the tops, i.e. we interpolate in fact the normal vectors instead of the colors.

With the difference of the interpolation of Gouraud however, calculation is not done on 3 points by surface, but for all the points of a surface - or more reasonably, on several subdivisions of points. This method, much slower, is sometimes treated by the material directly, via the Shader S .

See too

Random links:Jean III of Armagnac | Germanic legion | Bulzi | Royal Aircraft Factory F.E.2 | Western Dangme | Traité_de_Paris_(1951)