This assignment is not compulsory

Sometimes it is necessary to produce more realistic images, containing shadow, reflection and refraction. The systems we have looked at so far, have no (direct) support for such effects. One system that can produce striking images is POV-Ray (which uses ray tracing) and I have installed it on the student system.

To run it you should first copy some init-files. This should be done once.

cp -r /chalmers/users/thomas/VIS/povray/.povray .         Note the dot

Then set the path:

If you are using tcsh:
set path = ( $path /chalmers/users/thomas/VIS/povray/bin )

If you are using bash:
export PATH=$PATH:/chalmers/users/thomas/VIS/povray/bin

To run POV-Ray you need a description of a scene, that contains the geometry of objects, light sources etc. There are many scene-files available. Look in /chalmers/users/thomas/VIS/povray/share/povray-3.6/scenes/
To minimize the amount of typing (or cutting and pasting) I suggest that you create a soft link to this directory:

ln -s /chalmers/users/thomas/VIS/povray/share/povray-3.6/scenes scenes

ls scenes
will show you the directories containing scenes.

Let us start with a scene from the advanced directory, the file scenes/advanced/biscuit.pov. If we look at the file (it is an ordinary text file) we can understand some parts of the description. In the beginning of the file there are the two lines:

// +w320 +h240
// +w800 +h600 +a0.3 +am2

giving suitable parameters to the POV-Ray-program, +w gives the width (in pixels) and +h the height. Let us start with the first set.

povray +w320 +h240 scenes/advanced/biscuit.pov

If everything works, there should be some printout in the terminal window and we should get a new window where we can see the scene being rendered. When the image is complete, the new window disappears, but the image is stored in biscuit.png . We can look at the image by typing xv biscuit.png for example. To make an image of higher quality we increase w and h; the runs requires some two minutes, but the result is worth waiting for. Note, for example, the shadows and the refraction in the glass jar.

If you do not want to wait, I have stored the image. Type:    xv /chalmers/users/thomas/VIS/povray/biscuit.png
Another nice images is: xv /chalmers/users/thomas/VIS/povray/woodbox.png

Here is a small version of the image:


The learn a lot about POV-Ray, there is a manual page,
and a doc-directory:
These pages are also available from the POV-Ray homepage

A web-page, with stunning ray traced images, is the Internet Raytracing Competition.