Computer Laboratory

Introduction to Graphics (Michaelmas 2020)

Click here to check the course website.

Please remember to hand in your work by 5pm (17:00) on the day before the supervision!


Supervision 1

Warmup questions

  1. What is an image?
  2. What is colour banding?
  3. What are the ray parameters of the intersection points between ray (1,1,1) + t(−1,−1,−1) and the sphere centered at the origin with radius 1?
  4. Why do we need anti-aliasing? Why is a random grid better than a regular grid?

Longer questions

  1. Explain the three components of the Phong reflection model. What colour should the specular highlights be?
  2. What information would you need to define a ray-tracing viewing volume / frustum (look these up if you are not sure what they mean)?
  3. Write pseudo-code for the ray tracing algorithm, where the first line of code is:
    for each pixel:
    	...
    			
  4. Explain how Ray tracing can achieve the following effects:
    • reflections
    • refraction
    • shadows
  5. Provide two examples for distributed ray tracing and explain how the selected techniques works

Supervision 2

Warmup questions

  1. What is OpenGL? What does it mean that it's an API?
  2. How is Vulkan different from OpenGL?
  3. We use a lot of triangles to approximate stuff in computer graphics. Why are they good? Why are they bad? Can you think of any alternatives?
  4. Put the the following stages of the OpenGL rendering pipeline in the correct order. Very briefly explain what each stage does and comment whether each stage is programmable.
    • Rasterization
    • Vertex shader
    • Fragment shader
    • Primitive setup
    • Clipping
  5. What are “in”, “out” and “uniform” variables in GLSL? How are the values of these variables set?

Longer questions

  1. Similarly to last supervision, write a few lines of pseudo-code for rendering with OpenGL (rasterisation):
    function draw_triangles(triangles):
    	...
    			
  2. Describe the Model, View, and Projection transformations. Comment on why we use homogeneous co-ordinates.
  3. When transforming objects into world co-ordinates using matrix M, position vectors are pre-multiplied with M. Discuss whether this matrix is suitable to transform the objects' normals. If not, can you suggest an alternative?
  4. 2010 Paper 4 Question 4
  5. 2017 Paper 4 Question 3
  6. Describe the z buffering algorithm. Compare the projection matrix on slide 86 with the projection matrix in the 2010P4Q4 past paper, and discuss which one you need to use for Z buffering
  7. What is the worst case scenario, in terms of a number of times a pixel colour is computed, when rendering N triangles using the Z-buffer algorithm? How could we avoid such a worst-case scenario?

Supervision 3

Texturing

  1. How could you use the following texture types to texture a sphere in OpenGL?
    • 2D
    • 3D
    • CUBE_MAP
    How do these techniques compare in terms of visual quality and storage?
  2. For downsampling an image, explain how each of the following sampling techniques work (feel free to use khronos.org when unsure). Discuss performance, storage and visual quality.
    • GL_NEAREST
    • GL_LINEAR
    • GL_NEAREST_MIPMAP_NEAREST
    • GL_LINEAR_MIPMAP_NEAREST
    • GL_NEAREST_MIPMAP_LINEAR
    • GL_LINEAR_MIPMAP_LINEAR
  3. Search for "normal map" images on the internet. Why do they tend have an overall blue shade?
  4. How could you implement a reflective water surface in OpenGL using Frame Buffer Objects? What if you wanted to add reflection onto a spherical surface? (Ray tracing is tempting, but you are to think about the OpenGL way here :) ).

Colour / perception

  1. What is the difference between luma and luminance?
  2. Why is gamma correction needed?
  3. What are the differences between rods and cones?
  4. How can two colour spectra appear the same? What are these called then?
  5. What is the relation between LMS cone sensitivities, CIE XYZ and the RGB space of a monitor?
  6. Explain the purpose of tone-mapping and display-encoding steps in a rendering pipeline.
  7. What is the rationale behind sigmoidal tone-curves?