Homework 5 - Additional Light Sources, Tonemapping, HDR Output
In the fifth assignment of CENG795, we are expected to introduce many new features to the ray tracer, such as:
Photographic Tonemapping
- Directional Light Sources
- Spot Light Sources
- Photographic Tonemapping
- HDR Output
In this assignment, I removed lodepng library and added OpenCV library to be able to generate both png and exr outputs.
Directional and Spot Light Sources
To introduce new light sources, I implemented an virtual base named "Light" for all the light sources. After converting old light types(which are point and area), I implemented Directional and Spot Light sources. My outputs are:
![]() |
cube_directional.png(800x800) is saved in: 72 milliseconds 499 microseconds |
![]() |
dragon_spot_light_msaa.png(800x800) is saved in: 20 seconds 363 milliseconds 401 microseconds |
For photographic tonemapping, I followed Reinhard's Photographic Reproduction Technique (http://www.cmap.polytechnique.fr/~peyre/cours/x2005signal/hdr_photographic.pdf). Note that in section 3.1, 1/N should be inside the exp operation.
![]() |
cube_point.png(800x800) is saved in: 77 milliseconds 595 microseconds |
![]() |
cube_point_tonemapped.png(800x800) is saved in: 78 milliseconds 525 microseconds
HDR Output:
I used OpenCV for writing hdr input. Then, I uploaded my output to openhdr viewer: https://viewer.openhdr.org/i/5aef3ef13ece7308976122df/linear/exposure=20.9 Note:
|
Nice post.
YanıtlaSil