informa
3 min read
article

Feature: 'Ragdoll Physics On The DS'

In this technical feature, Sensory Sweep Studios' senior programmer Eric Brown explains the Verlet integration method for ragdoll physics, and how it enables sophistica
In this technical feature, Sensory Sweep Studios' senior programmer Eric Brown explains the Verlet integration method for ragdoll physics, and how it enables sophisticated tech goals on the Nintendo DS. Though the Nintendo DS's computational power is certainly limited when compared to its bigger console brothers, Brown says programmers can still implement ragdoll physics on the handheld, provided that they dismiss their restricted expectations of its performance. The idea he used to successfully include ragdoll physics was the common Verlet integration technique: "The Verlet particle system is ideal for representing a ragdoll skeleton because constraints can be infinitely rigid without causing the system to diverge, thus the distance between joints can more rigidly be maintained. For this reason, you may find that a Verlet particle system is a nice thing to have around, even if you are not planning on doing any ragdoll physics. The main idea behind the Verlet integration approach to ragdoll is that the positions of the joints are determined by point particles. The 'bones' of the skeletons, represented by length constraints that enforce two neighboring particles, are an exact distance apart. Extra length constraints can be added as necessary to prevent unnatural poses, as well as self intersection of the ragdoll. Updating the positions of the particles is relatively inexpensive, and calculating a length constraint is the equivalent of resolving a sphere collision, so the overall cost of updating the particle system is pretty low." After updating the positions of all of the particles and applying constraints to ensure the appropriate distance relationships between them, programmers can add collision. "I decided to allow the particles to collide with the world as independent spheres, rather than trying to construct a closed collision volume that encompassed a ragdoll limb. This decision was based on two factors. The first was the cheapness factor-sphere collision is much cheaper than some kind of ellipsoid or oriented bounding box collision. The second was that I succeeded in convincing the artists and designers who were creating the collision worlds to "play nice" with the ragdoll -- meaning that they should try to make the static collision geometry as smooth as possible, with no really sharp kinks or protrusions that the ragdoll might get hung up on. However, I still ran into pretty big problems using this approach. If you are using spheres to represent the collision volumes of joints, then the spheres generally need to be pretty small. After all, they are representing things like a hand, shoulder, or hip. Using such small spheres, I immediately began to notice that all of my collision routines would generally fail, due to the numerical imprecision introduced by fixed-point arithmetic." You can read the full technical feature, which details what Brown learned in order to overcome those precision-related issues, as well as how he interfaced with the animation system (no registration required, please feel free to link to this feature from other websites).

Latest Jobs

Treyarch

Playa Vista, California
6.20.22
Audio Engineer

Digital Extremes

London, Ontario, Canada
6.20.22
Communications Director

High Moon Studios

Carlsbad, California
6.20.22
Senior Producer

Build a Rocket Boy Games

Edinburgh, Scotland
6.20.22
Lead UI Programmer
More Jobs   

CONNECT WITH US

Register for a
Subscribe to
Follow us

Game Developer Account

Game Developer Newsletter

@gamedevdotcom

Register for a

Game Developer Account

Gain full access to resources (events, white paper, webinars, reports, etc)
Single sign-on to all Informa products

Register
Subscribe to

Game Developer Newsletter

Get daily Game Developer top stories every morning straight into your inbox

Subscribe
Follow us

@gamedevdotcom

Follow us @gamedevdotcom to stay up-to-date with the latest news & insider information about events & more