8 Illumination Models And Surface Rendering Techniques

Computer Graphics · Unit 8 · 5 hrs

Illumination Models and Surface Rendering Techniques

Exam-focused notes for Illumination Models and Surface Rendering Techniques (Computer Graphics, CSC214): what the TU syllabus asks and how it has actually been tested, with 6 solved past questions from this unit.

Illumination Models and Surface Rendering Techniques in short

Once the visible surfaces of a scene are known, an illumination model decides what colour and intensity to give each visible point, based on the lights in the scene and the surface's own optical properties, and a surface rendering technique decides how to apply that model efficiently across a whole polygon rather than one point at a time. This chapter covers the basic illumination models culminating in the Phong model, then the three main polygon-shading methods built on top of them.

Illumination Models and Surface Rendering Techniques: notes

Basic Illumination Models: Ambient light, Diffuse reflection, Specular reflection and Phong model

Light sources are modelled in two common ways: a point light source, whose rays diverge radially from a single point of origin and whose intensity is equal in every direction (an incandescent bulb, or the sun treated as effectively infinitely distant), and a distributed (directional) light source, whose rays are parallel and travel in one direction, such as a laser or a spotlight beam.

Ambient light models the light that has bounced around a scene so many times, off so many surfaces, that it arrives at every point from every direction with roughly equal intensity; rather than simulate this bouncing, it is approximated as a single constant term, $I_a$, added everywhere so that surfaces facing away from every direct light source are not left completely black. A surface's contribution from ambient light is $I_a k_a$, where $k_a$ is the surface's ambient-reflection coefficient, between 0 and 1.

Diffuse reflection models light that strikes a rough (matte) surface and scatters equally in all directions, so that the surface appears equally bright from any viewing angle; only the angle between the surface normal $\mathbf{N}$ and the direction to the light $\mathbf{L}$ affects the intensity, following Lambert's cosine law: $$ I_{\text{diffuse}} = I_l, k_d , (\mathbf{N}\cdot\mathbf{L}), $$

where $I_l$ is the light source's intensity and $k_d$ is the surface's diffuse-reflection coefficient. The dot product is clamped to zero whenever it would be negative, since a surface facing away from the light ($\mathbf{N}\cdot\mathbf{L} < 0$) receives no direct light from it at all.

Specular reflection models the bright highlight seen on shiny surfaces, caused by light reflecting more strongly in the mirror direction than elsewhere. The Phong specular model approximates this by comparing the ideal mirror-reflection direction $\mathbf{R}$ of the light (computed as $\mathbf{R} = 2(\mathbf{N}\cdot\mathbf{L})\mathbf{N} - \mathbf{L}$) with the direction to the viewer $\mathbf{V}$, and raising their alignment to a power $n$ that controls how tight and shiny the highlight looks: $$ I_{\text{specular}} = I_l, k_s , (\mathbf{R}\cdot\mathbf{V})^{n}, $$

What this unit covers

  • Basic Illumination Models: Ambient light, Diffuse reflection, Specular reflection and Phong model
  • Intensity attenuation and Color consideration, Transparency, Shadows
  • Polygon Rendering Methods: Constant intensity shading, Gouraud shading, Phong Shading and Fast Phong Shading

Basic Illumination Models

2081 · 5 marks

Describe any two basic illumination models. [5]

An illumination model (also called a shading model) is a mathematical model used to determine the color or intensity calculation of a single pixel at a particular point on a surface. The color seen at a particular point depends on various optical parameters of that surface and the light sources i...

Open this answer on its own page →

Polygon Rendering Methods

2080 · 5 marks

How a realistic image can be generated in computer graphics? Explain fast phong shading. [5]

