Part 5: HDR Imaging & Advanced Lighting
For the fifth part of the ray tracer, the following features are implemented: 1. HDR Imaging and Tonemapping Until now, only PNG format was supported for saving rendered scenes. RGB values obtained by shading calculations are fractional and they are not limited to any range. However, for saving them in PNG format, the values were being clamped to 0-255 range and converted to integers, which results in removing a considerable amount of details from the image. With HDR imaging , RGB values are no longer clamped and they can be represented with floating points by saving the scenes in EXR format. The RGB values obtained from ray tracing can directly be used for HDR images, but they have to be tonemapped to be saved in PNG format. For tonemapping, Photographic Tonemapping by Reinhard (global operator) is implemented. With the HDR imaging support, the ray tracer is also able to use HDR texture images in EXR format. In order to read HDR images, tinyexr is used, while for writing HDR images ...