Sign in to follow this  
Jacob Roman

Rigid Body Physics

Recommended Posts

I've been programming physics stuff for awhile but never tackled on rigid bodies because there's not too much code out there on the net, and when you do find code, there are so many cpp and hpp files in the project to even figure out where to start, and actually learn something from it. The rest of the stuff on the net I've been finding are theory and too much mathematical notation, thus making it impossible for me to code. Are there any good tutorials out there that'll teach me how to code rigid body kinematics without too much overhead?

Share this post


Link to post
Share on other sites
Guest Anonymous Poster
You can check Chris Hecker's web site. He has some very simple code and explanations on rigid body dynamics. It can get you started.

ram

Share this post


Link to post
Share on other sites
Quote:
Original post by Marius
ODE dynamics engine
Newton Dynamics engine


No, dont do it...try to learn yourself!! You'll get a lot of knowledges about and it is so good and extremelly usefull!!I'm not even a little bit experienced with rigid body dynamics but I'm learning.....Articles suggestions I can give you are these(they helped me a lot...I learned many crazy things about rb simulation with them) on this page, and mainly this

cya

Share this post


Link to post
Share on other sites
Yeah that's what I'm saying. I don't want no third party physics engine. I want to build one myself. Chris's website looks good, but I'll check out the other links as well. If anyone has anymore, feel free to post them. :D

Share this post


Link to post
Share on other sites
There are a couple of books that provide very good introductions to how to code a rigid body dynamics system. I'd recommend the following:

"Introduction to Game Development" - physics chapter, by me, moi, yours truly.
"Game Physics" by David Eberly

I apologize for the self-promotion, but if you buy a copy of the book, I'll get US$0.75 in royalty, and then if I add just US$0.25 of my own money I can buy a cherry coke for the afternoon. (One writes these books to make a community contribution, and to promote oneself in an industry, not for the cash!)

But seriously, both books have good introductions to the basic math, collision stuff, and how to put it into a game.

NEITHER book talks much about rigid body constraints, but they will get you well started.

Other books of interest that cover physics somewhat....Eberly's super-excellent book "3D Game Engine Architecture" (*not* "3D Game Engine Design", which doesn't really talk physics) and "Essential Mathematics for Games..." by Jim van Verth and Lars Bishop. The latter is introductory, and perhaps less in depth than the first two books.

The free docs on the web are good, but tend to be somewhat less easy to read than the books.

Share this post


Link to post
Share on other sites
I already own Game Physics by David Eberly, but the problem with that book is that it's literally 90% mathematical notation and theory, while the 10% is code. I couldn't learn much of anything from that. It's as though he assumes that his readers have a PhD in physics and math. I'm good at math and all and know some calculus and trig, but I'm a programmer, not a mathematician.

Share this post


Link to post
Share on other sites
Advanced Character Physics

Best rigid-body algorithm I've ever used (used particles and infinite spring constraints to create rigid bodies, instead of pure geometry). Fast, stable, flexible, and simple to write. You can use it for everything from bouncing blocks to ragdoll to cloth and water simulation. I'm currently using it for ragdolls and ropes (attached from one OR both ends) and it works great.

Share this post


Link to post
Share on other sites
After you have printed out the Baraff notes and carried them around in your pocket for at least one week, visit here and all will be revealed..

http://graphics.stanford.edu/papers/rigid_bodies-sig03/

Share this post


Link to post
Share on other sites
Quote:
Original post by billy_zelsnack
After you have printed out the Baraff notes ... visit here and all will be revealed...


I second that, though there's at least 4 different big parts to this:

1. The integration scheme (the way they order things)
2. Using iterative inelastic impulses for resting contact
3. Shock propogation
4. The collision detection scheme

and in addition their method involves making multiple collision detection calls per physics step. To use it in real-time you need to pick and choose from this paper, and add your own ideas too.

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