|
Resources |
Main / P3-Written-Lighting-Texturing-key - CS559 2007Project 3 Written Assignment 1 - Lighting, Texturing and Projectiondue Monday, November 19th at 11:59pm Answer KeyThe answers to Questions 1 and 4 are wrong. I will update these at somepoint soon. 1. LightingA single polygon at the origin is viewed from above (0,10,0). A single point light source is placed at (10,10,0). The light has intensity 1, and the polygon has diffuse and specular reflectance of 1. The specular exponent is 5. ![]() For the 3 points on the polygon (0,0,0) (5,0,0) (10,0,0), compute the amount of specular and diffuse lighting. For point (0, 0, 0) 2. Texture Map CoordinatesConsider a square pyramid (the base of the pyramid is a square) as shown in the picture. Texture coordinates are given for each point. ![]() 2A: Sketch what this pyramid would look like if the 2x2 checkerboard (texture 1) is applied. answer: ![]() 2B: Suppose that you want to texture the pyramid with 4 horizontal stipes, but the only texture you had was the 4x4 checkerboard (Texture2). Give textue coordinates for the 5 vertices that would produce this. (note: every vertex only gets one texture coordinate). ![]() Tip of the pyramid gets (0.375,1) 2C: If mip-mapping is used, there are reasons why using the checkerboard texture might not be as good as using the more "obvious" texture (Texture3). Explain this. If you use a stripe from the checkerboard, mip-mapping might cause some of the neighboring stripes to blend in (since the mip-map area is always square), whereas the stripe texture wouldn't have that problem. 3. Getting triangles to hardwareTesselate the 3 squares (8 vertices) below. Make sure that your triangles are consistent. Also, choose the tesselation so that the fewest number of vertices can be drawn (using a triangle strip or fan). Your answer should give both the 6 triangles as well as how they would be drawn using OpenGL. ![]() using a triangle fan, here is an ok solution. 4. Projection MatricesThe reflection in a planar mirror can be created by placing the eye point on the other side of the mirror. If you draw the picture from the "virtual eyepoint" as if the mirror were a window, then you would create the image that you would see looking at the mirror from the real eyepoint. Suppose that the viewer is at 0,5,5, and that the XY plane (Z=0) is a mirror. Write the 4x4 projection matrix that would project points from their world space positions to where they would appear in the mirror. Make your projection place things totally on the wall (Z=0). (yes, you can use this as a hack to fake reflections, much like we use projection to create hack shadows. there's a slight catch in that you need to get the drawing order correct so occlusions work - but don't worry about it for this question.) the matrix below is wrong. i believe that the right answer reverses the orders of the rows and columsn (i.e. this matrix is right if your variables are orders wzyx), but I have not checked yet) the required matrix is: Advanced TexturingOK, this is just to make sure that you've done the required readings in the Real-Time Rendering Book (the Texture Readings.
tile
terrain texturing
handles non-uniform stretching better, less overblurring
a sphere
page 172 textbook |