Starting from:

$25

CSE4020 - Computer Graphics Assignment 2 - Obj viewer & drawing a hierarchical model  - Solved

1.     Implement your own obj file viewer 1) showing a single loaded obj mesh and 2) showing an animation of a hierarchical model consisting of loaded obj meshes. The multiple light sources should be used for rendering.

A.     You have to implement all requirements in a single program. This assignment DOES NOT require each requirement to be a separate program.

B.       The window size doesn't need to be (480, 480). Use the larger window that is enough to see the details of the viewer.

C.        Your program should run in two modes ė ęVLQJOHPHVKUHQGHULQJPRGHĚDQGęDQLPDWLQJ KLHUDUFKLFDOPRGHOUHQGHULQJPRGHĚ

D.      DO NOT set the window title

E.      Total points: 150 pts (+20 pts for extra credits)

 

2.     Requirements 

A.       Manipulate the camera in the same way as in ClassAssignment1 using your ClassAssignment1 code (10 pts). 

i.          Also draw the reference grid plane.

 

B.      Single mesh rendering mode (50 pts) 

i.           When a user does a drag-and-drop action on your viewer, your program should run in ĜUKPINGOGUJTGPFGTKPIOQFGĝ.

ii.         Open an obj file by drag-and-drop to your obj viewer window.  

1.      Google glfwSetDropCallback to see how to do it.

2.      The viewer should render only one obj file at a time. If an obj file B is drag-anddropped to the viewer while it is rendering another obj file A, the viewer should only render the new obj file B.

3.      This feature is essential for scoring your assignment, so if not implemented, 

 [QWYQPğVIGVCP[UEQTGHQTĜSingle mesh rendering mode (50 pts)ĝ. v  in

  Itsiii. Read the obj file and display the mesh only using vertex positions, vertex normals, faces information (40 pts)

직접사성할것 .

1.      Ignore texture coordinate, material, group, shading information. In other words, ignore vt, mtllib, usemtl, o, s tags.

2.       Use glDrawArrays() or glDrawElements() to render triangle meshes.

A.     DO NOT use glVertex*() & glNormal*(). If you draw meshes using glVertex*() & glNormal*(), you'll get only 10 pts out of 40 pts.

             ✗iv.     When open an obj file, print out the following information of the obj file to stdout

(console) (10 pts)

1.      File name

2.      Total number of faces

3.      Number of faces with 3 vertices

4.      Number of faces with 4 vertices

5.      Number of faces with more than 4 vertices

 

C.       Animating hierarchical model rendering mode (50 pts)

i.            The content of this requirement will be covered in the next lecture (8 - Hierarchical Modeling). 

ii.            When a user presses CMG[ĞJğ on your viewer, your program should run in Ĝanimating hierarchical model rendering modeĝ. iii. The model should consist of at least 3 different meshes loaded from 3 different downloaded obj files (10 pts).

2.      Download cool public obj files from the Internet and use them. For example,

A.     https://free3d.com/  

B.      https://www.cgtrader.com/free-3d-models   

:
 iv. Do not use the provided sample obj files for this requirement. You must use other obj files downloaded from internet to get score for this requirement. Otherwise, [QWğNN get -20 pts for this requirement. 

v.            You should use OpenGL matrix stack to draw and animate your hierarchical model. (10 pts).

vi.          The model should have a hierarchy of at least 3 levels (10 pts).

1. For example, the following model has a hierarchy of 4 levels.

 A0
 

                vii.      Animate the model to show the hierarchical structure (20 pts).

  ✗1. Make all child body parts move relative to their own parent body part. 

A.     In the above example, part 2, 3, 4, 5, 6 should move relative to part 1, part 7

VKRXOGPRYHUHODWLYHWRSDUWSDUWVKRXOGPRYHUHODWLYHWRSDUWđDQG so on.

B.       If any of the child bodies does not move relative to its parent, you will get -10 pts. 

2. You can make any hierarchical system freely. Be creative.

 A. Eg) a hand with fingers bending  

✗ B. Eg) a runner with arms and legs swing

 3. The model should be automatically animated without any mouse or keyboard inputs. 걍 h누르고안에움직이게

 

  1)D. Lighting & Etc (20 pts) 

색다르게
i.          Use multiple light sources (not a single light) to better visualize the meshes (10 pts).

1.      Choose the number of light sources, light source types, light colors, material colors as you want.

ii.           Toggle wireframe / solid mode by pressing Ğ\ğ key (similar to pressing ě]Ĝ key in Blender) (10 pts).

1.       glPolygonMode( GL_FRONT_AND_BACK, GL_LINE ) # call this at the beginning of your render function to draw in wireframe mode.

More products