Photorealistic graphics – labs (2023/2024)

Lab credit

For the lab credit you will need to work on a Term project – implementation of your own Ray-Tracer in C# language. A project template and some support classes will be provided, the rest will be on you.

You have to earn at least 50 points (upper limit is 80).

See current points in this shared table

More information will be available in the RT004 GIT repository

A. Term project

You will write your own ray tracer from scratch. Scalable and well-designed (temporary states could be slightly messy) code will be rewarded. Programming language is C# – .NET 6, usual developing environments will be Visual Studio 2022 for Windows and Visual Studio 2022 for Mac. Linux users could use Visual Studio Code.

No GUI, command line interface only.

Information from the lecturer, project template, support classes... will be published via the RT004 GIT repository.

B. Documentation

See the RT004 GIT repository.

C. Project plan

Step01. GIT repository setup

  • Create your own private GIT repository – GitLab and GitHub are two recommended platforms. Create your own repository and link the original one as a "remote" for a comfortable way to integrate future updates. You can use the command git remote add origin
  • Setup your own Visual Studio project – you can copy it from the RT004/src/rt004. The standard place for your solution is in the solution.
  • Write your initial documentation page using the Markdown syntax
  • Grant me the R/O permissions – GitLab link (pelikan), GitHub link (pepcape)

Step02. Command line program

  • The simple command-line project is already available.
  • Setup a simple command-line parameter and config-file parsing systems – any simple text based (or XML-based) format is possible.
  • Some simple logging/debug system could be useful but you can postpone it...

Step03. Raster image output

  • Your program should create an HDR raster image with the given resolution and write it to a disk file – PFM format (and eventually Radiance HDR format) will be available in the project template.
  • Implement any "non-trivial" image content (e.g. defined by a formula) – please test your command-line/config parameters – try to modify the image resolution and content
  • Recommended image viewers are Picturenaut for HDR, IrfanView for LDR, or GIMP for any format...
  • Checkpoint 1: I will check your repository (it must be readable for me) and try to compile and run your program. I’ll check your config system and result HDR images.

The rest of the plan is in brief form only, see RT004 repository for details

Step04. Camera (ray generator for ray-tracing)

Step05. At least two solids (Sphere, Plane, Cylinder...)

Step06. A simple local reflectance function (BRDF) and an associated material description

Step07. Light source (point or directional)

Step08 + Checkpoint 2. Ray-casting for rendering images w/o recursion

Step09. Object-oriented design (refactor your code if it is not OOP yet)

Step10. Shadows

Step11 + Checkpoint 3. Reflections and recursion (the 1st version of ray-tracing)

Step12. Scene hierarchy read from a disk file (scene description file format)

Step13. Refractions (transparent materials)

Step14 + Checkpoint 4. Anti-aliasing, mandatory checkpoint (better ray-tracing)

Optional topics - pick at least two of them

Approximately with increasing complexity and decreasing importance/relevance.

Topic01. More solids

Topic02. More BRDFs

Topic03. Textures

Topic04. Noise textures

Topic05. Tone-mapping

Topic06. Parallel implementation

Topic07. Sky-dome

Topic08. Acceleration for triangle soups

Topic09. CSG scene definition (set operations)

Topic10. Distributed ray tracing (soft shadows, soft reflections...)

Topic11. Scene animation, motion blur

Topic12. Spectral ray-tracer, dispersion of light

Topic13. Path-tracing

Credit requirements

Students have to earn a total of at least 50 points, upper limit is 80 points (at least 16 points have to be from 3D graphics assignments).
Deadline for winter-term credit is 3. 3. 2024 !
Deadline for summer-term credit is 31. 6. 2024 !

Credit points will be added to examination result (max 100 points) and the final grade will be determined using the following Grading Table:
150+ points A (výborně)
130 to 149 points B (velmi dobře)
110 to 129 points C (dobře)
less than 110 points F (nevyhověl(a))

How to earn credit points

A1. assignments running through the whole term NPGR003 (implemented in C#)

Assignments are given in the labs (practicals), one assignment will be given in each lab. Students will have at least two weeks to deliver a solution. Number of points awarded for a solution depends on the difficulty, solution quality, robustness, and elegance. Additional bonus points can be given, e.g. in case of a contest.

A2. semester project NPGR004 (C#)

The project you will be working on throughout the entire semester. For detailed information, step-by-step instructions, and checkpoints, see the detailed pages of the exercise.

B. transfer from previous year

90% of last-year points could be transferred from the previous year (upon explicit student's request via email).


Some assignments have a well-defined quantitative criterion for solution comparison, based on which one can assemble a chart of best solutions. Such tasks will be marked as "CONTEST" and there will be a public chart displaying the best achieved results. In case the assignment is handed in by at least 10 students/teams, the three best solutions will obtain a premium of 10, 6, and 3 pts, respectively. (In case the solution was done in a team, all its members get the premium.) Only solutions submitted before the deadline are allowed to enter the contest!


Since grading of the assignments is very time consuming, your are kindly requested to follow several simple rules:
  • Mail messages have to be sent from an e-mail identity where your civil first name and surname can be easily determined.
    (Use something like "Malcolm Reynolds" <>.)
  • Message subject has to contain a task number (NPGR003 ... two-digit decimal number). Everything else is optional.
  • TEST functionality of your code. When grading, the code could be run in conditions slightly different from the obvious ones. If it fails, points go down. So make sure to produce robust code! Handle all (even weird) input conditions well. This is especially true if you have the code generated by an AI assistant!

Submission of assignment solutions

We will use your GIT "copy" ... details are specified in the public GIT repository.

Penalty for late submission

There is a penalty of 1 point for every day of delay after an assignment deadline.

Lab schedule

No English lab group is organized! If there are English speaking students willing to enroll the lecture, please contact me via email immediately!

Video-recordings of some labs (in Czech language) will be available on the Slides page. Individual consulting will be organized on demand. Send me an e-mail for a consultation.

Copyright (C) 2000-2024 J.Pelikán, last change: 2024-02-29 22:50:41 +0100 (Thu, 29 Feb 2024)