Ray Tracing Assignment


The aim of the assignment was to generate interesting images using POVRAY - Persistence of Vision Raytracer (can be downloaded for free). So, it entailed studying and implementing various features of POV-Ray. The features used in the images are:-
  1. Basic Objects
  2. CSG Objects
  3. Light sources
  4. Spline Based Shapes like Prism Object
  5. Simple and Advanced texture options
  6. Radiosity
  7. While loops
  8. Animations
The emphasis has been on the detailed modelling of the scene as well as the lighting effects in the picture. I have tried to accomodate as much variety I could so as to the feel what all is Povray capable of. Most of the objects have been modelled with precise details. Animation has been used extensively to generate different frames of the image which display the scene under different lighting conditions.

The program has 2 parts:
  1. With radiosity settings disabled
  2. With radiosity settings enabled
Let us have a look at the still images obtained by the first part "radiosity settings disabled". The following image has been rendered using the following command on night_street_without_radiosity.pov (No animation).

povray night_street_without_radiosity.pov +W800 +H600

night_street_without_radiosity

Let us have a look at the still images obtained by the second part "radiosity settings enabled". The following image has been rendered using the following command on night_street_with_radiosity.pov (No animation).

QUITE A DIFFERENCE ...ISN'T IT !!!

povray night_street_with_radiosity.pov +W800 +H600

night_street_with_radiosity

I have also created an animation of the scene by making lighting changes with respect to time. A simple animation is created using the "clock" variable. The light in the scene is shown to grow as the animation advances making the picture more brighter and clearer as time proceeds. This has been implemented using
the following steps on night_street_without_radiosity.pov (without radiosity) and night_street_with_radiosity.pov (with radiosity) (Click Here to read the program):
  1. Copy the night_street_without_radiosity.ini (OR night_street_with_radiosity.ini) file to ini directory of Povray.
  2. Make sure your LIBRARY_PATH is set to that directory.
  3. Also see to it that the path to the input file specified in ".ini" file is night_street_without_radiosity.pov if you want radiosity disabled OR night_street_with_radiosity.pov if you want radiosity enabled
  4. Go to bin directory of POVRAY and type :

    ./povray ../Povray/povray-3.6/ini/night_street_with(OR without)_radiosity.ini

  5. On executing the command given below some .png files will be generated (20 for night_street_without_radiosity and 7 for night_street_with_radiosity)
  6. Use the following command to generate the .gif image from the above .png files
convert night_street_with_radiosity.png01 ...... night_street_with_radiosity.png07 night_street_with_radiosity.gif





OR

convert night_street_without_radiosity.png01 ...... night_street_without_radiosity.png20 night_street_without_radiosity.gif






P.S. :
  1. Running the animation with radiosity takes a lot of time (arnd 3 hrs for 7 frames) while time taken for generating the animation without radiosity is around 1 hour for 20 frames.
  2. Running the program for generating a .png image takes around 3-4 minutes for "without radiosity" while around 25 minutes for "with radiosity"


Resources used:

There is a lot of material available on the web. However, the best place to go to learn POV-Ray from scratch would be http://www.povray.org/documentation/. The tutorial available with the Povray download is also a very nice documentation to start with.

Other image files (Not relevant to assignment submission)
  1. My first attempt at generating an interesting image using povray (demo.pov)
  2. All other .png files generated when learning PovrayOther_Image_Files