CS 6620 - Fall 2012 - Ray Tracing for Graphics

Project 4 - Triangular Meshes

In this project we add plane and triangular mesh object types to our ray tracer.

Requirements

XML Scene Format

We have a minor addition to the XML scene format to support new object types: plane and triangular meshes. The plane object is a square with 2 unit lengh edges. It is placed at the origin and the plane normal is aligned with the positive z-axis in object coordinates. The triangular mesh is specified in an external OBJ file. The name of the object is the filename of the OBJ file, which should be placed in the same folder as the scene XML file.

<!-- Plane -->
<object type="plane" name="square_plane" material="mtl1">
	<!-- Transformations -->
</object>

<!-- Triangular mesh from an external OBJ file -->
<object type="obj" name="teapot.obj" material="mtl1">
	<!-- Transformations -->
</object>

You can use this test scene to verify that your implementation is correct. You will also need the teapot.obj file that is referenced in the scene XML file. You can also use the low resolution teapot and plane files for development and debugging.

Resources

Here is an updated header file that includes classes for keeping the new scene definition in the memory. Here is an example implementation of the XML parser using TinyXML. You can use the triangular mesh class (cyTriMesh) for loading OBJ files. You are free (but not obligated) to make use of these files.

Student Project Pages



_