Jump to content
  • Advertisement
Sign in to follow this  
bronxbomber92

"Game Physics Engine Development"

This topic is 1346 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

Hi, I'm looking into buying the book "Game Physics Engine Development". I'm looking for something that explains thing in a simple manner. I find it hard to follow the calculus in many of the papers available such as the papers at Pixar, or the Chris Hecker articles since I haven't yet taken a calculus or physics course (nor will I for a couple of years). So my questions are: 1.) Most importantly, is the book easy to follow and understand without any knowledge of calculus? 2.) Is the book worth it, or are there better books out there? 3.) Does anyone know of any 3D physics articles or tutorials that are easy to follow/understand? Btw, I'm mainly insterested in rigid body/deformable body physics, and not soft/fluid body physics. Thanks for your input!

Share this post


Link to post
Share on other sites
Advertisement
Chris Hecker's articles are some of the best out there for beginning engine development, but seriously, think about what you are trying to do- I've been working on my physics engine for over a year and it's barely starting to come together, and I'm a 2nd year computer science major taking linear algebra and such courses. Attempting to build an engine with your knowledge will end up being a very painful experience. There's stuff that i still don't understand.

You're better off waiting a few years and in the meantime just using an existing physics library such as Bullet, ODE, PhysX, Newton, or Chipmunk for your projects. Later on once you've picked up the math and physics necessary you can try your hand at it.

Share this post


Link to post
Share on other sites
I'm not trying to build a whole engine. More so just a small "framework" which can provide decent collision response between basic bounding volumes such as cylinders, AABBs, spheres, and OBBs against each other or planes. That plus gravity, jumping some friction and possible momentum (obviously velocity, acceleration (force/mass).

If I get that far, I'd probably aim for angular velocity, torque, and rotational related physics.

Btw, I'm not totally incompetent when it comes to calculus. I understand what differentiation and integrals are in theory and that velocity is a derivative position, acceleration is a derivative of velocity, ect... It's just the big picture of how differentiation and integrals actually work. I believe one I can grasp that, comprehending the actual physics shouldn't be hard because the equation presented in those papers will make sense :).. It's just a matter of when I will understand how differentiation and integrals actually work...

Edit - I'm not actually intend on writing this for game (well, maybe some day it would be used). But more so for experience and the sake of learning something new (which final results also looks cool!). Making some cool tech demos would be nice if I ever finish it :)

Share this post


Link to post
Share on other sites
Have you looked at bullet. [link="www.continuousphysics.com" ]
It's more than a tut, Its a Indi physics lib for learning and physics nuts.

Share this post


Link to post
Share on other sites
The book is an incredible disappointement and it will not show you how to implement a state of the art collision or physic system.

If you want to implement a physic and collision system I recommend the following:

a) Chris Hecker is maybe a good start as are the papers and Siggraph lectures of D. Baraff
b) Look at Erin Catto's Box2D example and the associated slides. This is how current solvers work to my knowledge . So if you want a stable solver extend it to 3D. You can find an implementation of this in 3D also in Bullet.
c) For collision detection you basically have the choice between GJK and specialized routines. This is black art in my opinion and you need to work this out yourself. A decent implementation of GJK can be found in "Bullet" and also how to create a contact manifold based on it (see btPersistentManifold). Personally I prefer "one shot" methods that find the full manifold each frame. This is based most often on SAT. Christer Ericson had a nice presentation on this topic here:

http://realtimecollisiondetection.net/pubs/

Good books are extremely difficult to find. If this is a serious project I recommend:

v. d. Bergen: Collision Detection in interactive 3D environments
Ericson: Real-Time collision detection
Erleben: Physics based animation
Coutinho: Dynamic simulations of multibody systems

A good start is most propably the thesis of K. Erleben which you can download here:

ftp://ftp.diku.dk/diku/image/publications/erleben.050401.pdf

Basically it is an explanation of the ODE. I also recommend looking at the ODE (preferable version 0.5 - the last release of R. Smith. Forget about later releases) and try to fully understand it. Though it is somehow difficult code all you actually need to understand is quickstep.cpp and joints.cpp from the solver side. You can also look at some collsion routines for manifold generation

Another good thesis is:
Jeroen M. Wagenaar - "Physically Based Simulation and Visualization"

I can't find it at the moment, so give me your mail and I can send it to you.

This is from a co-worker of T. Jakobsen and it is pretty much a summary of the algorithms you can choose from. Make sure you know Jacobsen's paper and see how it orginates in molecular dynamics (RATTLE and SHAKE)

