Jumping Soft Bodies
Coleman Hindes
CPE 471 Winter 2011/2012
Zoe Wood
Project Description:
For my final project I wanted to do some research on soft body animation and use it in conjunction with the material we learned in this class to simulate a body in motion.
I came upon the idea of simulating the "jiggling" motion that affects a large body as it hits the ground.
Main Features:
- Realistic soft body physics
- Collision detection
- Phong shading and per vertex shading
- Ability to jump
- Ability to do frontflips/backflips
Keys:
a - flip backwards
s - flip forwards
space bar - jump
t - toggle Phong shading
Specifics:
- Soft Body Animation
- The primary feature of this project is the soft body animation, which uses a physics engine that I based off of Maciej Matyka's research on soft body animation in 3D. (see reference below)
- In order to simulate the soft bodies, the mesh is filled with a gas that keeps an internal pressure on the body. Forces are modeled using springs that add pressure to each face of the triangele. In addition to the
internal forces, gravity forces the ball downwards. By integration, we can continuously calculate the
sum of the forces acting upon the ball, and update the positions of the vertices. This method provides an impressive simulation of soft body animation.
- Rotation
- Because of the irregular shape of the bodies, rotation proved to be fairly difficult. In order to determine the size of the body, I found the maximum and minimum values in the x, y, and z directions. This was necessary for some of the hierarchical modeling transformations.
- Because the body was convex, and roughly spherical, I was able to approximate the center of the object by averaging these points.
- Hierarchical Modeling
- In order to build the child, I attached multiple instances of a simple spherical soft body together. However, I quickly realized that simply rotating the entire child threw off the soft body's collision with the ground. For example, when the body was upside down, its head would deform at the top, insted of the bottom. I managed to fix this problem by rotating each body part individually to counteract the
rotation of the entire body, and retain the proper orientation. This way, I was able to create the illusion of a child doing frontflips and backflips with only one soft body object.
References:
Screenshots: