Difference between revisions of "CISC440 S2023 HW4"
(→Required elements) |
(→Graduate students only) |
||
Line 21: | Line 21: | ||
==Graduate students only== | ==Graduate students only== | ||
− | Model and texture an additional object in Blender and put it in the "scene" with your first object such that the camera path and aiming is broken into three phases: (1) Show the two objects as a group, (2) Focus on the first object, and (3) Focus on the additional object. | + | Model and texture an additional object in Blender and put it in the "scene" with your first object in your OpenGL program such that the camera path and aiming is broken into three phases: (1) Show the two objects as a group, (2) Focus on the first object, and (3) Focus on the additional object. |
For phases (2) and (3), the other object may appear in the background but it should never occlude the "featured" object, and the featured object should be considerably closer to the camera than during phase (1). | For phases (2) and (3), the other object may appear in the background but it should never occlude the "featured" object, and the featured object should be considerably closer to the camera than during phase (1). | ||
You will need to change not only the <tt>eye</tt> parameter of your <tt>lookat()</tt> transform as the camera moves through these phases, but the | You will need to change not only the <tt>eye</tt> parameter of your <tt>lookat()</tt> transform as the camera moves through these phases, but the |
Revision as of 11:11, 20 April 2023
Due Friday, April 28
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
- 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 apple created in this tutorial or the cube manipulations here [4 points]
- Apply at least one texture to the object either through wrapping or painting [2 points] 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
- 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. [2 points]
- The camera path should not just be followed but also drawn completely as a continuous curve (i.e., connected line segments) [1 point]. 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. [2 points]
- 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 [0.5 points]
- The 'p' key should toggle pause/play in the animation. In pause mode the camera should not move [0.5 points]
No particular template code is provided, but you may want to start from Tutorial 7: Model Loading. Submit your C++ code, the textured .obj and texture image .bmp or .DDS that you created (as well as your Blender .blend file), and a short text description of how you created it.
Graduate students only
Model and texture an additional object in Blender and put it in the "scene" with your first object in your OpenGL program such that the camera path and aiming is broken into three phases: (1) Show the two objects as a group, (2) Focus on the first object, and (3) Focus on the additional object. For phases (2) and (3), the other object may appear in the background but it should never occlude the "featured" object, and the featured object should be considerably closer to the camera than during phase (1). You will need to change not only the eye parameter of your lookat() transform as the camera moves through these phases, but the center parameter should change for each phase.
The additional object should be more complex than the first. It should have multiple parts, be in a different style from the first one (i.e., curvy vs. flat surfaces/sharp angles or vice-versa), and painted or wrapped with a completely different texture.