Game Development Reference
In-Depth Information
Keep Yer Shirt On
Michael Alexander Ewert
Implementing cloth simulation in real-time interactive environments is well un-
derstood and is a common sight in modern video games. The types of cloth simu-
lated are often limited to flat, square patches. Clothing for characters is normally
skinned and unsimulated. This pearl will demonstrate a way to simulate interest-
ing clothing types on animated characters by building upon previously established
simulation techniques. The enhancements presented here are fairly simple and, in
many cases common sense, but these make all the difference between a visually
pleasing simulation and an uncontrollable mess.
12.2 Stable Real-Time Cloth
The best-known method for implementing stable real-time cloth is by modeling
the cloth as a collection of particles linked via distance constraints and integrated
forward in time using a first-order Verlet integration scheme. The constraints are
solved with a relaxation solver. Collision constraints are enforced by projecting
the particle's position to a non-penetrating location [Jakobsen 03].
12.2.1 Verlet Integrator
The Verlet integrator is used because it is extremely stable. In the Verlet integra-
tion scheme, velocity is not explicitly represented. Velocity is implicitly encoded
as the difference between the previous position and the current position. Inte-
grating a particle forward in time is accomplished by leapfrogging the previous
position over the current position, as follows:
x i +1 = x i + x i āˆ’
x iāˆ’ 1 .
The system's state variables are more in sync this way, which accounts for the
superior stability.
Search Nedrilad ::

Custom Search