• PA4 Relief Mapping is due on Oct 23, 2014, 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, paralax mapping, relief mapping)
  • Code: cs451-PA4.7z Δ
  • 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_pa4_color.jpg)
      • Normal map (cs451_pa4_normal.jpg)
      • Displacement map (height field) (cs451_pa4_height.jpg)
      • Image rendered with color map (cs451_pa4_texture.jpg)
      • Image rendered with normal map + color map (cs451_pa4_bump.jpg)
      • Image rendered with relief map + normal map + color map (cs451_pa4_relief.jpg)
    • README.txt file in cs451-PA4 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
    • email me (jmlien@cs.gmu.edu) and your TA (ple13@masonlive.gmu.edu) a link to all source code and README.txt in a file named cs451_pa4_[your last name].zip
    • Please do not send us the file directly
  • 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:
    • > reliefmap ./models/essai.obj
  • To run your code with texture mapping and spotlight shading:
    • > reliefmap -texture ./textures/towel_texture.jpg ./models/essai.obj
  • To run your code with normal mapping+texture mapping+spotlight shading:
    • > reliefmap -texture ./textures/towel_texture.jpg -normalmap ./textures/towel_NRM.jpg ./models/essai.obj
  • The following image shows the per-vertex tangent space coordinates
  • To run your code with relief mapping+texture mapping+spotlight shading:
    • > reliefmap -texture ./textures/gmu-logo.jpg -normalmap ./textures/normalmap.jpg -reliefmap ./textures/displacement.jpg /models/essai.obj
  • When something went wrong, it's likely that you will see this: