Subscribe to GameDev.net Direct to receive the latest updates and exclusive content.
Guest, the last post of this topic is over 60 days old and at this point you may not reply in this topic. If you wish to continue this conversation start a new topic.
Posted 26 February 2012 - 02:36 PM
Posted 26 February 2012 - 02:56 PM
Posted 26 February 2012 - 03:02 PM
Start at Geometric Tools for papers and source code on how to do collision detection. Use Gaffer on Games for information on how to do numerical integration correctly for physics.
Posted 26 February 2012 - 03:21 PM
Posted 26 February 2012 - 03:33 PM
Well, if you really don't want to use a free physics engine (there are lots there, and chances are yours won't be as good as they are), some things that you need to learn are: Kinematics, Forces, Kinetics, Collisions (detection and response), Vector math.
Posted 26 February 2012 - 03:40 PM
Posted 26 February 2012 - 06:37 PM
Posted 26 February 2012 - 09:13 PM
Posted 26 February 2012 - 09:36 PM
Posted 26 February 2012 - 10:27 PM
Hey! That thing is really interesting! I think I'll play with it after I finish my homework. Thanks!
Posted 26 February 2012 - 11:27 PM
Posted 02 March 2012 - 12:36 PM
To be honest, your question is really vague. There isn't really one answer. You know you need to know vector and matrix math and geometric principles. Everything else pretty much expands on those things. The theorems for collision detection and resolution, the algorithms for broad-phase and narrow-phase collision detection, etc. just build on these basic concepts and ideas, and then use clever understandings of the math and the problem to accomplish the desired goal. There really isn't one answer about knowing how to detect collisions between various types. It's an open field of active research, and there are many correct answers. Some of the theorems and ideas popularly used to accomplish the things you're desiring are the Separating Axis Theorem, GJK collision detection, Voronoi regions, Minkowski addition, broad-phase collision detection (with things like BSPs, spatial hashing, etc.), etc. These things are just a small sample of things used in various physics engines, and I wouldn't be surprised if you are already aware of this. If you want to know how to detect and handle a collision, I suggest you look up another physics engine, see the algorithm they use, and then research that algorithm. Being able to look at a problem and decompose it into a mathematical formula is also important. Simply googling the type of objects that can collide is also important, and you'll find various answers for various shapes. And I don't think there's one answer that'll solve every problem. Usually, you have to use multiple answers to solve all the problems, as well as decomposing your problems into other problems which can be solved by your chosen method (like with collision detection and concave shapes using SAT or GJK). And then there's the cases you have to deal with where you really can't accurately solve the problem and just have to hack it with an estimation. If you have a more specific question about one of these aspects, then it's a much easier question to answer. But there isn't really an answer to asking what you need to know in order to write a physics engine, because there's a million ways to do it, each way having it's own million things to know. But really, I'd suggest using the Separating Axis Theorem. This site is gold for a starting point. Whether you use SAT, GJK, etc. is up to you. With each of these algorithms, there are things you need to know. But first you need to decide on an algorithm before I think anyone can really say what you'll need to know, specifically.
Posted 10 March 2012 - 10:15 AM
To be honest, your question is really vague. There isn't really one answer. You know you need to know vector and matrix math and geometric principles. Everything else pretty much expands on those things. The theorems for collision detection and resolution, the algorithms for broad-phase and narrow-phase collision detection, etc. just build on these basic concepts and ideas, and then use clever understandings of the math and the problem to accomplish the desired goal. There really isn't one answer about knowing how to detect collisions between various types. It's an open field of active research, and there are many correct answers.
Some of the theorems and ideas popularly used to accomplish the things you're desiring are the Separating Axis Theorem, GJK collision detection, Voronoi regions, Minkowski addition, broad-phase collision detection (with things like BSPs, spatial hashing, etc.), etc. These things are just a small sample of things used in various physics engines, and I wouldn't be surprised if you are already aware of this. If you want to know how to detect and handle a collision, I suggest you look up another physics engine, see the algorithm they use, and then research that algorithm. Being able to look at a problem and decompose it into a mathematical formula is also important. Simply googling the type of objects that can collide is also important, and you'll find various answers for various shapes. And I don't think there's one answer that'll solve every problem. Usually, you have to use multiple answers to solve all the problems, as well as decomposing your problems into other problems which can be solved by your chosen method (like with collision detection and concave shapes using SAT or GJK). And then there's the cases you have to deal with where you really can't accurately solve the problem and just have to hack it with an estimation.
If you have a more specific question about one of these aspects, then it's a much easier question to answer. But there isn't really an answer to asking what you need to know in order to write a physics engine, because there's a million ways to do it, each way having it's own million things to know.
But really, I'd suggest using the Separating Axis Theorem. This site is gold for a starting point. Whether you use SAT, GJK, etc. is up to you. With each of these algorithms, there are things you need to know. But first you need to decide on an algorithm before I think anyone can really say what you'll need to know, specifically.
Posted 10 March 2012 - 11:04 AM
I'm not asking what I need to know to make a physics engine
Posted 15 March 2012 - 04:11 PM
I'm not asking what I need to know to make a physics engine
That may certainly prove to be confusing considering that is the very exact title of your thread.
I, much like the others, can't quite make out what you're asking for. If you want to code the algorithms yourself instead of looking them up, then go read up on basic physics concepts, crank up your math skills, grab a pen and paper and off you go. You should have enough knowledge about the physical relationships between various physical quantities and enough tricks in your math bag that you should be able to not only handle collision detection but collision response. If you do not, then you can find both physics and math tutorials in my signature. That is about as bare as it gets to reinventing the algorithms, without having to reinvent classical physics altogether.
Posted 19 March 2012 - 06:52 PM
I also have a question,
does box2d use runge kutta 4 integration?
Posted 19 March 2012 - 08:44 PM
Guest, the last post of this topic is over 60 days old and at this point you may not reply in this topic. If you wish to continue this conversation start a new topic.
GameDev.net™, the GameDev.net logo, and GDNet™ are trademarks of GameDev.net, LLC.