CS 5610/6610 – Spring 2016

Homework Assignment 2

Shader based CubeMapping (100 points)

Handed out: February 10, 2016
Due: 11:59pm, Wednesday February 24, 2016

 

You will write an OpenGL program which takes the scene (slightly modified) from Assignment 1 and does the following:

 

  1. Be sure to include the mouse rotation/translation/zooming from the first assignment.
  2. Make the sphere on top of the cube a combination of reflection and color (blended in the fragment shader).  Use keyboard or GUI to increase/decrease the contribution of reflection or color.
  3. Remove the walls so that you can have a skybox (just a floor and the cube/sphere as in the last assignment).
  4. Make a skybox with an environment map. You may use any skybox map you’d like such as: (Right, Left, Front, Back, Top, Bottom) or the superbible skybox map or any other you find on the web.  Make sure there are no seams!
  5. For the floor, make a checkerboard floor such that you need to use mipmapping (lots of small squares in the checkerboard.  Provide a keyboard or gui to turn using (2D/MipMap) linear/linear to linear/nearest,
  6. Place a totally reflective sphere near the cube and sphere in the room.  This should use the cubemap for reflection that is the same as the skybox environment map.
  7. Tatoo an image of your face on each of the cube’s faces. (hint: use appropriate S/T values to control your texture lookup in the fragment shader).
  8. Put in some method for moving the cube with a sphere on it around the scene.  Translation is fine.
  9. Put a billboard (point sprite) into the scene, your choice of billboarded texture.  Email the class mailing list if you need one.
  10. Document all of your user interface choices (keys or GUI and functionality)

 

CS 6610:

  1. For CS 6610 students, you must have a user interface that will update the environment map. That is, when the cube/sphere is moved, the environment map will capture the updated scene.  What is important is that you update it only when the GUI update key is pushed.  When the environment map is updated, use the rendered image rather than the skybox to cubemap the sphere.  It should contain the image of the checkerboard in the environment map.  Your skybox may or may not change but that’s OK.
  2. Include a reset key to go back to the original environment map.

 

Output

The program should draw its output to an OpenGL window of size 512x512 as in the example program.

 

Grading:

CS 5610:

10: Report

10: skybox (-5 if seams)

10: checkerboard floor

10: mipmapping on floor with controls

25: reflective sphere

10: face texture on cube

25: sphere on top of cube (environment map + control of blending)

100 points

 

CS 6610:

10: Report

10: skybox (-5 if seams)

10: checkerboard floor

10: mipmapping on floor

25: reflective sphere

10: face texture on cube

25: sphere on top of cube (environment map + control of blending)

25: environment map update

125 points, scaled to 100

125*0.8 = total number of points

 

Extra credit: If you add something but it just be documented