CSCI 250 Computer Graphics

First Rendering Project

File Format Parsing & Rendering

 

Date Due:  18 April 2014

 

This assignment will lay the groundwork for your raytracer.  In this assignment, you will write a program that reads in a graphics scene description file and stores the data in appropriate data structures for rendering.  You will then use some simple OpenGL commands to render the objects that you have read from the file.  When you write your raytracer, you will reuse your parser and the data structures to read the same data files.  However you will replace your OpenGL rendering from this project with your raytracing code.

 

The file format we will be using is a combination of the NFF (Neutral File Format) developed to benchmark raytracers in a reasonably independent fashion, and the Wavefront .obj file format, developed for use with the Wavefront modeler.  We will take the best of each format and come up with our own scene description language.  The file format we will be using is described in this document.

 

To get you started with 3D rendering using OpenGL, here is a simple program that assumes you have read in a world of two spheres a plane, and three different colored lights, and renders that world from a specific point of view.

 

Also, you need some data files to use for testing, so here are several:  balls1.data, balls2.data, balls3.data, balls5.txt, chapel.data, cow.data, gears1.data, gears2.data, mount1.data, mount2.data, mount3.data, shells1.data, shells2.data, sombrero1.data, sombrero2.data, teapot2.data, teapot3.data, tetra1.data, tetra2.data, tetra3.data, tetra5.txt, tetra7.txt, tetra11.txt.  To get a general idea of how some of these objects should look, here are some images (with more polygons, spheres, etc, than in the above data sets): balls, gears, mount, teapot, tetra.