Numerical Tecniques for Photorealistic Image Generation

A.Y. 2024/2025
6
Max ECTS
62
Overall hours
SSD
FIS/05 FIS/06
Language
Italian
Learning objectives
This course helps the students to develop two abilities: (1) to develop numerical codes that approximate a model of some non-trivial physical phenomenon, and (2) to learn how to properly develop complex software codes, using a number of advanced professional tools to aid the development.
The first ability is declined into the development of a software for the calculation of solutions for the rendering equation. The software will generate more and more photorealistic images of three-dimensional objects, similar to what professional programs like Autodesk 3D Studio do.
The second ability will allow students to develop complex software codes, made by several parts interacting together and strenghtned by internal verification tests. To fulfill this purpose, students will learn how to use advanced tools and procedure that are used nowadays, like performance measurement (both in terms of memory occupation and time), version control systems, bug-tracking systems, unit and integration testing, Continuous Integration (CI) systems, etc.
Expected learning outcomes
At the end of this course, students will have achieved the following abilities:
1. They will be able to develop complex software codes that can approximate the behaviour of a non-trivial physical model;
2. They will know how to describe mathematically the shape of complex three-dimensional objects;
3. They will be able to use omogeneous transformations and quaternions to describe the placement and orientation of objects in space;
4. They will be able to collaborate with other people in the development of software using distributed version-control systems (in the course we will use git) and code review systems;
5. They will know how to use bug-tracking systems to control the quality of their own software;
6. They will be able to use web-platforms to handle and share their codes (in this course we will use GitHub);
7. They will be able to use tools for performance measurement (perf, valgrind, etc.).
Single course

This course can be attended as a single course.

Course syllabus and organization

Single session

Responsible
Lesson period
Second semester
Course syllabus
The following topics will be taught:

- Rendering equation
- Colour spaces
- Encoding of images
- Basics of three-dimensional geometry
- Geometrical description of complex objects
- The ray-tracing and global illumination algorithms
- Monte Carlo methods
- Compiler theory

During lab lessons, students will implement codes to compute formulae described during front lessons. Moreover, the following topics will be taught:

- Version control systems
- Bug-tracking systems
- Use of continuous-integration systems
- Pull requests and code reviews
- How to assign proper version numbers
Prerequisites for admission
This course can be followed by students of «laurea magistrale» in physics and in Physics of Data; it is not meant to be followed by students of «laurea triennale».

Students must already know one programming language at least, like C, C++, Fortran, Pascal, Julia, etc. They have the freedom to pick any language they prefer to implement the codes needed to complete the course. To allow the teacher to test students' codes on his own computers, they must ensure that their programs are able to run on 64-bit machines running Linux. Of course, it is neither forbidden nor discouraged that these codes can be run on other platforms as well.

Some languages, like Fortran or Python, are not suitable for the development of the kind of software needed in this course. Nevertheless, during the first lessons of the course the teacher will provide detailed information and advice about the language chosen by the students.

Mandatory abilities:

- Analisi matematica 1;
- Analisi matematica 2;
- Analisi matematica 3;
- Geometria 1;
- Informatica;
- Laboratorio di trattamento numerico dei dati sperimentali.
Teaching methods
The course is taught using both front lessons and lab sessions. Attendance to the latter is mandatory. Each week a two-hour front lesson will be taught and recorded in a video file that will be made available to the students, followed by a lab session lasting two or three hours and whose attendance is mandatory, for 13 weeks.
Teaching Resources
- Suffern, Ray-tracing from the ground-up (2007), https://books.google.it/books?id=ggJ-DwAAQBAJ
- Pharr, Jakob, Humphreys, Physically based rendering: from theory to implementation (2004), https://www.pbrt.org/
- Dutré, Bekaert, Bala, Advanced global illumination (2006), http://sites.edm.uhasselt.be/agibook/
- Shirley, Ray tracing in one week end book series, https://raytracing.github.io/
- McQuaid, Git in practice (Manning, 2015), https://www.manning.com/books/git-in-practice
- Chacon, Straub, Pro Git, https://git-scm.com/book/en/v2

Ariel website.
Assessment methods and Criteria
During the final exam, each student (*not* group) will give a keynote about the software they developed in front of the teacher and other students. There are no written tests. Grading is a mark from 18 to 30, which considers the quality of the weekly work done in lab sessions throughout the semester.

Specific competences that will be used to quantify the final mark are the following:

- Knowledge of the theoretical foundations of the course: geometry, rendering equation, transformations, quaternions, filtering, shading, Monte Carlo methods, etc.
- Ability to reason critically on the project that the student developed;
- Cleanliness of the code;
- Proper usage of the `git` repository;
- Clarity of the GitHub webpage for the project and its documentation;
- Quality of the keynote presentation;
- The presence of functionalities in the code that were marked as «optional» will help students to increase their final mark.
FIS/05 - ASTRONOMY AND ASTROPHYSICS - University credits: 3
FIS/06 - PHYSICS OF THE EARTH AND OF THE CIRCUMTERRESTRIAL MEDIUM - University credits: 3
Laboratories: 48 hours
Lessons: 14 hours
Professor: Tomasi Maurizio
Professor(s)
Reception:
Ask the teacher
Laboratorio di Strumentazione Spaziale, Department of physics (via Celoria 16, Milano)