Jump to content
  • Advertisement


This topic is now archived and is closed to further replies.


Character Animation Article

This topic is 6149 days old which is more than the 365 day threshold we allow for new replies. Please post a new topic.

If you intended to correct an error in the post then please contact us.

Recommended Posts

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?

Share this post

Link to post
Share on other sites
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.

Share this post

Link to post
Share on other sites
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?

Share this post

Link to post
Share on other sites
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

Share this post

Link to post
Share on other sites
Guest Anonymous Poster
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!!!

- Don

Share this post

Link to post
Share on other sites

  • Advertisement

Important Information

By using GameDev.net, you agree to our community Guidelines, Terms of Use, and Privacy Policy.

We are the game development community.

Whether you are an indie, hobbyist, AAA developer, or just trying to learn, GameDev.net is the place for you to learn, share, and connect with the games industry. Learn more About Us or sign up!

Sign me up!