What to study in prep for writing a physics engine?

5439ee509ee301125095c87bc24e04c2
0
InvisibleMan 101 Jun 16, 2011 at 14:01

I’m planning on going through the resources Chris Hecker recommends in his article Physics References, however that article (from what I gather) was written in around 1997: 14 years ago.

I suspect that there have been new developments since the article was put together, which brings us to the reason for this post: Do you guys have any additions/changes to the list he gives? For example, changing the order in which a topic is studied, a new and better book for a particular topic in the list, new topics to add to the study list (with accompanying book recommendations if you can), etc.

I like the fact that he discusses each set of books and the pros/cons. If you guys could provide similar notes with your recommendations, as well as when I should study that topic (right after reading the Calculus book? After reading everything else in that list?) and what I will be able to do in my physics engine after I study it (like his “milestones”), it would really help :) Thanks

8 Replies

Please log in or register to post a reply.

6aa952514ff4e5439df1e9e6d337b864
0
roel 101 Jun 16, 2011 at 15:43

Rigid body physics haven’t changed since Hecker’s article ;) I think that it is a good starting point. Random things:
- Hecker doesn’t handle friction iirc, the Coulomb friction model is popular.
- Stacking objects is a nasty problem, I’ve read and used the ideas from the famous “nonconvex rigid bodies with stacking” paper for my own engine. I recently read a series of articles how Angry Birds (might) work, it discussed the physics as well but I didn’t read it, so I don’t know if it is interesting: http://www.wildbunny.co.uk/blog/2011/05/12/how-to-make-angry-birds-part-1/ that guy has more physics stuff on his page iirc.
- Box2d has tech info which was presented at some (?) conference.
- I think that it isn’t wrong to start in 2D and get an idea of how complex physics engines can be before you advance to 3D.

5439ee509ee301125095c87bc24e04c2
0
InvisibleMan 101 Jun 17, 2011 at 16:44

Alright, thanks for the information :)

8676d29610e6c98d6dd2d9c38528cd9c
0
alphadog 101 Jun 20, 2011 at 19:50

@InvisibleMan

What to study in prep for writing a physics engine?

Uhm, all of Newtonian (classical) mechanics? ;)

5439ee509ee301125095c87bc24e04c2
0
InvisibleMan 101 Jun 20, 2011 at 19:56

@alphadog

Uhm, all of Newtonian (classical) mechanics? :blink:

That appears to be listed in Chris Hecker’s article :) The main question is: “Are there any resources for learning it which are better than the ones recommended in the article?”.

8676d29610e6c98d6dd2d9c38528cd9c
0
alphadog 101 Jun 20, 2011 at 20:02

Game Physics, by Eberly. On the theoretical side. Also, there’s a multi-author book called Game Physics Pearls with “practical” articles on a collection of topics. Also, I recommend a book called Collision Detection by Christian Ericson.

5439ee509ee301125095c87bc24e04c2
0
InvisibleMan 101 Jun 20, 2011 at 20:06

@alphadog

Game Physics, by Eberly. On the theoretical side. Also, there’s a multi-author book called Game Physics Pearls with “practical” articles on a collection of topics. Also, I recommend a book called Collision Detection by Christian Ericson.

Alright, thanks for the recommendations :)

29114597a8db33c9fb9db4fddae17683
0
bucketsize 101 Aug 30, 2012 at 02:07

I wouldn’t go by any book/article the teaches you game engine physics. But ofcourse, Ive read a few, that may have influenced my thoughts over how I write code. But never believe everything you read.

The way I see it, physics is just a set of interaction rules for various actors involved. Just like ticket reservation system.

Learn the rules, when you see a box tumble down a slope, it shouldn’t look magical. If you can garner exactly whats at play, you can apply the rules in programming.

Now the trick with game physics: it bends the rules slightly, some will skip details, simplify a model, reduce the number of variables.
Using finite element/slice methods - in this you simulate a few set if equations over a finite body for a finite duration of time (cycletime).

Physics engines wouldnt be realtime if they really simulated reality.

Read kinematics and rigid body mechanics in ‘Fundamentals of Physics - Resnick and Haliday’.
Try to solve a problem or two from ‘Problems in Physics - Irodov’

Then comes the programming.
There is always a debate - go procedural / object oriented , have inheritance hierarchies / composites.
In the end you’d really have to be a good programmer - no alternatives.

Master double dispatch and visitor pattern for c++/java, or take to dynamic languages like Ruby.


JB

A3efb88b30d347252dbc0ef54c33e9f7
0
thisisdog 101 Feb 16, 2013 at 05:53

I realize this thread is probably dead, but I thought I would point out something important.
While knowing the rules of physics is obviously important, it’s not enough.
Numerical stability is very important to achieving realistic results. This stems from the fact that you tick your physics engine at discrete time intervals.

To solve this you must understand how Integration works, this is the best article I’ve seen on the internet:

http://gafferongames.com/game-physics/integration-basics/