If you are faint at heart you can also look the thesis of Claude Lacoursier, but this is some harder stuff :-)

http://urn.kb.se/resolve?urn=urn:nbn:se:umu:diva-1143


This should keep you busy until next year. Enjoy it and good luck!


Cheers,
-Dirk

Share this post


Link to post
Share on other sites
Maybe I should note that if you have problems with calculus you better look that you learn it quickly. You really must be *decent* at mathematics. By decent I mean that you are totally familiar with linear algebra, analytic geometry, calculus and multi-dimensional calculus (e.g. gradient and Jacobians). If you have problems with this you can forget about your project and you should consider using a library like e.g. Bullet. This will safe you quite some time and frustration.

Share this post


Link to post
Share on other sites
As DonDickieD said, the book by itself is pretty disappointing, it seems to be aimed at newbies and what it does is pretty much go through the code for the Cyclone physics library, a library the author wrote, which is available online for free by the way.

I assume the book was a counterbalance to David H. Eberly's Game physics which is WAY too focused on the math and theory, and a lot less in code, a very boring albeit full of information book. I would love to see a book in between these two.


Personally I swear by Christer Ericson's Real-Time Collision Detection, however, it only deals with, as the title implies, collision detection, not the physics or collision reaction... Maybe Christer should do us all a favor and write a book on physics [smile].

Share this post


Link to post
Share on other sites
Thanks for the great info guys!

DonDickieD, I greatly appreciate you input. The master thesis by Erleben look like a great read further on. As you said, I should try to learn Calculus as soon as possible. I found this book online: http://www.understandingcalculus.com/toc.php. It seems to standout to other free-online calculus books because it applies what you learn to real-life situations (a la physics). If you know of any other (better) resources for learning calculus (that's free), please speak up :)

Directed toward DonDickeD & Kwizatz: Do you guys only find the books disappointing because it doesn't cover "state of the art" physics implementations and it geared toward "newbs"? Or are there other flaws? I specifically asked about this book because it seemed like more of a solid introduction, while not covering the "absolute" basics you learn early on in highschool. As I said, I'm not looking to create an outstanding physics engine, just a simple implementation of rigid body physics. Obviously I am a "newb" to advance math and physics, so do you think the "Game Physics Engine Development" fits the criteria I've described above?

Thanks again!
-Jedd

P.S. DonDickeD, I'll PM you my email address.

Share this post


Link to post
Share on other sites
There's a free Calculus book here. It got good reviews on amazon and seems like it's worth a look.

There are also some lecture notes on calculus (and some other relevant topics like linear algebra and differential equations, and some refresher notes on algebra and trig) here. They're not enough to learn, but they can be a good supplement.

Share this post


Link to post
Share on other sites
The book is a total fuckup. Forget about it!

Regarding the book of Eberly I would argue that it covers a lot of material, but very few in this book has to do how current physic engines are implemented. I would consider this book more as a reference than an introduction to physics. It is is a good book when you know how things work. But this is my very own opinion on this book.

Sorry, I can't help you with books on calculus since I would buy them in German. Note that you also need to look into *multi-variable* calculus and I found it quite hard to find good references on this topic. So make sure you understand what gradients, Jacobians or total derivatives are (http://en.wikipedia.org/wiki/Total_derivative)

If I needed to learn this again I would recommend starting in 2D. Take Erin's Box2D example and implement it yourself. Maybe use circles instead of boxes first. A good start is to drop a circle on the ground and have a small stack of circles next. This would give you the overall idea. Then you can start adding boxes and maybe extend to use "capsules" and arbitrary convex polygons. All this can be done in 2D and will make you life a lot easier. You can implement collision using SAT and GJK and for the later it will help to start in 2D to get a feeling of the Minkowski stuff since you can easily visualize the Minkowski sum and the simplex. Finally you add a revolute and prismatic joint. In the beginning you can run your engine and Erin's side by side to catch errors. Once everything works and you hopefully understand everything you can remove this coupling and start extending the engine. Once you feel comfortable switch to 3D...

Besides this you will read again and again the references I gave you. So read them once to get on overview and to know where everything is covered. And then re-read when questions pop up. You really need to implement it and "run" into questions that you either can answer yourself with the help of the references or by questioning on the forum. There is very little chance that you will learn this by simply reading some introductinary book.

A good book on mathematics that covers also some calculus is "Essential math for game developers". I really can recommend this book.

HTH,
-Dirk

Share this post


Link to post
Share on other sites

This topic is 1346 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.

Guest
This topic is now closed to further replies.
Sign in to follow this  

  • 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!