Ragdoll physics
In computer physics engines, ragdoll physics are a type of procedural animation that is often used as a replacement for traditional static death animations.
Introduction
Early video games used manually-created animations for characters' death sequences. This had the advantage of low CPU usage, as all that was needed to animate a "dying" character was chosen from a set number of pre-drawn 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. When the character dies, his body begins to collapse to the ground, honouring these restrictions on each of the joints' motion, which often looks more realistic.
The term ragdoll comes from the problem 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 with a nip collapsing much like a toy rag doll, often into comically improbable or compromising positions.
The first game to exhibit ragdoll physics was the Jurassic Park licensed game Jurassic Park: Trespasser, which received very polar opinions; most were negative. The game had a large number of bugs but was remembered for being a pioneer in video-game physics engines.
Modern use of ragdoll physics goes beyond death sequences — there are fighting games where the player controls one part of the body of the fighter and the rest follows along, such as Rag Doll Kung Fu, and even racing games such as the FlatOut series.
Approaches
Ragdolls have been implemented using Featherstone's algorithm and spring-damper contacts.[1] An alternative approach uses constraint solvers and idealized contacts.[2] 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 [1], 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 (used in Halo 2) 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, though the benefits of the extra realism seem to overshadow the reduction in processing speed.
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 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 intractably time-consuming to try to hand-craft custom animations for all conceivable circumstances, ragdolls fill in and generate a reasonably accurate interpretation of events on the fly.
See also
- Game physics
- Physics engine
- Procedural animation
- Featherstone's algorithm
- Joint constraints
- Stair Dismount
References
- ^ US 6067096 "Method and system for generating realistic collisions in graphical simulations"
- ^ "Physically Based Modeling: Principles and Practice". Proc. SIGGRAPH '97. SIGGRAPH 97. Los Angeles: Association for Computing Machinery Special Interest Group on Graphics. 1997.
{{cite conference}}
: External link in
(help); Unknown parameter|conferenceurl=
|booktitle=
ignored (|book-title=
suggested) (help); Unknown parameter|coauthors=
ignored (|author=
suggested) (help); Unknown parameter|conferenceurl=
ignored (|conference-url=
suggested) (help)
External links
- Trespasser postmortem in Game Developer
- GDC 2001 Proceedings Archive Archived version of Advanced Character Physics
Examples
- Rag Doll Kung Fu
- Ragdoll Masters, a fighting game with ragdolls (shareware download)
- Ski stunt simulator (java)
- Falling woman (flash)
- Thomas Jakobsen's article about the integration of Verlet Physics
- Stair Dismount and Truck Dismount
- Mona the Ragdoll (requires flash player 9) created with The FisixEngine (an AS3 physics engine for flash)
- Sumotori Dreams
- Toribash
- [2]