146 lines
5.5 KiB
HTML
Raw Normal View History

2022-04-07 18:46:57 +02:00
**Homework 5**
Student name: Cédric Hölzl
Sciper number: 257844
Microfacet BRDF (30 points)
===========================
Evaluating the Microfacet BRDF
------------------------------
In this section, I initialy, implemented the various equation with minimal optimisations, aiming to preserve understandability over optimisations. In a second time I made minor optimisations for exaple avoiding unecessary multiplications in the computation of $X^+$.
Sampling the Microfacet BRDF
------------------------------
The sampling was rather straight forward to implement, with two different cases to handle, diffuse or specular reflection. They were both implemented according to instructions.
Validation
----------
For the validation both the ajax render match and the $X^2$ warptest test passes.
Ajax (smooth):
<div class="twentytwenty-container">
<img src="ajax-smooth-ref.png" alt="Reference">
<img src="ajax-smooth.png" alt="Mine">
</div>
Ajax (rough):
<div class="twentytwenty-container">
<img src="ajax-rough-ref.png" alt="Reference">
<img src="ajax-rough.png" alt="Mine">
</div>
<img src="warptest.png" alt="Mine">
Brute force path tracer (15 points)
===================================
For the implementation, I followed the advice to copy the whitted sampling, made it recurse with a loop (looping while we intersect the scene, and with a russian roulette exit condition). We simplified it by removing some restrictions of the whitted algorithm, only accounting the emitter for the resulting "light" value.
Validation
----------
We can see that with the exception of the noise, the renders match.
Cornell box:
<div class="twentytwenty-container">
<img src="cbox_mats-ref.png" alt="Reference">
<img src="cbox_mats.png" alt="Mine">
</div>
Veach material test scene:
<div class="twentytwenty-container">
<img src="veach_mats-ref.png" alt="Reference">
<img src="veach_mats.png" alt="Mine">
</div>
Table test scene:
<div class="twentytwenty-container">
<img src="table_mats-ref.png" alt="Reference">
<img src="table_mats.png" alt="Mine">
</div>
Path tracer with next event estimation (25 points)
==================================================
For the implementation, similar as for the MATS, I followed the advice to copy the whitted sampling, made it recurse with a loop (looping while we intersect the scene, and with similar a russian roulette exit condition). This time we kept and differentiated the diffuse and specular.
Validation
----------
We can see that with the exception of the noise, the renders match.
Cornell box:
<div class="twentytwenty-container">
<img src="cbox_ems-ref.png" alt="Reference">
<img src="cbox_ems.png" alt="Mine">
</div>
Veach material test scene:
<div class="twentytwenty-container">
<img src="veach_ems-ref.png" alt="Reference">
<img src="veach_ems.png" alt="Mine">
</div>
Table test scene:
<div class="twentytwenty-container">
<img src="table_ems-ref.png" alt="Reference">
<img src="table_ems.png" alt="Mine">
</div>
Path tracer with Multiple Importance Sampling (30 points)
=========================================================
For the implementation, I merge both the MATS and EMS strategies. I then added the two weight factors and checked that when having one at 0 and the other at 1, I had the results of the MATS and MIS renders respectivly. I then added the proper computation using the required probability functions. I decided to add a PDF function to the mesh to have the probability of sampling a point on that surface.
Validation
----------
We can see that with the exception of the noise, the renders match.
Cornell box:
<div class="twentytwenty-container">
<img src="cbox_mis-ref.png" alt="Reference">
<img src="cbox_mis.png" alt="Mine">
</div>
Veach material test scene:
<div class="twentytwenty-container">
<img src="veach_mis-ref.png" alt="Reference">
<img src="veach_mis.png" alt="Mine">
</div>
Table test scene:
<div class="twentytwenty-container">
<img src="table_mis-ref.png" alt="Reference">
<img src="table_mis.png" alt="Mine">
</div>
Feedback
========
Time spent:
* Designing (~5h): Laying out the formulas and thinking on how to write things was relativly straight forward, figuring out how the MIS works took some time
* Coding (~5h): Coding was relativly straight forward from the design and formula
* Testing (~10h): I had issues with my the weights in my MIS implementation
It would have been great to have explicitly mentionned that switching the weight from 1.0 & 0.0 would result in having the MATS and EMS render. Figuring out and adding the required PDF used for the weight computation took some time. I found it relativly interesting to write the MATS and EMS from the Whitted implementation, and then mergin them into the MITS. Workload wise it was mostly fine, the main issue was the MIS implementation that took a lot of time to debug.
<!-- Slider -->
<script src="https://ajax.googleapis.com/ajax/libs/jquery/3.5.1/jquery.min.js"></script>
<script src="../resources/jquery.event.move.js"></script>
<script src="../resources/jquery.twentytwenty.js"></script>
<link href="../resources/offcanvas.css" rel="stylesheet">
<link href="../resources/twentytwenty.css" rel="stylesheet" type="text/css" />
<script>var markdeepOptions = {onLoad: function() {$(".twentytwenty-container").twentytwenty({default_offset_pct: 0.5, move_slider_on_hover: true});} };</script>
<!-- Markdeep: -->
<script src="https://morgan3d.github.io/markdeep/latest/markdeep.min.js?" charset="utf-8"></script>
<script>window.alreadyProcessedMarkdeep||(document.body.style.visibility="visible")</script>