Game Development Reference
In-Depth Information
11.1.1 Background
Hitman: Codename 47 was one of the very first games to feature articulate rag-
dolls, and as such, the physics simulation ran on much slower hardware than
what is common today. I was assigned the task of developing the physics sys-
tem for Hitman , and I threw myself at the various methods for physically based
animation that were popular at that time. Most of these, however, either suffered
from elastical-looking behavior originating from the use of penalty-based
schemes or they had very bad real-time performance for various different
reasons.
At some point I remembered the old “demo scene” effect for simulating rip-
ples in water that always had me fascinated. It had all the nice features I was
looking for, including stability and speed of execution. Except it simulated water,
neither cloth nor hard nor soft bodies. It relied on a velocity-less representation
of the system state by using the previous position of the water surface to update
the current one. What I came up with for Hitman was a technique that also fea-
tures a velocity-less representation of the system state, yielding a high amount
of stability. As it turned out, almost the same technique had been used for years
to simulate molecular dynamics (under names such as SHAKE and RATTLE,
see [Forester and Smith 98]).
I will now continue with a short review of existing methods for numerical
integration, explaining their differences and drawbacks, with a focus on semi-
implicit methods and Verlet integration. The remainder of the chapter explains
how to apply the Verlet method to interactive physics simulation and goes through
some of the related subtleties.
11.2 Techniques for Numerical Integration
For our purposes, the subject of numerical integration deals with how to advance
a simulation from one time step to the next, updating the system state by solving
an underlying ordinary differential equation (ODE). An introduction to numerical
integration has already been given in Chapter 1; please refer to this for additional
details.
11.2.1
Forward Euler Integration
When experimenting with cloth simulation for the first time, many developers
choose a basic Euler integration as their initial method for time stepping a mass-
spring system. But we realized pretty quickly that the technique is far from suf-
ficient: cloth tends to vibrate and even “explode” when moved around too much.
Search Nedrilad ::




Custom Search