Samuel Wang I. Design The texturing was easily added to the primitive.material() interface designed for project 2. This function returns all of the material properties of a primitive at a particular point. For example, in triangles a barycentric calculation was used to determine the s, t, texture coordinates at a given point in the triangle. The interpolated s, and t values were then used to select the appropriate texels from the texture map. A bilinear filter was used to blend texels to produce a pixel color. The s, and t ({0 to 1, 0 to 1} space )coordinates were transformed to u, and v ({0 to texture.width, 0 to texture.height} space ) coordinates. In general, the texture coordinates had some fractional distance between texels in both u and v directions. Thus, 4 nearest texels were selected and blended linearly in 2 dimensions using the fractional bits as the blending factor. Specular color modulation was implemented by using a second texture map. The first texture map was used to determine the r, g, b diffuse colors. The red channel of the second texture map was used to select the specular color of the primitive from 2 possible object materials (These materials are loaded in the usual manner). II Images One rendered image demonstrating all required elements is provided. The author did not have consistant access to the SGI platform, and all associated modeling tools. The entire scene geometry was hand designed and hard coded into the program. Not that all objects appear to be at right angles to each other in the scene. This was done to preserve the author's sanity. Note that a trivial modification would allow an appropriately designed scene to be loaded in from file. The image was sampled at 800 x 800 resolution. The hard coded geometry rendered quickly, so an adaptive supersampling scheme was not implemented. The soft appearance of the image is due to the bilinear texture filtering. A. Pop Tart Box The pop tart box was the first textured object that was constructed. This object consists of 12 triangles and 6 associated texture maps for the rectangle faces. The texture maps were scanned from some refuse left in the author's apartment. This object demonstrates the basic texturing functionality. B. Sphere The sphere demonstrates the required texture mapping onto a sphere element. The custom Earth texture was obtained from http://www.fourmilab.ch/cgi-bin/uncgi/Earth. The basic formula from page 48 of Glassner's "An Introduction to Ray Tracing" was used. C. Floor The floor consists of 2 large triangles mapped with a procedurally generated texture. The floor demonstrates the texture wrapping functionality. Note that the generated texture was a 2 x 2 checker. The floor also demonstrates the effects of the bilinear filter. Zooming in on the checker borders shows the blending between blue and white. The checker pattern was originally selected to produce some Moire pattern artifacts. However, the author did not have time to finish his MIP mapping / Trilinear filtering extension. D. Game CD The CD was modeled with 12 triangles, diffuse color textures, and 1 specular color texture. The CD demonstrates the modulation of specular color using textures. Note that the "Sam Wang" name label does not reflect the color of the Pop Tart Box. Also note that the black binding on the left hand side of the CD jewel case also does not reflect the Pop Tart's specular color. These elements were NOT modeled using geometry. The CD case does consist of only 12 triangles, (2 for each box face). The red channel of the specular color map was used to select between the specular of colors of different object materials ( 2 materials in this case ). The green and blue channels are left free for future extensions. The specular color texture map for the label and CD binding was constructed by hand from the diffuse texture using Paint Shop Pro.