Game Development Reference
In-Depth Information
turned off. You will be surprised how good it still looks. You might want to
enable certain collisions, such as hips-lower arms, and calf-calf collisions, but in
general, it is fine to leave most of the other ones, assuming you have a decent
setup of joint limits.
Finally, add a certain amount of damping or friction to all joints. The flesh in
the human body naturally dampens any motion, so some amount of friction will
look more natural, at the same time helping our ragdoll get some sleep.
2.7.5 Geometric Joint Recovery
Since joint drifting cannot be completely avoided, it is tempting to do a final
geometric translation to pull joints back together. This can work well in some
situations, but for the most part, it will add instability and energy to the overall
system. Consider the scene illustrated in Figure 2.10. Translating the joint back
into position introduces a penetration that will at the next frame push the body up
and add energy to the system, possibly causing a new joint displacement. If we
really want to get our hands dirty and implement geometric recovery, we should
consider the whole system, also doing it for collisions to resolve penetrations, and
modify both position and rotation.
A better way to do this correction is to do joint translation as a pure visual
effect. In the ragdoll case, many games use only rotation from the physics rep-
resentation, while keeping a fixed displacement, efficiently hiding joint drifting.
However, if the joint displacement is large, it can cause visual penetration, espe-
cially at the outermost limbs of the ragdoll.
1
2
Figure 2.10.
Compensating for joint drift by moving the objects is usually a really bad
idea.
2.8 Direct Animation
Sometimes we might want to simply animate physical objects, having them affect
other objects but not be affected themselves. There are several ways to do this,
 
Search Nedrilad ::




Custom Search