Ragdoll physics
|
In computer game engines, ragdoll physics are a replacement for traditional static death animations. Early computer games, going as far back as computer graphics themselves, used hand-created death sequences for characters. This led to low memory and CPU usage as all a dying character had to do was choose from a pre-set finite number of animations.
As computers increased in power, it became possible to do limited real-time physical simulations. A ragdoll is therefore a collection of multiple rigid bodies (each of which is ordinarily tied to a bone in the graphics engine's skeletal animation system) tied together by a system of constraints that restrict how the bones may move relative to each other.
The term ragdoll comes from the fact that the articulated systems, due to the limits of the solvers used, tend to have little or zero joint/skeletal muscle stiffness, leading to a character collapsing much like a paper ragdoll.
Ragdoll advantages/disadvantages
Due to the computationally expensive nature of performing simulations, most games using ragdolls use very simple approximations of characters:
- extremity bones such as fingers often go unsimulated.
- simple joints are used instead of actual constraints imposed by a true skeleton. (For example, human knee joints are often modelled as a rigid hinge even though an actual human knee allows some rotation.)
- simplified collision hulls are used to detect contact with other rigid bodies rather than detecting collision with the skin of the mesh.
The chief advantage ragdolls offer over traditional animations is that they allow much more correct interaction with the surrounding environment. Where it would be absurd to try and hand-craft custom animations for all conceivable circumstances, ragdolls fill in and generate a mostly-correct interpretation of events on fly.
Other types of ragdoll
While the constrained-rigid-body approach to ragdolls is the most common, other "pseudo-ragdoll" techniques have been used:
- Verlet integration: used by Hitman: Codename 47 and popularized by Thomas Jakobsen, this technique models each character bone as a point connected to an arbitrary number of other points via simple constraints. Verlet constraints are much simpler and faster to solve than most of those in a fully modelled rigid body system, resulting in much less CPU consumption for characters.
- Inverse kinematics post-processing: used in Halo, this technique relies on playing a pre-set death animation and then using inverse kinematics to force the character into a possible position after the animation has completed. This means that, during an animation, a character could wind up clipping through world geometry, but after he has come to rest, all of his bones will be in valid space.
- Blended ragdoll: this technique works by playing a pre-made animation, but constraining the output of that animation to what a physical system would allow. This helps alleviate the ragdoll feeling of characters suddenly going limp, but offers correct environmental interaction as well. This requires both animation processing and physics processing, thus making it even slower than traditional ragdoll alone.de:Ragdoll