Interactive Computer Graphics - Assignment 9
This assignment involves writing two programs.
Both involve modifying your
HW6 program, which should only support the Phong shading algorithm and the
one set of material properties that produces a specular highlight.
Do NOT use any example code from the lecture slides and/or book to generate
your texture maps.
- In the first program you will modify your HW6 program by
placing an image-based texture map on a Bezier patch.
- Instead of reading in an SMF file, generate a 12x12 triangle mesh
from the Bezier patch description.
- You can either procedurally generate 2D RGB image data or read in an image from a file.
- One image should be texture mapped over the whole patch.
- The 2D texture RGB color should be applied to the patch in the
fragment shader by replacing the previously constant diffuse color
during Phong shading.
- The texture coordinates associated with the mesh vertices should be the same as the (u,v) coordinates use to generate the vertex position.
- The second program will extend your HW6 program with 3D
- Calculate an "interesting" (not just a
checkerboard or simple stripes or a 3D extension of a 2D map) 3D
texture that is applied to an smf model in your fragment shader as part
of the Phong shading algorithm.
- Incorporate the texture data (an RGB color computed from (X,Y,Z) values in world coordinates) into the Phong shading
model as its diffuse color in your fragmenmt shader.
- 2D image-based texture mapping: 4 points
- 3D procedural texture mapping: 4 points
- Generated interesting texture maps: 1 point
- HW6 features correct: 1 point
Last modified March 22, 2017.