• PA05 Normal Mapping is due on Nov 29, 2016, 11:59pm
  • This assignment will help you deepen the understanding of the following topics
    • OpenGL pipeline
    • OpenGL shading language
    • Basic Lighting (Diffusion, Specular, Ambient, directional light, point light, spot light, etc)
    • Texture mapping
    • Normal mapping
    • Tangent-space coordinate
  • Code: cs451-PA05.7z
  • Code: cs451-PA05-solution.7z (same password as before)
  • What to submit
    • Your code (with everything)
    • All images that you created. Make sure that you name your images as follows
      • Texture color map (cs451_pa05_color.jpg)
      • Normal map (cs451_pa05_normal.jpg)
      • Image rendered with color map (cs451_pa05_texture.jpg)
      • Image rendered with normal map + color map (cs451_pa05_bump.jpg)
    • README.txt file in cs451-PA05 folder with the following information
      • The OS and compiler that you compile your code
      • How to build your program
      • Tasks that you completed
      • Tasks that you started but did not complete
      • Tasks that you did not start
      • What are the known bugs in your code?
  • How to submit
    • Submit all source code and README.txt in a file named cs451_pa05_[your last name].zip on Blackboard
  • A very simple GLSL cheat sheet

Tasks


Examples

  • I took an image of a towel of mine and used CrazyBump to generate normal and displacement maps (from left to right):
  • To run your code with only spotlight shading:
    • > normalmap ./models/essai.obj
  • To run your code with texture mapping and spotlight shading:
    • > normalmap -texture ./textures/towel_texture.jpg ./models/essai.obj
  • To run your code with normal mapping+texture mapping+spotlight shading:
    • > normalmap -texture ./textures/towel_texture.jpg -normalmap ./textures/towel_NRM.jpg ./models/essai.obj
  • The following image shows the per-vertex tangent space coordinates
  • When something went wrong, it's likely that you will see this: