Sign in to follow this  
neal8929

Ragdoll Physics

Recommended Posts

neal8929    122
I do not yet have the skills to write a 3d game, but I am in the process of learning. My question is, when I do get around to developing small 3d games and I wanted to apply ragdoll type physics to a human model how complicated would that be? What I mean is, would I be better off using a library that is already made for complex physics, or would it be doable considering I only have average math skills. Also, what kind of free libraries are out there and what limitations do they have as far as from a legal standpoint?

Share this post


Link to post
Share on other sites
grhodes_at_work    1385
With, as you say, only average math skills, I would advise that you use a library instead of trying to write your own physics that supports ragdolls. You're less likely to become very frustrated or completely stuck to the point of giving up. Not that I think you would, but physics isn't always easy or intuitive to implement. For ragdolls, even if you just have skeleton joints that are unconstrained ball joints (vs., say, hinge joints with rotation limits), implementing ragdolls requires somewhat advanced math. Then there is the issue of authoring ragdoll content...existing libraries do have art pipelines for creating these things, but if you roll your own you'd have to deal with the content development tools as well....lots of work that as a student of game development you could avoid and be none the worse for it.

If you use one of the open source physics libraries, such as Bullet, I'm sure the licensing is such that you could ship a commercial product without paying a license fee or royalty. I would, however, be very careful to read and comply with the license agreement for the library itself and the separate licenses that might apply to any dependencies. With open source, the issue of dependencies can be a legal pain, since different open source licenses have different requirements in terms of distribution. Commercial libraries may have less complex licensing (e.g., if they are self contained and don't use any external dependencies) but there may be license fees or royalties or other things that are troublesome for you. I don't mean to frighten you about legal stuff! Bottom line is if you intend to do anything in terms of commercial or even free public release, do your homework before you do so, to make sure you are legal.


Share this post


Link to post
Share on other sites
neal8929    122
What would be some good math subjects to read up on related to video game physics? I know algebra, little bit of geometry, and some finite mathematics.

Share this post


Link to post
Share on other sites
JohnnyCode    1046
Quote:
Original post by neal8929
What would be some good math subjects to read up on related to video game physics? I know algebra, little bit of geometry, and some finite mathematics.


As grhodes_at_work adviced you, you should grab a reference documentation of a physics library, trying to understand declarations in documentation and apply to your application.

[Edited by - JohnnyCode on March 31, 2010 3:38:04 PM]

Share this post


Link to post
Share on other sites
lightbringer    1070
Quote:
Original post by neal8929
What would be some good math subjects to read up on related to video game physics? I know algebra, little bit of geometry, and some finite mathematics.


Vector math, matrix math, quaternion math, numerical integration of ordinary differential equations (Euler, Runge-Kutta) would be among the most important ones.

Share this post


Link to post
Share on other sites
Eric_Brown    127
Here is a decent article that doesn't require too much math.

This approach is pretty simple, especially if your ragdoll is a bunch of points connected by sticks. I once saw a non-physics, non-math guy, who after reading this doc wrote a simple 2D point-stick ragdoll application in C#, where the points would collide only with the walls. It only took him about 2 hours to read the doc and write the app. (To be fair, he did ask me a few questions along the way.)

When you start to bring non-trivial collision in, then you crank up the math requirements a few notches. If you want the ragdoll to drive a 3D character mesh, then you crank up the math a few more notches.

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now

Sign in to follow this