Posts

Showing posts from December, 2024

Illuminating Raven: Adding HDR and Advanced Lighting to Raven

Image
Hi everyone and welcome to the fifth blog of my ray tracing journey. In this assignment, I have implemented new types of lights in Raven; directional, spot and environment light. In addition to that, Raven now supports High Dynamic Range (HDR) rendering and tone mapping. Dragon New with Spot Scene rendered in 287ms Implementation: HDR Rendering and Tone Mapping We will no longer save our outputs as PPM or PNG files that clipped to 8-bit [0-255] range. Instead, we can save the rendered images as HDR format using the .exr format. Additionally, Raven will have the capability to tone map these images and save them as PNG images. For reading and writing HDR images, I used tinyexr library. For tone mapping, I implemented Reinhard’s Photographic Tonemapping Algorithm. Cube Point HDR Scene rendered in 39ms. Directional Light Directional lights are defined by two key parameters, radiance and direction , and are treated as if they originate at an infinite distance, making all rays parallel. This...

Elevating Raven: Texture Mapping

Image
Hi everyone, welcome to the fourth blog of my ray tracing journey. In this assignment, I have implemented texture mapping features in Raven. These enhancements include support for diffuse, normal, and bump mapping using image-based textures. In addition to handling image textures, Raven can generate procedural textures, such as Perlin noise and checkerboard pattern. Dragon Scene rendered in 1.2 sec Implementation I started to implement a Texture base class, then derived three classes, ImageTexture, PerlinTexture, and CheckboardTexture , from it. After that, I updated my parser to handle the newly introduced parameters, Textures, TextureMap; Interpolation, Decal modes etc.. Replace All: Ignore shading and simply map the texture color directly onto the object’s surface. Replace kd: Use the texture value as kd value. Replace ks: Use texture value as ks value. (Unfortunately, I couldn't manage my time to implement it. Although it is not hard to implement, I was unabl...