IDE Setup for CS 4620 Ray Tracer

Setup a project in Eclipse

  1. Download the Ray Tracer framework from CMS and unzip.
  2. In Eclipse, Go to File->New->Project...
  3. Select "Java Project" and hit Next.
  4. Give your project a name. "CS4620 Ray" or whatever you like.
  5. Choose "Create project from existing source"
  6. Enter the directory "A4fmwk." If you enter a wrong directory, the java files may not appear in the correct package.
        A4fmwk/  <--- eclipse project root points here
    ray/
    TEST_A/
    TEST_B/
    TEST_EXTRA/
  7. Hit Finish.

Coding

We have divided the assignment into two parts A and B. We recommend you finish part A before proceed to part B. To see all TODO's in part A or B.
  1. Select "Search" -> "File Search"
  2. Type "TODO(A)" or "TODO(B)" in the search box, and go!
OR
  1. Select "Window" -> "Show View" -> "Tasks"

Run and Test

We have included all the test scenes and everything you need in the framework zip file. If you correctly setup the project, you should have 3 test folders, TEST_A, TEST_B, TEST_EXTRA.

To render images,

  1. Right click on RayTracer.java file in Package Explorer, and choose Run As-> Run Configurations...
  2. Choose the Arguments tab. In the "Program Arguments" box, type the names of XML scene files as its arguments (e.g. "TEST_A/four-spheres.xml"). It will render to a PNG file of the same name, but with a ".png" extension. You can input multiple XMLs by separating each file by a single space.
  3. Once you have set the argument, simply run.

To render all images in a particular folder,

  1. Go back to the Arguments tab in Run Configurations....
  2. Use the folder's path (e.g. "TEST_A" or "TEST_A/") as the "Program Arguments."
  3. Run.
This will be particularly useful when you want to test your part A or B. TEST_A contains all the test scenes you should pass before you proceed to part B. When you finish the assignment, test your ray tracer against TEST_B as well as TEST_A. TEST_EXTRA contains test scenes for glass and texture shaders. You can ignore TEST_EXTRA if you do not implement the extra shaders.