During the Computer Graphics course students of the CMC Faculty of Lomonosov MSU are offered to solve a task on ray tracing algorithm and visualize 1-3 scenes using the algorithm.
Obligatory requiremnts are as following:
- implementation of local illumination with Phong's model (or others);
- implementation of shadows;
- implementation of mirror reflections;
- using at least 3 different materials;
- using at least 2 different geometric primitives;
- using at least 1 light source;
- 1 scene rendering should take no more than 1 second (for processor like 6-cores AMD Ryzen 5 3600);
- minimal resolution for an image is 512x512.
Students are also offered to perform additional features.
Basic primitives: spheres, cube.
Extra features implemented on the scene:
- Additional geometric primitives: parallelepiped, plane;
- 2-order surface: cylinder;
- Elimination of the straggering effect;
- Multithreading implementation.
High resolution version (1920x1080): scene1_high_resolution.jpg.
Basic primitives: spheres, plane.
Extra features implemented on the scene:
- Using environment spheerical maps (observatory);
- Using textures (NASA logo).
High resolution version (1920x1920): scene2_high_resolution.jpg.
Solution to the task is written on C++: ray_tracing.cpp.
To compile the program do:
$ cmake .
$ make -j 4
To run the program do:
$ ./ray_tracing
Following parameters are available:
"-out" --- file to write a result in (should have .jpg format, scene.jpg by default);
"-scene" --- number of scene (1 or 2, 1 by default);
"-threads" --- number of threads (8 by default).
Example: $ ./ray_tracing -scene 1 -threads 4 -out "scene1.jpg"