Project 5


Project description, v. 3 (old v. 2) (old v.1)

Test input files

The following files will be used for grading; you should turn in a rendering of each one (using the camera and lights stored in the file) in your batch of images. Generally, if your program is missing some features you should make sure that they result in missing geometry rather than crashes, so that you cah hand in a picture that includes most of the scene.

shadows.xml: This scene tests shadows, using just spheres.

reflection.xml: This scene tests reflection and Phong shading, using just spheres.

columns.xml: This scene tests all the primitive types, though it does not stress the triangle mesh implementation, and it also uses groups.

The following triangle meshes are nicer versions of the meshes we provided for the last assignment. Their smaller size and more convenient position and scale may help make your last-minute debugging easier. These meshes are also better behaved than the low-res bunny mesh that many people have been using from the last assignment.

The simplifications were done using Michael Garland's qslim package, which simplifies meshes using edge collapse operations (many, many edge collapse operations).

Ray tracing acceleration code

We are providing an acceleration structure for you to plug into your ray tracer, which will make it practical to ray trace triangle meshes. The interface is very simple and is documented in comments in the java files.

cs418-rtaccel-v3.jar (old v. 2)

This version contains the classes that interface with your code, a trivial implementation of the base class that does not actually accelerate at all, and an implementation that uses a kd-tree to do the acceleration. The trivial implementation may be useful for testing, but the two are entirely interchangeable.

Please direct any questions, concerns, or bugs to the cs417staff mailing list.


Sample image loading/saving/manipulating code

We are posting a simple image manipulation program (with source code). You may look through it and cut and paste from it in order to do your image saving and image loading (for those of you doing texture mapping). Run it like this:
java -cp imagemanip.jar cs418.ImageManipulator
When saving your images, please be sure to save in PNG format (it can be viewed by most programs and is not lossy).

New version of parser

We are releasing a new version of the parser. This fixes the problem of not being able to load/save generalized cylinders. If you happen to be generating XML files by hand, there is still a minor problem in the parser you should be aware of. Boolean properties of objects can only be specified as XML attributes, not elements. This means that the following will work:
<generalizedcylinder radialClosed="true">
...
</generalizedcylinder>
but this will NOT work:
<generalizedcylinder>
  <radialClosed>
    true
  </radialClosed>
  ...
</generalizedcylinder>

Again, this should only affect you if you are writing XML files by hand, since the saving code will save boolean properties as attributes by default.

Submission Instructions

The submission procedure is similar to that used for Project 1. However, this time there will be point penalties for not following the procedure.
Your project must have the following file structure:
cs418/*/*.java
cs418/*/*.class
cs418/Main.class
That is, a cs418 directory with subdirectories beneath it. Each java file must have a corresponding class file within the same directory. In addition, you must have a cs418.Main class. This is the class we will be calling in order to run your project. If you want, you can just have this class call your real main method somewhere else in your project (this is probably a good idea, since you will have different entry points into your project as the project evolves over the semester). You will create a submission.jar file as you did for the last project, by first changing into the directory above the cs418 subdirectory and executing
jar cvf submission.jar cs418
You will then submit this file using the web interface. You may submit multiple times, but only the last submission counts. We will be using the following command to run and grade your project:
java -cp submission.jar;gl4java.jar;vecmath.jar;parser.jar cs418.Main
Try running this at least a couple of hours before the submission deadline. If this does not start up your project, you will lose a significant number of points on your assignment. We will have gl4java.jar, vecmath.jar, and parser.jar, so there is no need to submit these. Also, the gl4java dll will be in our PATH.