Character Animation Article

Started by
3 comments, last by genovov 22 years, 4 months ago
I found this article by one of the programmers who worked on the physics engine for Hitman. http://www.ioi.dk/Homepages/tj/publications/gdc2001.htm Has anyone used here tried this approach in a game? I like it, in theory, because it solves constraints iteratively, collision and contact simply, and looks very easy to impliment. Any comments?
Advertisement
I tried it some time ago, and it does work quite well, but it has some disadvantages.

For a skeleton hierarchy it did the job nicely, but I had some problems to display the skin of the character. This was because it was difficult to determine the correct orientation for some bones, so sometimes the knees and elbow joints would look wrong.
The author mentions this in the article and one way of solving it, is to hardcode some special cases.I didn''t really like this because it makes the system less generic and for other skeletons you would need to harcode more cases.
Also it is difficult to maintain rotational constraints around specific axes.

I also tried his idea for representing objects as a group of particles with constraints. This worked less well, as I found that I could not resolve torques correctly. I don''t know if this was just me not being able to solve the problem or if it was a consequence of using such a method.
At the time I had a method using inertia tensors that was working well enough, so I didn''t bother to investigate further.

The Verlet integration method worked very well. I had a few methods working then and they were either too unstable (Euler) or a bit slow (Runge-Kutta 4th order). Verlet was as fast as Euler and stable enough for my needs. I don''t think it is as accurate as the Runge-Kutta methods but it looked great and it didn''t blow up, so that''s what mattered to me.
It was tricky to get it to work for the angular component using the inertia tensors, but I think I got there in the end.

The document is definetly worth a read if you are into physics and character animation, as you will get good ideas to experiment with and to further your experience in the field.

I would also be interested to hear from other people who have tried these techniques, especially those that took the single object method and got it to work properly.
When you say you had problems resolving torques, do you mean it was difficult to _apply_ a torque to an object, or that the object didn''t respond belivably to collisions that should cause torque?

I was thinking this method would be great for allowing objects to deform by dynamically adding more particles and distance constraints around the point of collision, and having the constraints be slightly springy (resolving 90% of the constraint every iteration for example)

You could use this method to have objects that bend temporarily, and even dent permenantly.

Has anyone else tried these methods?
When applying a torque to an object, whether that be by collision or not, the object would not behave correctly.

Let's say the object is stationary and is represented by the four point masses in a tetrahedron shape as described by the document.
To display the object I'm calculating a matrix from those points.
I use the average of the points to give me the center of the object and the average of two of those points to give me the orientation of one of the axis. The other axis I just cross the existing axis with the other points so as to give me the results I need.

Applying a linear force in any direction works fine as predicted.

When I apply a torque to the object (in any direction), the rotation should be around the axis of that torque.
The way I do this is by calculating linear forces in each of the point masses, such that the resulting torque would match the initial torque.

As I said before, maybe I went the wrong way about this or maybe the formulas I came up with to resolve the torques were incorrect. Either way, I didn't spend much time trying to figure it out properly.

Edited by - lusinho on December 19, 2001 12:15:18 PM
I love verlet integration... it''s perfect for vegetation simulation (a.l.a Hitman). I''m going to try and start work on a more advanced vegetation system than I''ve previously implemented if I can get the time - the possibilities are exciting.

If you want to see verlet integration in action, checkout my webpage at www.donw.co.uk. The grass demo there has a preliminary implementation of it.

And if anybody has anything faster/better looking, please let me know!!!

Seeya,
- Don

This topic is closed to new replies.

Advertisement