Starting from:

$25

Computer Graphics-Assignment 3 Bvh Viewer Solved

1.     Implement your own bvh file viewer.

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.

 

2.     Requirements 

A.     Manipulate the camera in the same way as in ClassAssignment1 using your 

ClassAssignment1 code . 

i.         Also draw the reference grid plane.

 

B.      Load a bvh file and render it 

i.         Open a bvh file by drag-and-drop to your bvh viewer window  

1.     Google glfwSetDropCallback to see how to do it

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

only render the new bvh file B.

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

you won’t get any score for “Load a bvh file and render it (80 pts)” 

ii.          Read the bvh file and render the “skeleton” (t-pose) of the motion when you load the file by drag-and-drop .

1.     Do not automatically animate the character. Just draw its skeleton (t-pose) when

you open a file.

2.     Just draw joints with offsets between them only using the HIERARCHY section of

the bvh file.

3.     In other words, draw a pose of the motion with zero translation (0,0,0) and no rotation (identity matrix) being applied to transitional joints and rotational joints,

respectively.

4.     Draw the skeleton by line segments. Each line segment should connect each pair

of parent-child joints.

5.     For end-effector joints such as foot, a line segmented should connect the end-

effector joint and the “end site”.

6.     An example screenshot for sample-walk.bvh

                                  A.    

iii.         Animate the loaded motion if you press the <spacebar key .

1.     As time goes by, draw each pose of the motion using each line of frame data in

the MOTION of the bvh file, from the start frame to the end frame.

2.     Calling glfw.swap_interval(1) in your main function, then just drawing the pose of each frame for each iteration of the main loop (the while loop in the main function)

would be enough for timing of rendering each pose.

3.     After drawing the last frame, just replay the motion again (draw from the first

frame to the last frame again).

4.     Example screenshots for sample-walk.bvh

  

iv.         When open a bvh file, print out the following information of the bvh file to stdout

(console)  

1.     File name

2.     Number of frames

3.     FPS (which is 1/FrameTime)

4.     Number of joints (including root)

5.     List of all joint names

More products