Computer Graphics - Exam Notes

Motion Capture

  • Motion capture aims at capturing the motion of a model from a real-life actor.
  • Procedure:
    • Placing markers on the actor’s body (typically at joints) to record motion in real-time.
    • Markers are tracked using multiple calibrated cameras.
    • Joint position is estimated using triangulation.

Rendering Pipeline in 3D Graphics

  • Stages: modelling, transformation, lighting, rasterisation, and pixel shading.
  • Process: Transforms 3D objects into a 2D image by:
    • Projecting vertices onto the screen.
    • Applying lighting and shading calculations.
    • Rasterising the result into pixels for display.

Alpha Channel in Texture Mapping

  • Represents transparency.
  • Allows textures to have varying levels of opacity.
  • Enables rendering of transparent objects like glass, while maintaining realistic interactions with other objects.

MIP Mapping in OpenGL

  • Improves texture rendering by creating a series of prefiltered texture images at different resolutions.
  • Advantages:
    • Better texture quality at varying distances.
    • Enhanced performance.
    • Prevention of texture popping artefacts.
  • Particularly useful in real-time graphics and scenarios where consistent texture quality across distances is critical for a visually pleasing and efficient rendering process.

Global Illumination

  • Simulates how light interacts with surfaces and scatters throughout a scene, considering specular and diffuse lighting.
  • Differs from local illumination models, which do not consider object-to-object interactions.
  • Examples: ray tracing, path tracing, and radiosity.

Rendering Capabilities Characterization

  • 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).

Primary Uses of Normals in Computer Graphics

  • 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 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.

Rendering Methods and Caustic Effects on Velvet

  • Phong model:
    • Only considers the local geometry and the direction of incoming light.
    • Would estimate a reflection intensity that would not be affected by the presence of the gemstone.
    • The colors of the velvet surface would be represented without any shadows or caustics.
  • Whitted ray tracing:
    • Since the velvet surface is approximated as an ideal diffuse surface, for any point on the surface, the backward tracing of the corresponding ray would stop there.
    • A shadow ray (aka light ray) from this point to the light source would be created.
    • Since the gemstone occludes the path of this shadow ray from the point to the light source, the point would be classified as being in the shadow.
    • The highlighted area would be rendered as being completely in the shadow, without any caustics.
  • Path tracing:
    • For every pixel on the cushion surface, many rays would be shot, and each one of them would follow a random walk.
    • Some of them would be refracted within the gemstone and, for the bright regions of the caustics, would eventually hit the light source.
    • Aggregating the contributions of all random rays, path tracing would simulate in a very realistic way the complex interactions between the light and the objects in the scene.
    • The illumination on the cushion surface would be very realistic and would include the caustics.

Specular Highlight Peak Calculation

  • The reflection direction r is (3,1,6)(3, −1, −6). This is easy to see if you understand how the reflection direction is defined which is defined by r=2(nL)nLr = 2(n · L)n − L, where LL is the light direction and nn is the normal vector.
  • We first consider the ray from the 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)
  • Use the y coordinate to solve for t gives t=2t = 2.
  • Substituting gives b=2b = -2 and d=18d = 18.

Matrix Transformation

The matrix applied to shape M is then:

\begin{bmatrix}
1 & 0 & 0 & 2 \
0 & 1 & 0 & -2 \
0 & 0 & 1 & 0 \
0 & 0 & 0 & 1
\end{bmatrix} \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} \begin{bmatrix}
1 & 0 & 0 & 0 \
0 & 2 & 0 & 0 \
0 & 0 & 1 & 0 \
0 & 0 & 0 & 1
\end{bmatrix}

Z-buffer Algorithm

  • The Z-buffer handles occlusions by recording the depth of each rendered pixel and overwriting it if a new, closer surface is rendered on the same location.

Rendering Order (alpha = 1)

  1. Render the yellow bar.
  2. Render the green bar.
  3. Render the red bar.

Algorithm Choice (alpha = 0.4)

  • Painters is a better choice.
  • Z-buffer cannot deal with translucency easily as it requires to store 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 instead of overwriting it.