Interactive Computer Graphics - Assignment 8
Texture Mapping
Topics:
This assignment involves writing two programs.
They involve modifying and extending your HW6 and HW7 programs, which only\
needs to support perspective projection, the Phong shading algorithm and the
one set of material properties that produces a specular highlight.
- In the first program you will modify your HW7 program by
placing an image-based texture map on a Bezier patch.
- Generate a 12x12 triangle mesh from the Bezier patch description.
- You should read your texture from an image file, but be sure to
include the file with your submission.
- Compute averaged surface normals, similar to HW6. Do not flat shade the patch.
- 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.
You will need to send the diffuse light color
instead of the diffuseProduct from the application to the shaders.
- The texture coordinates associated with the mesh vertices should be the same as the (u,v) coordinates used to generate the vertex position.
- The second program will extend your HW6 program with 3D
procedural texturing.
- Calculate an "interesting" (not just a
checkerboard or simple stripes or a 3D extension of a 2D map)
procedural 3D texture in the fragment shader that is applied to
a solid smf model as part of the Phong shading algorithm.
- Incorporate the texture data (an RGB color computed from (X,Y,Z) values in world/model coordinates) into the Phong shading
model as its diffuse color in your fragment shader.
Your first program should look something like this video.
Your second program should look something like this video.
Grading Scheme
- 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 16, 2024.