- Only accept answers submitted via git push to this course project for you at https://hconnect.hanyang.ac.kr (<Year>_<Course no.>_<Class code>/<Year>_<Course
no.>_<Student ID>.git).
- Place your files under the directory structure <Assignment name>/<your files> just like
the following example.
+ 2020_ITE0000_2019000001+ ClassAssignment1/ main.py report.docx |
- The submission time is determined not when the commit is made but when the git push
is made.
- Implement your own bvh file viewer.
- You have to implement all requirements in a single program. This assignment DOES NOT require each requirement to be a separate program
- The window size doesnt need to be (480, 480). Use the larger window that is enough to
see the details of the viewer.
- Requirements
- Manipulate the camera in the same way as in ClassAssignment1 using your
ClassAssignment1 code (10 pts).
- Also draw the reference grid plane.
- Load a bvh file and render it (80 pts)
- Open a bvh file by drag-and-drop to your bvh viewer window (10 pts)
- Google glfwSetDropCallback to see how to do it
- 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.
- This feature is essential for scoring your assignment, so if not implemented,
you wont get any score for Load a bvh file and render it (80 pts)
- Read the bvh file and render the skeleton (t-pose) of the motion when you load the file by drag-and-drop (30 pts).
- Do not automatically animate the character. Just draw its skeleton (t-pose) when
you open a file.
- Just draw joints with offsets between them only using the HIERARCHY section of
the bvh file.
- 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.
- Draw the skeleton by line segments. Each line segment should connect each pair
of parent-child joints.
- For end-effector joints such as foot, a line segmented should connect the end-
effector joint and the end site.
- An example screenshot for sample-walk.bvh
- Animate the loaded motion if you press the <spacebar> key (30 pts).
- 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.
- 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.
- After drawing the last frame, just replay the motion again (draw from the first
frame to the last frame again).
- Example screenshots for sample-walk.bvh
- When open a bvh file, print out the following information of the bvh file to stdout
(console) (10 pts)
- File name
- Number of frames
- FPS (which is 1/FrameTime)
- Number of joints (including root)
- List of all joint names
- Report (10 pts)
- Submit a report of at most 2 pages in docx file format (MS Word). Do not exceed the
limit.
- The report should include:
- Which requirements you implemented (5 pts) ii.A few screenshot images of your program with downloaded bvh files (5 pts)
- Download bvh files from the Internet and open them with your viewer. You may download bvh files from
- Choose some of the best looking screenshot images of your viewer.
- Do not use the sample bvh files for this requirement. You must use other bvh files downloaded from internet to get score for this requirement.
- You do not need to try to write a long report. Just write down the required information.
- Which requirements you implemented (5 pts) ii.A few screenshot images of your program with downloaded bvh files (5 pts)
Use either English or Korean.
- Extra credits (Only one of two items A, B will be reflected in the score)
- Use a box to draw each body part instead of a line segment (+10 pts).
- The boxes should be rendered with proper shading and lighting settings.
- If you render the body parts without lighting and shading, you cannot get the score
- Use a box to draw each body part instead of a line segment (+10 pts).
for this item.
- You can implement this requirement for only one of the sample bvh files provided.
- An example screenshot for sample-walk.bvh
- (You dont need to draw the shadow and shaded ground plane)
- Use different obj files to draw each body part instead of a line segment (+20 pts).
- The meshes should be rendered with proper shading and lighting settings.
- If you render the body parts without lighting and shading, you cannot get the score
for this item.
- You can implement this requirement for only one of the sample bvh files provided.
- Example screenshots (not for sample-walk.bvh)
- (You dont need to draw the shadow and shaded ground plane)
- Search and download cool obj files from the internet and use them.
- If you use simple obj files like box shapes, youll only get 10 pts.
- Runtime Environment
- Your program should be able to run on systems only with Python 3.7 or later, NumPy,
PyOpenGL, glfw. Do not use any other additional python modules.
- Only glfw is allowed for event processing and window & OpenGL context management. Do not use glut functions for this purpose.
- If your program does not meet this requirement, it will not run on TAs computer so
you will not get any score for this assignment (except report).
- Test your viewer with sample bvh files. sample-walk.bvh: A walking motion file
- sample-spin.bvh: A walking while spinning around a vertical axis
- What you have to submit:
- .py files
- You can use multiple .py files for this assignment. In this case, explain how to run the
- .py files
program in the report.
- .docx report file
- Additional information
- drop_callback in glfw python binding is slightly different from that of original glfw written in C. drop_callback in python takes only two parameters, window and paths. paths is a list
of dropped file paths.
- Python provides powerful string methods helpful for parsing a bvh file. Among them, split() will be most useful.
Reviews
There are no reviews yet.