Description

As a tennis player, I know the strokes are very technical. In my opinion, the serve is the hardest one to learn. For my final project, I animated a tennis serve with hierarchical modeling so that users can observe and learn about the correct form.

Serena Williams Service Motion Reference

Controls

Graphics Features

Hierarchical Modeling

The main focus of my project was to hierarchically model the dummy to simulate a tennis service motion. First, I identified the index numbers of each body part from the dummy object mesh. Then, I set up pivot points so that the dummy's body parts would rotate around major joints (Ex: shoulders, elbows, wrists, hips, knees, ankles). Finally, I figured out how each part animated in relation to one another to create the service motion.






Blinn-Phong Lighting

For my lighting, I used a directional light source to emulate the sun. In my fragment shader, I utilized the Blinn-Phong lighting model and calculated the half-vector so that I would not have to compute the reflection vector.

Camera Control

With WASD keys and mouse scrolling, users are free to move and look around the tennis court scene. For these capabilities, I implemented pitch and yaw camera controls and updated the variables (eye, LA Point, up vector) given to the LookAt function.

Collision Detection

I incorporated basic ball-plane collision detection. Using geometry from the bouncing tennis ball and the ground plane, I calculate the tennis ball's distance from the ground plane when updating its position. When there is a collision, I set the tennis ball on the ground plane and change its direction.


Object Meshes and Textures

For my tennis scene, I found a lot of outside object meshes (tennis rackets, bags, cans, balls, benches). To standardize the outside meshes and make manipulation of the geometry easier, I used functions to measure and resize the vertices. The dummy mesh is unique because it is a multi-object mesh. For the dummy, I had to keep track of the global max/min extents. Through the tennis racket object mesh, I incorporated texture mapping with the given texture and texture coordinates.



Materials

To simulate different material properties, my program sends different Ambient, Diffuse, Specular, and Shine values to the GPU before calculation of reflected color. I used rubber properties for the tennis court because I didn't want there to be noticeable glare from the lighting source.




Skybox

My skybox is of a park in Japan. This skybox is made of 6 images wrapped around a cube. The skybox moves with the user so the background scene appears infinitely far away.


Resources