Your favorite physics library?
- Zeal
- Ogre Magi
- Posts: 1260
- Joined: Mon Aug 07, 2006 6:16 am
- Location: Colorado Springs, CO USA
Your favorite physics library?
Im anxious to start playing around with physics in my game, and im torn between which library to use (OgreNewt and NxOgre are the two most likely choices). I was hoping somebody could share some of their experience, maybe give a little pro/con for each. Of course theres ogre ODE too....
Im not trying to do anything crazy, I just want to maybe have some 'creatures' that you can drop bombs on, theyll scatter all over, bounce off each other, the heavy ones will push the lighter ones, ect... Of course adding the 'neato' effects like cloth would be cool too.
Thanks in advance for any info!
*for a specific question, lets say you were going to try and get your game onto something like xbox live arcade. Which physics library would be easiest to port to such a platform? Which library is most 'portable' in general?
Im not trying to do anything crazy, I just want to maybe have some 'creatures' that you can drop bombs on, theyll scatter all over, bounce off each other, the heavy ones will push the lighter ones, ect... Of course adding the 'neato' effects like cloth would be cool too.
Thanks in advance for any info!
*for a specific question, lets say you were going to try and get your game onto something like xbox live arcade. Which physics library would be easiest to port to such a platform? Which library is most 'portable' in general?
- Kentamanos
- Minaton
- Posts: 980
- Joined: Sat Aug 07, 2004 12:08 am
- Location: Dallas, TX
- Kojack
- OGRE Moderator
- Posts: 7157
- Joined: Sun Jan 25, 2004 7:35 am
- Location: Brisbane, Australia
- x 534
Porting to xbox live arcade...
In that case, forget Newton. It's binary only, you can't port it.
Also forget PhysX. It's binary only, you can't port it. For about $50000 you can get an xbox 360 version though.
ODE is open source, so you can port it.
Bullet is also open source, and even has PS3 support, so I'd guess porting it shouldn't be too hard.
I'd probably use Bullet (http://www.continuousphysics.com/Bullet/) rather than ODE, but that's because ODE has annoyed me in the past and I've never used Bullet.
As usual, I'm expecting this thread (like nearly every physics thread on here) to turn into a flame war within the next 10 posts.
In that case, forget Newton. It's binary only, you can't port it.
Also forget PhysX. It's binary only, you can't port it. For about $50000 you can get an xbox 360 version though.
ODE is open source, so you can port it.
Bullet is also open source, and even has PS3 support, so I'd guess porting it shouldn't be too hard.
I'd probably use Bullet (http://www.continuousphysics.com/Bullet/) rather than ODE, but that's because ODE has annoyed me in the past and I've never used Bullet.
As usual, I'm expecting this thread (like nearly every physics thread on here) to turn into a flame war within the next 10 posts.
-
- Gnoblar
- Posts: 6
- Joined: Wed Feb 01, 2006 9:42 pm
- Contact:
- syedhs
- Silver Sponsor
- Posts: 2703
- Joined: Mon Aug 29, 2005 3:24 pm
- Location: Kuala Lumpur, Malaysia
- x 51
If you are left with only ODE and Bullet, choose Bullet. If Zlib library or equivalent (eg MIT) is important for your project, choose Bullet. Bullet at least has its founder developing very actively within it. In fact you will get to see the minor releases sometimes just a week apart which mean very actively developed.
If you are developing solely for Windows platform and see no change of platform within forseeable future (5 years?) then IMHO, choose PhysX
If you are developing solely for Windows platform and see no change of platform within forseeable future (5 years?) then IMHO, choose PhysX
- sinbad
- OGRE Retired Team Member
- Posts: 19269
- Joined: Sun Oct 06, 2002 11:19 pm
- Location: Guernsey, Channel Islands
- x 66
- Contact:
The answer as always with these things is 'depends what you want to do with it', as borne out by the above responses. And sometimes it's not always about functionality (see Kojack's post).
As an aside, I had the pleasure of meeting the lead dev of Bullet (Erwin Coumans) at Siggraph last year. He came over to show me a demo of Ogre and Bullet running inside Blender on his Mac ( http://echo-plugin.sourceforge.net - not his project but one he keeps tabs on). Nice chap. He works for Sony which is why there's a PS3 version of Bullet
As an aside, I had the pleasure of meeting the lead dev of Bullet (Erwin Coumans) at Siggraph last year. He came over to show me a demo of Ogre and Bullet running inside Blender on his Mac ( http://echo-plugin.sourceforge.net - not his project but one he keeps tabs on). Nice chap. He works for Sony which is why there's a PS3 version of Bullet
- detox
- Greenskin
- Posts: 103
- Joined: Thu Sep 07, 2006 1:13 am
- Location: Ohio, USA
- Contact:
I looked at ODE, Newton, Bullet, and PhysX a bit ago. I wanted open source so I could look around inside the guts and learn a bit as I went - that eliminates PhysX and Newton right off. I tested a "bare" ODE, Ogre ODE, and Bullet. ODE (and Ogre ODE) seemed pretty good and very usable for anything I would do. However the GPU addon code for Bullet and the fact that it handles concave-concave collisions was interesting enough to me to choose it over ODE. There is also some addon code in the Bullet package to do convex decomposition including demo code to get it going. Pretty cool stuff.
It was very simple to integrate into an Ogre app, pretty much all I had to do was inherit a class to sync ogre nodes to bullet collision shapes and create a handler class for some globals, then add a cpl lines to a framelistener to update the physics world.
There are a couple people around here working on building an OgreBullet wrapper. They were moving very fast last I checked so keep an eye out for it.
It was very simple to integrate into an Ogre app, pretty much all I had to do was inherit a class to sync ogre nodes to bullet collision shapes and create a handler class for some globals, then add a cpl lines to a framelistener to update the physics world.
There are a couple people around here working on building an OgreBullet wrapper. They were moving very fast last I checked so keep an eye out for it.
- Zeal
- Ogre Magi
- Posts: 1260
- Joined: Mon Aug 07, 2006 6:16 am
- Location: Colorado Springs, CO USA
- JohnJ
- OGRE Expert User
- Posts: 975
- Joined: Thu Aug 04, 2005 4:14 am
- Location: Santa Clara, California
- x 4
No, you only have to pay if you are developing for a platform like xbox. Otherwise PhysX is free.Ouch even under their 'new' license its still that bad?
As said above, if you want a "free" physics engine which can be ported to xbox, it's probably going to have to be open source.
P.S. I don't know much about xbox game distribution, but don't you have to pay huge amounts of money even to begin development for xbox (in addition to royalties)?
- Zeal
- Ogre Magi
- Posts: 1260
- Joined: Mon Aug 07, 2006 6:16 am
- Location: Colorado Springs, CO USA
Oh yeah im sure it costs a lot just to get a game on something like xbox live, not even including what you have to pay for all the little sdks you use. Im just always on the lookout for 'free stuff'. Who isnt?
I just thought under the new physx license they wanted to do away with all the fees, but I guess they only meant for pc eh?
I just thought under the new physx license they wanted to do away with all the fees, but I guess they only meant for pc eh?
- JohnJ
- OGRE Expert User
- Posts: 975
- Joined: Thu Aug 04, 2005 4:14 am
- Location: Santa Clara, California
- x 4
According to Ageia, PhysX is free for:I just thought under the new physx license they wanted to do away with all the fees, but I guess they only meant for pc eh?
So it looks like Ageia is also free for PS3.* Commercial & non-commercial use on PC
--- Must keep registration information currect
--- Must agree to the EULA at the time of download (pops up, but is copied below)
--- Available for Windows & Linux (soon)
--- No PhysX HW support requirement
* PS3 platform (through Sony pre-purchase)
* All platforms through some of our middleware partnerships, such as UE3, Gamebryo 2.2, and others
There's nothing wrong with looking for free stuff. It's just that when you're thinking about developing for platforms costing millions of dollars to develop for, it seems somewhat useless.Oh yeah im sure it costs a lot just to get a game on something like xbox live, not even including what you have to pay for all the little sdks you use. Im just always on the lookout for 'free stuff'. Who isnt?
- Kojack
- OGRE Moderator
- Posts: 7157
- Joined: Sun Jan 25, 2004 7:35 am
- Location: Brisbane, Australia
- x 534
Yep, PhysX is given to you as part of the PS3 dev kit (well, I don't have it, that's just what I've read). But the dev kit is going to cost you a heap anyway. You aren't going to get it with the PS3 linux kit.
UE3 has PhysX built in, but it costs somewhere over $250000.
Getting on xbox live arcade is one of the goals of the $100 XNA membership. But that's not ready yet (the getting on arcade part I mean).
UE3 has PhysX built in, but it costs somewhere over $250000.
Getting on xbox live arcade is one of the goals of the $100 XNA membership. But that's not ready yet (the getting on arcade part I mean).
- irrdev
- Orc
- Posts: 420
- Joined: Sun Oct 15, 2006 7:30 pm
- Contact:
I think ODE is the best, but also agree that it is awful to code directly in. Instead, I use OPAL which is a physics abstraction layer which actually uses ODE underneath. It does not really sacrifice speed, while it saves a lot of developing time. One useful thing about OPAL is that the current main project contributor is an Ogre user, and all the tutorials are written for use with Ogre. It is also very well documented. The last big feature I like is that there is also an OPAL Physics Editor. Overall, I think OPAL is better than Bullet. You can find more about it here http://ox.slug.louisville.edu/~o0lozi01 ... /Main_Page
<ADDITION>OPAL is opensource(BSD-like license), so yes, you could easily port it to PS2 or XBox.
</ADDITION>
<ADDITION>OPAL is opensource(BSD-like license), so yes, you could easily port it to PS2 or XBox.
</ADDITION>
FeedLaunch .NET RSS and ATOM feed editor- open-source and released under the GPL. Visit Feed Launch .NET Project Website hosted at sourceforge.net
- Zeal
- Ogre Magi
- Posts: 1260
- Joined: Mon Aug 07, 2006 6:16 am
- Location: Colorado Springs, CO USA
Finally had some more time this weekend, thanks again for all of your input. I still have two things im wondering about before I dive in...
1.) Whichever library I use, its important that im able to control the 'update physics' and 'update ogre' separately (since im running my game logic/physics and Ogre/rendering in two different threads). I saw in a post that this is possible with nxOgre, but what about the others?
2.) About collision/space - I have my game world partitioned into 2d sectors, and im hoping whatever physics library I pick can utilize that. For example, lets say I had to run a collision check on a ball, it would be nice if the physics system was aware of these collision spaces. I assume all the physics libraries let you 'setup' and manage your own 'physics/collision spaces'?
Thanks again for the info
1.) Whichever library I use, its important that im able to control the 'update physics' and 'update ogre' separately (since im running my game logic/physics and Ogre/rendering in two different threads). I saw in a post that this is possible with nxOgre, but what about the others?
2.) About collision/space - I have my game world partitioned into 2d sectors, and im hoping whatever physics library I pick can utilize that. For example, lets say I had to run a collision check on a ball, it would be nice if the physics system was aware of these collision spaces. I assume all the physics libraries let you 'setup' and manage your own 'physics/collision spaces'?
Thanks again for the info
- eugen
- OGRE Expert User
- Posts: 1422
- Joined: Sat May 22, 2004 5:28 am
- Location: Bucharest
- x 8
- Contact:
U can update the physics into separate thread also with ogreode but is a bit of deciding on how to do it. If u have some experience with ogreode it should be an easy job
ODE has his own space type that will automaticaly partition the sceene into collision spaces...there is hash space in which there is an internal partitioning but u cant specify how big the cells should be and the quadtree space in which u can specifiy the size of the cell...both this spaces can be used as a unique partition method. One other method would be to construct yourself simple spaces for the each partition u have in your game and attach physical objects to one or the other physical space created
Physx should have smth close to this also thou i dont have the experience nor with Bullet
ODE has his own space type that will automaticaly partition the sceene into collision spaces...there is hash space in which there is an internal partitioning but u cant specify how big the cells should be and the quadtree space in which u can specifiy the size of the cell...both this spaces can be used as a unique partition method. One other method would be to construct yourself simple spaces for the each partition u have in your game and attach physical objects to one or the other physical space created
Physx should have smth close to this also thou i dont have the experience nor with Bullet