Difference between revisions of "CISC440 F2019 HW4"

From class_wiki
Jump to: navigation, search
(Created page with "''Due Monday, November 11'' ==Description== In this assignment you will create and texture an object (loosely defined) in Blender, then display it in an OpenGL program whic...")
 
(Graduate students only)
 
(7 intermediate revisions by the same user not shown)
Line 7: Line 7:
 
==Required elements==
 
==Required elements==
  
* In Blender, create and texture an object and export it as an .obj that is loadable by your OpenGL program
+
* In Blender, create and texture an object and export it as an .obj that is loadable by your OpenGL program [5 points]
** The object may not be a default mesh in Blender such as a plane, monkey, cylinder, or sphere.  Rather, it should be an edited version such as the [https://www.youtube.com/watch?v=iEVAGnR2GRQ apple created in this tutorial]
+
** The object may not be a default mesh in Blender such as a plane, monkey, cylinder, or sphere.  Rather, it should be an edited version such as the [https://www.youtube.com/watch?v=iEVAGnR2GRQ apple created in this tutorial] or the [https://www.youtube.com/watch?v=rBffAMQh1Qc cube manipulations here]
** Apply at least one texture to the object either through wrapping or painting and save the resulting .obj
+
** Apply at least one texture to the object either through [https://www.youtube.com/watch?v=6F5M0ZuL-eg wrapping] or [https://www.youtube.com/watch?v=JX-UwgKaPsA painting] and save the resulting .obj
* In your C++ OpenGL program, load the .obj and animate a camera path that shows it from different angles and distances, calling glm::lookat() to recompute the view matrix at every step.  
+
* In your C++ OpenGL program, load the .obj and animate a camera path that shows it from different angles and distances, calling glm::lookat() to recompute the view matrix at every step  [7 points]
** Your camera path should be created from a Catmull-Rom cubic spline.  All control points should be chosen by you and hard-coded your program as an array of 3-D positions.
+
** Your camera path should be created from a Catmull-Rom cubic spline.  All control points should be chosen by you and hard-coded your program as an array of at least 25 3-D positions.
 +
** The camera path should be displayed initially as a continuous curve (i.e., connected line segments).  So it should be computed outside of your animation loop
 +
** The camera position (i.e., the view matrix) should be updated with each pass through the animation loop and the scene redrawn from the new location.  Your up vector may remain constant, and your center point (where the camera is looking) may either be fixed to the centroid of the object that you loaded, or it can be updated to "look ahead" of the camera for an architectural walk-through or roller coaster scenario.
 +
** The camera path does not need to be a loop.  Regardless, when the last position is reached, the animation should automatically start over at the first position
 +
** The 'p' key should toggle pause/play in the animation.  In pause mode the camera should not move
  
Submit your C++ code, the .obj you created, and text description of how you created it.
+
No particular template code is provided, but you may want to start from [http://www.opengl-tutorial.org/beginners-tutorials/tutorial-7-model-loading/ Tutorial 7: Model Loading].  Submit your C++ code, the textured .obj you created, and a short text description of how you created it.
  
 
==Graduate students only==
 
==Graduate students only==
 +
 +
* Add a square textured "floor" to your scene which animates a morph between two face images.  You should use the mesh-warping algorithm introduced in class and described in further detail in Section 2.1 of [http://citeseerx.ist.psu.edu/viewdoc/download?doi=10.1.1.7.9782&rep=rep1&type=pdf Wolberg, "Recent Advances in Image Morphing", 2003]. 
 +
* The 'f' key should toggle between whatever center point you are using for glm::lookat() during the normal camera animation, and looking at the center of the morph square (even as the camera continues to move)
 +
* The morph should take about 5 seconds to complete and then repeat
 +
* EDITED ON NOV. 6: The face images can have any names, and it is up to you to determine the matching points in the meshes so that the morph looks as good as possible.  The paper appears to use 7 x 7 meshes, so please do the same

Latest revision as of 14:36, 6 November 2019

Due Monday, November 11

Description

In this assignment you will create and texture an object (loosely defined) in Blender, then display it in an OpenGL program which animates camera motion along a Catmull-Rom spline.

Required elements

  • In Blender, create and texture an object and export it as an .obj that is loadable by your OpenGL program [5 points]
  • In your C++ OpenGL program, load the .obj and animate a camera path that shows it from different angles and distances, calling glm::lookat() to recompute the view matrix at every step [7 points]
    • Your camera path should be created from a Catmull-Rom cubic spline. All control points should be chosen by you and hard-coded your program as an array of at least 25 3-D positions.
    • The camera path should be displayed initially as a continuous curve (i.e., connected line segments). So it should be computed outside of your animation loop
    • The camera position (i.e., the view matrix) should be updated with each pass through the animation loop and the scene redrawn from the new location. Your up vector may remain constant, and your center point (where the camera is looking) may either be fixed to the centroid of the object that you loaded, or it can be updated to "look ahead" of the camera for an architectural walk-through or roller coaster scenario.
    • The camera path does not need to be a loop. Regardless, when the last position is reached, the animation should automatically start over at the first position
    • The 'p' key should toggle pause/play in the animation. In pause mode the camera should not move

No particular template code is provided, but you may want to start from Tutorial 7: Model Loading. Submit your C++ code, the textured .obj you created, and a short text description of how you created it.

Graduate students only

  • Add a square textured "floor" to your scene which animates a morph between two face images. You should use the mesh-warping algorithm introduced in class and described in further detail in Section 2.1 of Wolberg, "Recent Advances in Image Morphing", 2003.
  • The 'f' key should toggle between whatever center point you are using for glm::lookat() during the normal camera animation, and looking at the center of the morph square (even as the camera continues to move)
  • The morph should take about 5 seconds to complete and then repeat
  • EDITED ON NOV. 6: The face images can have any names, and it is up to you to determine the matching points in the meshes so that the morph looks as good as possible. The paper appears to use 7 x 7 meshes, so please do the same