I tried to understand the method of Guro, but I can not understand the values ​​of the variables in the formulas, I already searched in Google, but their meaning is not given everywhere. To keep the formula out of context I attach two pages from the textbook. guro st. 1 guro st. 2

Please explain what these variables are. And what does the illumination mean in this context, how does this relate to color? Or is there any textbook for dummies at all?

  • Apparently, the question is actually "what is the illumination"? This is the amount of light falling on a specific point of the model. 0 - if it is completely dark, 1 - if it is very light. - PashaPash
  • Yes, thanks, but I would still have to disassemble the formulas, because I still don’t understand what, for example, hides behind K [d] (n, l) or just K [a], is it some kind of reflection coefficient? - Daniil

1 answer 1

Before we go into the physical meaning of the formulas, it is necessary to understand the three components of light - ambient, diffuse and specular.

according to the formulas given by you:

Ia - ambient is the background power of the light, in other words, this light that the material perceives without scattering and specular reflection. It is a constant value and does not depend on the position of either the object or the source of light.

Ka - ambient - shows the degree of material to perceive the background light.

Kd - diffuse (diffusing) component of the material - shows the degree of material to perceive diffusing light - the light that is scattered uniformly in all directions depending on the orientation (normal) of the surface and the direction of light.

(n, l) is the scalar product of vectors n is normal to the tangent plane to the surface and l is the vector of the light going from the light source to an arbitrary point on the image - with cos(n, l) == 1 product Kd * (n, l) will give Kd that will mean the maximum brightness of the diffuse component of the material at this point, and when cos(n, l) = 0 contrary, the maximum darkness of the corresponding pixel (or point).

Ks - specular component of the material - the material's ability to perceive the specular light (for example, steel reflects light with a certain brilliance).

(v, r)^p - scalar product between the vector reflected from the vector of light and the species vector (vector going from the camera position to a point), to the degree of the phong coefficient (p) - the more this degree the specular light will be reflected more sharply - and similarly with a diffuse light source when the angle between these vectors is 0, that is, cos 0 == 1 specular illumination reaches its maximum (in other words, the species vector coincides with the vector of reflecting light) and the minimum when the angle is straight or greater than direct cos pi/2 == 0 .

enter image description here

ps I do not specifically give the option cos(n, h)^p which is in your textbook, since usually the specular reflection of light depends on the direction of gaze v and the vector reflected from light r , and it is not clear what is meant by the vectors n and h .

Using formulas 11.1 and 11.2 , the final color of the pixel is calculated as the sum of all the components - in the first case, taking into account only the ambient and diffuse components, in the second, taking into account all three.

It is important to note that the Gouraaux model calculating color values ​​in all vertices of a polygon and interpolating other values ​​from these points can sometimes lead to a loss of accuracy of the entire image compared to phong models, which calculate the final color at all points (pixels), making the result more accurate significantly more computations.