Archive for the 'virtual characters' Category



04
Aug
07

character physics made easy

image 

One of the annoying problems with wanting to do AI for virtual characters is that those characters can’t really do much without bodies.  But giving them bodies means wading into all that bothersome graphics and physics.  If you’ve ever read a paper on hardcore physics simulation, it’s pretty daunting, especially when you think about trying to run it at frame rate.

Probably the single most useful paper I’ve read this summer has been Thomas Jakobsen’s 2001 GDC paper on Advanced Character Physics in the Hitman engine.  Jakobsen talks about how to implement believable ragdoll physics by basically ignoring angular momentum and modeling rigid and articulated objects as particles (with only linear momentum) connected by rigid constraints.  By using a combination of techniques – Verlet integration and constraint satisfaction by projection – you can make a system that’s easy to implement, runs quite fast, and looks pretty good.  I was able to implement a basic engine in about 800 lines of C# code and an acceptable procedural animation system in another 600 lines or so (I’m particularly proud of the hugging behavior shown above).  It took me about a week of hacking, which is pretty good given that it was only my third 3D graphics program.  I highly recommend Jakobsen’s paper.




Follow

Get every new post delivered to your Inbox.