Computer Laboratory

Advanced Graphics (Lent 2018)

The supervision work for this course consists of a mixture of written and practical exercises.
Please make sure that you attempt the practical exercise first, and feel free to let me know if you get stuck somehwere.

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

These exercises are heavily based on the official course material.


Supervision 1

Practical exercise

Please complete all the practical exercises from the course site and submit the eight screenshots to my email address. There is not need to submit code, unless you want to discuss it during the supervision.

Written questions

  1. Explain the difference between uniform, in and out variables in GLSL
  2. Explain how the ambient, diffuse and specular terms contribute to the classical Phong lighting equation. How is Gooch shading different?
  3. What is the purpose of having world, viewing and screen space coordinates? What can you do with stacked world transforms?
  4. What kind of transformation matrix do you need to use to find the world coordinates of a normal vector?
  5. What is a pixel shader and how is it different from a fragment shader?

Supervision 2

Written questions

Please work through all the exercises from the course site and submit as a single pdf.

Practical exercise

Write an SDF-based ray tracer. I recommend using the new Further Graphics tick (Instructions, project, IDE setup), or start from scratch in Shadertoy.


Supervision 3

Please have a go at the excercise sheet found as on the course website.


Supervision 4

Models of visual perception

  1. Section 1 from the excercise sheet found as on the course website.
  2. In the fovea the average S-cone density (density of cones reacting to short wavelength light) is estimated to be 1 cone in 10 minutes of visual angle. Using the Nyquist frequency derive the highest frequency signal that is still perceivable with the S-cones (you can express the frequency of the signal using cpd -- cycles per degree).
  3. The average density of L and M cones separation is about 30 seconds of visual angle. Similarly to exercise 1), derive the highest frequency signal that is still perceivable using the combination of the L and M cones.
  4. In a CAD software the user needs to be able to distinguish very fine details. Based on the results from above or otherwise find a colour that would be easily visible against a dark background.
  5. How does JPEG exploit the multi-resolution visual model?
  6. In video compression the spatial resolution of the chroma (colour) channel is often reduced. Why is this preferable to subsampling the entire image?
  7. Past Paper Year 2016 Paper 8 Question 1

High Dynamic Range

  1. Describes the three main intents/steps of tone-mapping
    • Derive the contrast ratio for a rendered image where
      L_max = 1500 cd/m^2
      L_min = 0.1 cd/m^2
    • How does the contrast ratio change if we add F = 3.14 to the luminance values?

Practical exercise

Try to write your own primitive monochrome tone mapper in Java

As a starting point, I recommend downloading this zip archive which provides you with an example hdr file and a loader class.

The original loader class is also available here: https://github.com/aicp7/HDR_file_readin

  • Load in the image file and display the raw luminance values (should be normalised to 0..1)
  • Apply gamma correction. Remember, your display luminance reproduction can be approximated as a^2.2
  • Compute a 255-bucket global histogram of the luminance values. Apply histogram equalization.

When finished, please submit your final code as an executable jar file (including .java and .class files) alongside any relevant screenshots.