A realistic image in computer graphics is produced by combining several techniques that simulate how light interacts with surfaces in the real world. The key steps and methods involved are: Objects are represented using polygon meshes (triangle strips, quadrilateral meshes) or quadric surfaces (s...

Open this answer on its own page →

2079 · 5 marks

Define the term 'rendering' in computer graphics. Explain Phong Shading Method with its advantage and disadvantage. [5]

Show solved answer

Rendering in Computer Graphics and Phong Shading Method


Definition of Rendering (1 mark)

Rendering is the process of generating a final 2D image from a 3D scene description by applying lighting, shading, color, and other visual effects to the geometric objects in the scene. It transforms a mathematical model of a scene into a realistic or stylized visual output.

As stated in the notes:

"Scene description + Illumination Model + Rendering Technique = Image"

In other words, polygon (surface) rendering is the process of calculating intensity and color considerations for polygon surfaces so that objects appear realistic on screen.


Phong Shading Method (3 marks)

Phong Shading (also called Normal-Vector Interpolation Shading) is an advanced surface rendering technique that produces smooth and realistic shading across polygon surfaces.

Concept

Instead of interpolating intensity values (as in Gouraud shading), Phong Shading interpolates the surface normal vectors across each polygon surface. The illumination model is then applied at every individual pixel using the interpolated normal, producing a much more accurate and realistic result.

Algorithm / Steps

  1. Calculate the surface normal vector at each vertex of the polygon using the surrounding surface geometry.

  2. Interpolate the normal vectors across the entire polygon surface (both along edges and across scan lines) to obtain a normal vector at every interior pixel.

  3. Apply the illumination model (e.g., Phong illumination model with ambient, diffuse, and specular components) at each pixel using its interpolated normal vector.

  4. Assign the computed intensity to each pixel on the surface.

Diagram (Conceptual)

Vertex N1          Vertex N2
   *-----------------*
    \   Interpolated  \
     \   Normals at    \
      \  each pixel    \
       *-----------------*
     Vertex N3

At every pixel inside the polygon, a normal is interpolated and lighting is computed individually.


Advantages of Phong Shading (0.5 mark)

  • Produces highly realistic images with accurate specular highlights.
  • Eliminates the Mach band effect (intensity discontinuities visible in flat shading).
  • Handles specular reflections much better than Gouraud shading because lighting is computed per pixel.
  • Gives smooth shading across polygon surfaces.

Disadvantages of Phong Shading (0.5 mark)

  • Computationally expensive because the illumination model must be applied at every pixel rather than just at vertices.
  • Slower rendering compared to flat shading and Gouraud shading.
  • Requires more memory and processing power, making it less suitable for real-time applications (historically).

Summary Table

FeatureFlat ShadingPhong Shading
InterpolationNoneNormal vectors
RealismLowHigh
ComputationLeastMost
Specular HighlightsPoorAccurate

Conclusion: Phong Shading is one of the most realistic polygon rendering methods because it computes lighting at every pixel using interpolated normals, at the cost of higher computational requirements.

Open this answer on its own page →

2078 · 5 marks

Define intensity attenuation. Distinguish between Gouraud shading and Phong shading model. [5]

Show solved answer

Intensity Attenuation and Shading Models


Intensity Attenuation (2 marks)

Definition: The rate of decrease in intensity with respect to the distance between the light source and objects is called intensity attenuation.

  • If a point light source is used, the intensity attenuation is given by:

$$\text{Attenuation} = \frac{1}{d^2}$$

where d is the distance between the light source and the object.

  • If a distributed light source is used, the intensity attenuation factor is given by the function:

$$f(d) = \frac{1}{a_0 + a_1 d + a_2 d^2}$$

where:

  • $a_0$, $a_1$, $a_2$ are surface (attenuation) parameters
  • $d$ is the distance between the object and the distributed light source

Distinction Between Gouraud Shading and Phong Shading (3 marks)

S.No.Gouraud ShadingPhong Shading
1.Named after Henri Gouraud.Named after Bui Tuong Phong.
2.Computes illumination at border vertices and interpolates intensity/color at every interior point of the polygon surface.Computes illumination by interpolating surface normals at every pixel and then applying the lighting equation per pixel.
3.Interpolates colors along edges and scan lines.Interpolates normals instead of colors.
4.Less expensive computationally.More expensive than Gouraud shading.
5.Lighting equation is applied at each vertex.Lighting equation is applied at each pixel.
6.Requires moderate processing and time; produces acceptable quality.Requires complex processing and is slower, but produces better (more realistic) quality images.

Summary: Gouraud shading is faster but may miss specular highlights at polygon interiors since it only evaluates lighting at vertices. Phong shading is more realistic because it evaluates the lighting model at every pixel using interpolated normals, making it the more preferred method for high-quality rendering despite its higher computational cost.

Open this answer on its own page →

2077 · 10 marks

Define realism in human perception. What is the significance difference between rendering and image synthesis in creating computer generated 3D image? Describe any two polygon rendering methods.[10]

--- Realism in human perception refers to the ability of a computer-generated image to appear as close to the real world as possible, so that the human visual system perceives it as natural and believable. In computer graphics, realism is achieved by simulating real-world visual phenomena such as...

Open this answer on its own page →

Intensity attenuation and Color consideration, Transparency, Shadows

2075 · 5 marks

How can we detect shadows in computer graphics? List the challenged in computing light model. [5]

--- Shadows help create realism in a scene. They allow humans to distinguish movement and depth of objects more clearly. Several techniques are used to create and detect shadows: - A shadow volume is a 3D region of space that is in shadow. - The geometry of the shadow volume is computed by projec...

Open this answer on its own page →