Computer Graphics Flashcards

Question 1

(a) Motion Capture

  • Motion capture captures the motion of a model from a real-life actor.
  • Markers are placed on the actor's body, typically at joints, to record motion in real time.
  • Multiple calibrated cameras track the markers.
  • Joint positions are estimated using triangulation.

(b) Rendering Pipeline in 3D Graphics

  • The rendering pipeline includes stages like modelling, transformation, lighting, rasterisation, and pixel shading.
  • It transforms 3D objects into a 2D image by projecting vertices onto the screen.
  • It applies lighting and shading calculations.
  • The result is rasterised into pixels for display.

(c) Significance of the Alpha Channel

  • The alpha channel in texture maps represents transparency.
  • It allows textures to have varying levels of opacity.
  • Enables the rendering of transparent objects, maintaining realistic interactions with other objects.

(d) MIP Mapping in OpenGL

  • MIP mapping improves texture rendering by creating prefiltered texture images at different resolutions.
  • Advantages include better texture quality at varying distances.
  • It enhances performance.
  • It prevents texture popping artefacts.
  • Particularly useful in real-time graphics.
  • It is also useful in scenarios where consistent texture quality across distances is critical.

(e) Global vs. Local Illumination

  • Global illumination simulates how light interacts with surfaces and scatters throughout a scene, considering specular and diffuse lighting.
  • Local illumination models do not consider object-to-object interactions.
  • Examples of global illumination techniques include ray tracing, path tracing, and radiosity.

(f) Characterizing Rendering Capabilities

  • Gouraud shading: L[DS]EL[D|S]E (single diffuse or specular reflection).
  • Phong shading: L[DS]EL[D|S]E (single diffuse or specular reflection).
  • Ray tracing: LDSELDS^*E (single diffuse but multiple specular reflections).
  • Radiosity method: LDELD^*E (multiple diffuse reflections).

(g) Primary Uses of Normals

  • Normals in computer graphics serve several essential purposes:
  • Lighting Calculations: Normals determine how light interacts with a surface, affecting its brightness and shading. Different lighting models use normals to compute diffuse and specular reflections accurately.
  • Bump Mapping and Displacement Mapping: Normals are employed in bump mapping and displacement mapping to simulate fine surface details without altering the geometry. By perturbing normals, these techniques create the illusion of bumps and deformations
  • Surface Smoothing: Normals play a role in creating smooth surfaces. In techniques like Gouraud and Phong shading, normals are interpolated across vertices to create the illusion of smooth shading.

Question 2

Caustic Effects on Velvet Surface

  • Scene: Gemstone on velvet cushion, with a light source.
Phong Model
  • Only considers local geometry and incoming light direction.
  • Reflection intensity is not affected by the gemstone.
  • Velvet surface colors are represented without shadows or caustics.
Whitted Ray Tracing
  • Velvet surface is approximated as an ideal diffuse surface.
  • Backward tracing of the ray stops at the surface point.
  • A shadow ray is created from the point to the light source.
  • The gemstone occludes the shadow ray, so the point is classified as being in shadow.
  • Result: Highlighted area is rendered as completely in shadow, without caustics.
Path Tracing
  • Many rays are shot for every pixel on the cushion surface, following a random walk.
  • Some rays are refracted within the gemstone and hit the light source.
  • Aggregating contributions of all random rays simulates complex interactions.
  • Result: Realistic illumination on the cushion surface, including caustics.

Question 3

Specular Highlight Calculation

  • Directional light source and reflective ground plane at x=4x = 4.
  • Light source direction: (3,1,6)(3, 1, 6).
  • Camera location: (b,4,d)(b, 4, d).
  • Specular highlight peak at point: (4,2,6)(4, 2, 6).
  • Reflection direction r=(3,1,6)r = (3, -1, -6).
  • Reflection direction formula: r=2(nL)nLr = 2(n \cdot L)n - L, where LL is the light direction and nn is the normal vector.
  • Ray from reflection point to the eye: (4,2,6)=(b,4,d)+t(3,1,6)(4, 2, 6) = (b, 4, d) + t(3, -1, -6).
  • Solve for tt using the y-coordinate: t=2t = 2.
  • Substituting t=2t = 2 gives:
    • b=2b = -2
    • d=18d = 18

Question 4

Transformation Matrix Sequence

  • Transform shape M to shape N.
  • Origin is at the center of shape M.
Steps
  1. Scale shape M by 2 in the y direction.
  2. Rotate it by 45 degrees around the z-axis.
  3. Translate it with the vector (+2,2,0)(+2, -2, 0).
Matrix
  • The matrix applied to shape M is then:
    [1amp;0amp;0amp;2 0amp;1amp;0amp;2 0amp;0amp;1amp;0 0amp;0amp;0amp;1]\begin{bmatrix} 1 & 0 & 0 & 2 \ 0 & 1 & 0 & -2 \ 0 & 0 & 1 & 0 \ 0 & 0 & 0 & 1 \end{bmatrix}
    [12amp;12amp;0amp;0 12amp;12amp;0amp;0 0amp;0amp;1amp;0 0amp;0amp;0amp;1]\begin{bmatrix} \frac{\sqrt{1}}{2} & - \frac{\sqrt{1}}{2} & 0 & 0 \ \frac{\sqrt{-1}}{2} & \frac{\sqrt{1}}{2} & 0 & 0 \ 0 & 0 & 1 & 0 \ 0 & 0 & 0 & 1 \end{bmatrix}
    [1amp;0amp;0amp;0 0amp;2amp;0amp;0 0amp;0amp;1amp;0 0amp;0amp;0amp;1]\begin{bmatrix} 1 & 0 & 0 & 0 \ 0 & 2 & 0 & 0 \ 0 & 0 & 1 & 0 \ 0 & 0 & 0 & 1 \end{bmatrix}

Question 5

Z-buffer and Painter's Algorithm

(a) Z-buffer with Alpha = 1
  • The Z-buffer handles occlusions by recording the depth of each rendered pixel.
  • It overwrites the depth if a new, closer surface is rendered on the same location.
Rendering Order
  1. Render the yellow bar.
  2. Render the green bar.
  3. Render the red bar.
(b) Algorithm Choice with Alpha = 0.4
  • Painter's algorithm is a better choice.
  • Z-buffer cannot easily deal with translucency, as it requires storing multiple depths in the depth buffer.
  • Painter's algorithm can render the yellow bar by blending the pixel's color with the previous color using the appropriate alpha instead of overwriting it.