https://graphics.cg.uni-saarland.de/courses/cg1-2022/index.html
sudo apt update # update package index
sudo apt install -y build-essential git cmake # install build tools
sudo apt install -y xorg-dev libglu1-mesa- dev zlib1g- dev zenity # install dependencies for tev
sudo apt install -y libpng-dev # install the PNG library required by our framework
brew install cmake # install CMake
brew install libpng # install the PNG library required by our framework
sudo snap install --classic code
Alternatively, you can download a .deb from https://code.visualstudio.com/#alt-downloads and run:
sudo dpkg -i ~/Downloads/code_*.deb # path to downloaded .deb file
brew install visual-studio-code
Tev needs to be installed from source, which is luckily a straightforward process
git clone --recursive https://github.com/Tom94/tev.git
mkdir tev/build && cd tev/build
cmake ..
sudo make -j i nstall
Go to https://github.com/Tom94/tev/releases and download the latest tev.dmg. Open the dmg file and move tev to your Applications folder. For security reasons, the first time you run tev you must right click on the application and click “Open”.
You would need to install 2 extensions in VSCode:
- The “CMake Tools” extension to be able to build your project
- The “C/C++” extension enables intelligent code completion and debugging.
CMakeLists.txt allows you to use any build system. The respective assignment-xx.cmake lists all files that were added with a particular assignment. On Linux libpng-dev is required for the build and should be automatically detected.
By invoking:
mkdir build_debug && cd build_debug # create and enter a build directory for CMake
cmake -DCMAKE BUILD TYPE=Debug .. # configure the project in debug mode
cmake --build . # compile the project, producing executable cgray
For release mode use cmake -DCMAKE BUILD TYPE=Release .. in a different build release directory respectively.
- Perspective Camera: rt/camera/perspective.h
- Depth of Field Perspective Camera: rt/camera/dofperspective.h
- Orthographic Camera: rt/camera/orthographic.h
- Fish Eye Camera: rt/camera/fisheye.h
- Environment Camera: rt/camera/environment.h
- Sphere: rt/solids/sphere.h
- Axis-Aligned Bounding Box: rt/solids/aabox.h
- Triangle: rt/solids/triangle.h
- Smooth Triangle: rt/solids/striangle.h
- Disc: rt/solids/disc.h
- Plane: rt/solids/infiniteplane.h
- Quad: rt/solids/quad.h
- Environment Solid: rt/solids/environmentsolid.h
- Bounding Volume Hierarchy: rt/groups/bvh.h
- Conductors: rt/materials/conductor.h
- Fuzzy Conductor: rt/materials/fuzzyconductor.h
- Dielectrics: rt/materials/dielectric.h
- Flat Material: rt/materials/flatmaterial.h
- Lambertian: rt/materials/lambertian.h
- Phong: rt/materials/phong.h
- Combined Material: rt/materials/combine.h
- Point Light: rt/lights/pointlight.h
- Directional Light: rt/lights/directional.h
- Spot Light: rt/lights/spotlight.h
- Area Light: rt/lights/arealight.h
- Ambient Light: rt/lights/ambientlight.h
- Constant Texture: rt/textures/constant.h
- Image Texture: rt/textures/imagetex.h
- Checkerboard Texture: rt/textures/checkerboard.h
- Perlin Noise: rt/textures/perlin.h
- World Mapper: rt/coordmappers/world.h
- Plane Mapper: rt/coordmappers/plane.h
- Cylinder Mapper: rt/coordmappers/cylindrical.h
- Spherical Mapper: rt/coordmappers/spherical.h
- Triangle Mapper: rt/coordmappers/tmapper.h
- Environment Map: rt/coordmappers/environment.h
- Quad Mapper: rt/coordmappers/quadmapper.h
The rendered images for each assignment and also the rendering competition are stored in the images
folder. Models required for main/a_RC.cpp
can be found here. You can find further details about our submission for the rendering competition here.