Various assignments I did for the Rendering course (Computer Science 591 at the University of Calgary) I took in winter 2019.
Links to additional images on my ArtStation
- Test for BVH vs KD trees in PBRT
- Polygonal apertures in PBRT
- Deferred rendering in OpenGL
- SSAO in OpenGL
Source code is self-hosted on my home Git-Gogs server which is only accessible from my home network.
BVH vs KD
Features
- Made the test scene in Blender then figured out how to export it to PBRT and automate as much of the process as possible.
- I then just added models to a selected region in the scene and had a batch script rendering each scene with PBRT using both KD and BVH acceleration.
- Once that was done all that was needed was to graph the results and realize that both increase at the same rate with just a slight difference in speed.
Cycles Render
PBRT Render
Examples of the test objects I added to the scene
Comparison Graph
Increase in render time as the number of test objects in the scene increases. Both time increases are clearly logarithmic as they barely increase while the 𝑥-axis is exponential. Which matches the literature time complexity (𝑂(log(𝑛)) for BVH and KD Trees. Rendered using an AMD Threadripper 1950x.
Credits
- PBRT library and the corresponding documentation.
Polygonal Apertures
Features
- By default PBRT only has circular apertures.
- Extended PBRT to support any regular polygonal aperture.
- Also supports stars of any polygonal number of points despite the bonus only requiring 5 pointed stars.
Default PBRT Aperture
Regular 5-Sided Aperture
5-Point Star Aperture
Regular triangle aperture
3-Point Star Aperture
Credits
- PBRT library and the corresponding documentation.
Sampling Fix
PBRT has a bug where it will sample a half disk the same as a full disk, our task was to fix this by changing the samples so that it would be from just the half disk rather than the entire disk. Unfortunately I used rejection sampling instead of properly transforming the samples to be uniformly spaced on the disk. As such my implementation was incorrect and visually unimpressive.
Features
- Uses rejection sampling to ignore invalid rays.
The issue
My horrible fix
(Note how the brightness decreases due to rejection sampling)
Credits
- PBRT library and the corresponding documentation.
Deferred Rendering
Features
- Based on my model viewer from Intro to Computer Graphics.
- As such shares many of the features that were implemented for that assignment.
- Main addition is the deferred rendering pipeline.
- Also has Oren-Nayer diffuse shading in addition to Phong shading.
Phong lighting
Oren-Nayer shading
Sigma = 0
Sigma = 20
Credits
- Learn OpenGL has always been my go to source for anything OpenGL related and this was no different.
- Following resources helped with figuring out Oren-Nayer shading
SSAO
Features
- Continuation of the previous assignment (assignment 4, deferred rendering) so many of the previous features carried over.
- Implemented Crytek’s SSAO
- Rocket model was a slightly upgraded version of the rocket in the scene for assignment 1.
Without SSAO
With SSAO
Credits
- Once again Learn OpenGL has helped me figure stuff out.