CS 488: Assignment 4


Out: 11/11/03

Due: 12/02/03 at 2:00pm

This fourth assignment will be different than the previous three in that we will not be using OpenGL or doing interactive graphics on this one. This time we will be looking at more realistic looking, and time-consuming, rendering of a computer-generated scene.

There are many packages available to do high-quality renderings. One of the most popular ones is POV-Ray (http://www.povray.org/). One of the reasons its popular is that its powerful, another is that its available for most platforms, and the biggest perhaps is that it is freely available.

In this assignment we will create a 'desktop' version of assignment 3 - a movable mechanical model of the solar system made of wood, metal, etc - better known as an Orrery.

Since we do not have POV-Ray generally installed on the linux machines we have to do a couple things before we can use it.

Here is a link to a tar file called portablepov.tar. This contains the povray executable and a .ini file that tells this executable to look for all of the various support files in my ~ajohnson directory.

Here is a very small sample .pov file called tutorial.pov to get you started


To raytrace this scene, put tutorial.pov in the same directory with povray and povray.ini and type:

povray tutorial.pov

This will generate an image file called tutorial.png.

To view the png file on the linux machines you can use Gimp by typing:

gimp tutorial.png

which should look like this, except at 800x600 resolution. There are a variety of programs that can be used to view .png files on various platforms.

If you want to run POV-Ray on your own machine then you can download it from the site above. Just make sure that your .pov file runs on the version of povray on the CS Linux machines before you turn it in.

Once you've made sure you can run the program, the first place to start is with the simple tutorial at:

The orrery that you create will have the sun and all of the planets out to Saturn including the moons that are 1000km in radius or greater. This orrery will sit on a tabletop. I think the best photograph showing what you should create is the following.


You do not need to create as ornate a base. You can choose the materials for the various parts yourself, but they should be realistic (ie the rods should very likely be metal rather than granite.) You are expected to be creative here. The goal is to explore the program and see what kinds of effects you can create. Try different materials, try putting a clear dome on top of the orrery, figure out a nice way to do the rings of Saturn, try different lighting conditions.

Here are some pictures of other orries that may also give you some ideas:




Aside from the orrery the scene should contain some basic setting like a tabletop, maybe a simple lamp to light the scene.

You should be able to create everything using the basic shapes - spheres, boxes, cylinders. There are a bunch of pre-defined colours in the include/colors.inc file that may be helpful. There are a bunch of textures in the include/textures.inc file that may be helpful. However, aside from these, you should not use any other objects, textures, or pov files that you did not create yourself.

As this assignment is called Raytracking/Radiosity you will use be using both. You will create one .pov file that uses raytracing to render the scene and another .pov file containing most of the same elements that uses radiosity to render the scene. The sample file given above has sections commented out inside that change it from raytracing to radiosity. With the radiosity version you should have the sun of the orrery generate light; and you will probably need at least some other general light acting like the sky in the example so the sides away from the sun are also lit.

Turn in your two well commented .pov files and several image files of the raytraced scene and the radiosity scene at 800 by 600 resolution.

On the due date each person should also send me what you consider your single best image. I will place these on the web and the entire class will be able to vote for their favourite ones before the final exam, and the top 5 people will get bonus points.

I would suggest creating a fairly simple orrery first with the spheres in place and simple supports to hold everything up, starting with the sun earth and moon as in assignment 3, then you can try to get fancy. If you are curious about what is 'enough' then you can send me a current image and I can let you know what I think.

I would also highly recommend that you understand the code you are writing - you never know when you might need to reproduce it (hint hint).

note that the first version of this assignment had an error in how to use gimp to view the resulting .png file. This is now corrected above.