Posts

Showing posts from April, 2021

Part 2: Recursive Ray Tracing & Bounding Volume Hierarchy

Image
For the second part of the ray tracer, two new features are added to my basic ray tracer: 1. Recursive Ray Tracing ( Reflection & Refraction ) 2. Bounding Volume Hierarchy Besides these core features, the new ray tracer also supports the following: 1. PLY File Parsing As the core ray tracer is improved, it will be able to deal with more and more complicated scenes and larger meshes. Since most of these advanced scenes are represented using PLY files, this version of the ray tracer also provides support for PLY file format. For parsing PLY files, an external library called hapPLY is utilized. 2. LookAt Camera In the previous version, only the simple camera model where the image plane is represented by left, right, top and bottom parameters was supported. With this version, the ray tracer also supports LookAt Camera model where image plane is described by the angle called fovy and it is assumed that the image plane is centered with respect to the camera position. While parsing the...

Part 1: Basic Ray Tracer

Image
In the first assignment, we are expected to implement a basic ray tracer which supports the following features: 1. XML Parsing  & Storing a Scene:       A Scene is provided to the ray tracer as input, which is defined as an XML file. So, the first thing to do is parsing this input XML file and storing the Scene in a convenient way. For XML parsing task, an external library called TinyXML-2 is utilized. For now, a Scene consists of Cameras , Point Lights , Materials , Objects and their related Vertex Data . 2. Simple Perspective Camera Model:       For the first version of the ray tracer, only the simple perspective camera model is supported. In the input files, it is not guaranteed that the camera vectors are provided as orthogonal unit vectors, so they are converted to orthogonal unit vectors by the ray tracer to make sure that the camera parameters are set correctly. 3. Ray-Object Intersections:       Currently, there are 3 type...