Computer Graphics Flashcards

Question 1

(a) Motion Capture

  • Motion capture captures the motion of a real-life actor for use in a model.
  • Markers are placed on the actor's body, typically at joints, to record motion in real-time.
  • Multiple calibrated cameras track the markers.
  • Triangulation is used to estimate joint positions.

(b) Rendering Pipeline in 3D Graphics

  • The rendering pipeline includes modeling, transformation, lighting, rasterization, and pixel shading.
  • It transforms 3D objects into a 2D image by projecting vertices onto the screen.
  • It applies lighting and shading calculations.
  • Rasterization converts the result 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.
  • This enables rendering of transparent objects like glass, while 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:
    • Better texture quality at varying distances.
    • Enhanced performance.
    • Prevention of texture popping artifacts.
  • It is particularly useful in real-time graphics and scenarios where consistent texture quality across distances is critical.

(e) Global Illumination 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: ray tracing, path tracing, and radiosity.

(f) Capabilities of Rendering Algorithms

  • 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

  • Lighting Calculations: Normals determine how light interacts with a surface, affecting its brightness and shading. Used to compute diffuse and specular reflections accurately.
  • Bump Mapping and Displacement Mapping: Used to simulate fine surface details without altering the geometry by perturbing normals, creating the illusion of bumps and deformations.
  • Surface Smoothing: Normals interpolated across vertices create the illusion of smooth shading in techniques like Gouraud and Phong 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 approximated as an ideal diffuse surface.
  • Backward tracing stops at the surface point.
  • A shadow ray is created from the surface point to the light source.
  • The gemstone occludes the shadow ray, classifying the point as in shadow.
  • The highlighted area is rendered as completely in shadow, without caustics.
Path Tracing
  • Many rays are shot for every pixel and follow a random walk.
  • Some rays are refracted within the gemstone and hit the light source.
  • Aggregating contributions of random rays simulates complex interactions.
  • The illumination on the cushion surface is very realistic and includes caustics.

Question 3

Specular Highlight Calculation

  • Directional light source and a 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 tt gives: b=2b = -2 and d=18d = 18.

Question 4

Transforming Shape M into Shape N

  • Origin is at the center of shape M.

  • First Scale shape M with two in y direction

  • Second Rotate it for 45 degrees around the z-axis

  • Finally, translate with the vector (+2, -2, 0)

  • 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

(a) Z-buffer Algorithm with alpha = 1

  • Z-buffer handles occlusions by recording the depth of each rendered pixel and overwriting it if a closer surface is rendered.
    1. Render the yellow bar.
    2. Render the green bar.
    3. Render the red bar.

(b) Algorithm Choice with alpha = 0.4

  • Painters algorithm is a better choice.
  • Z-buffer cannot deal with translucency easily as it requires storing multiple depths in the depth buffer.
  • Painters can render the yellow bar by blending the pixel's color with the previous color using the appropriate alpha value instead of overwriting it.