Mon March 19th, 11:59pm
You will add more complicated materials, environment lights, and depth of field to your ray tracer
- Part 1: Mirror and Glass Materials
- Part 2: Microfacet Material
- Part 3: Environment Light
- Part 4: Depth of Field
- Part 5: Shading
You'll also want to read these articles:
Using the program
Accept the assignment through the link posted on piazza, and clone from your private repo using the command:
git clone <YOUR_PRIVATE_REPO>
As before, use cmake and make inside a build/ directory to create the executable (how to build and submit).
You may wish to consult the getting set-up portion as well for part 5 so that you may download any dependencies you require now for offline work later on.
Please consult the project 3-1 spec for details on the user interface. Here are some old and new command line flags you'll want to pay attention to:
-e some_map.exrloads an environment light .exr image file (part 3)
-b 1.23sets the lens radius to 1.23 (part 4)
-d 4.56sets the focal distance to 4.56 (part 4)
As well as two new keyboard commands:
k" | "
l": Increase/Decrease the camera lens radius
;" | "
'": Increase/Decrease the focal distance
Also please use the "cell render" mode to debug, where you can interactively click and drag to select a small region of the screen to be rendered. Press
c (after pressing
r) to toggle this mode in the GUI.
Integrating the new code
In order to get this new version of
pathtracer up and running (even to run cmake), you will need to copy over the version of these files you filled in for your previous assignment (make sure you copy the entire file):
- Part 1: triangle.cpp, sphere.cpp
- Part 2: bvh.cpp, bvh.h, bbox.cpp
Additionally, you will have to copy these specific functions into the new pathtracer.cpp file:
and these functions into bsdf.cpp
and this function into camera.cpp
Do not overwrite the rest of these three files!
When you finish Project 3-2, you can basically render anything, so show it off! Make some fancy scenes and materials, and play with the lens! Again, be creative!