RayTracer



Group Members:

Adhip Agarwal
Roll No. 07005009

Saket P. Patkar
Roll No. 07026002


Functionalities Implemented

  • Implemented ray-object intersections with: spheres, cylinder, cones, circle, planes and triangles.
  • Implemented affine transformations of objects.
  • Implemented the Phong Illumination Model.
  • Implemented computation of reflected rays, transmitted rays.
  • Implemented shadows.
  • Implemented uniform super-sampling for anti-aliasing.
  • Implemented reading of the scene from a scene file.
  • We write the rendered image to a file in 'ppm' format.
  • The depth of recursion for the image is specified in the scene file.
  • The same scene file can be read to render a quick preview of the scene using OpenGL.
  • Implemented a simulator in the preview where if you click on any pixel (i,j) of this preview image, it shows (in another window) in 3D the scene, and a primary ray emanating from the eye to this pixel, rest is no yet complete.
  • Implemented glossy-reflections and translucency.

Description of the files used.

  • We made a single file to generate the .ppm files. This .cpp file takes care of all the matters starting from taking input from the scene file and parsing it to get a meaningful information form the data given. And then transforming the data with our functions and functionalities implemented to get to the desired output file.
  • To aid our main file to generate the required ppm file we edited the matvec.cpp and matvec.hpp files to include the functionalities of transpos, inverse, etc for given matrices.
  • To generate the preview in a 3-D space we used the glut library and with the help two files we defined (camera.cpp and camera.hpp used to help in rotating the camera) we used the main/main2.cpp files to get the desired effects. This file also generates the desired output by taking in the same scene file as input.


Some Good Results...finally!!!

  1. Multilple Reflections - an eye candy.

    multiplereflection
  2. Shadows - two balls on a triangular base.

    shadows
  3. Finally the Rotations work - a rotated triangle.

    transRotation
  4. Even the Translations occur - a displaced cylinder and a transparent sphere (even TIR now happens..yoho!).

    translaTransp
  5. Debugged the cylinder.

    transmissionCyl
  6. Random Drawing 1 - Someting that scares you when enabling refractions result in ...

    Random1
  7. Random Drawing 2 - Another shocking revelation.

    Random

Latest pictures developed in the process of making the LUXO.

We modified our existing raytracer to make the required lamp. We had to modify the code snippets pertaining to the rendering of cones, also we included the functionality to make hollow cones. We also had to modify the code to do the WCS to VCS transform. Defining eye, lookat_vector and up_vector in the respective order in the scene file.
The links to some of the ppm format images rendered in the process are given below.
  1. The illumination of a surface by defining a light-source inside a cone.



  2. Introducing a sphere in the area illuminated by the light-source in a cone (The first step towards making of LUXO).



  3. LUXO with a sphere in-front of the illuminating cone. Here the surface on which LUXO is placed is not reflecting.



  4. A decent image of LUXO.



  5. More depth of tracing. Higer level reflections are seen.

  6. LUXO image with Anti-Aliasing and super sampling.

 

Back