Your favorite physics library?

Anything and everything that's related to OGRE or the wider graphics field that doesn't fit into the other forums.

Your favorite physics library?

Postby Zeal » Thu Jan 04, 2007 8:52 am

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?
User avatar
Zeal
Ogre Magi
 
Posts: 1260
Kudos: 0
Joined: 07 Aug 2006
Location: Colorado Springs, CO USA

Postby Alexander » Thu Jan 04, 2007 9:06 am

I think there's been several posts on this subject. Maybe check those out?
User avatar
Alexander
Gremlin
 
Posts: 175
Kudos: 0
Joined: 05 Aug 2006

Postby Zeal » Thu Jan 04, 2007 10:17 am

Kinda, however ive had trouble finding a direct comparison between the two (or three). I know everyone has their favorite, I would just like some more info on the differences ect...
User avatar
Zeal
Ogre Magi
 
Posts: 1260
Kudos: 0
Joined: 07 Aug 2006
Location: Colorado Springs, CO USA

Postby Kentamanos » Thu Jan 04, 2007 11:09 am

Physics library holy war in 3...2...1...

:)
User avatar
Kentamanos
Minaton
 
Posts: 980
Kudos: 0
Joined: 07 Aug 2004
Location: Dallas, TX

Postby Kojack » Thu Jan 04, 2007 11:20 am

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. :)
User avatar
Kojack
OGRE Moderator
OGRE Moderator
 
Posts: 7127
Kudos: 516
Joined: 25 Jan 2004
Location: Brisbane, Australia

Postby hrusi » Thu Jan 04, 2007 11:31 am

My favourite is Bullet, because it is well designed.
hrusi
Gnoblar
 
Posts: 6
Kudos: 0
Joined: 01 Feb 2006

Postby syedhs » Thu Jan 04, 2007 11:57 am

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 :)
User avatar
syedhs
Silver Sponsor
Silver Sponsor
 
Posts: 2700
Kudos: 48
Joined: 29 Aug 2005
Location: Kuala Lumpur, Malaysia

Postby sinbad » Thu Jan 04, 2007 12:06 pm

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 ;)
User avatar
sinbad
OGRE Retired Team Member
OGRE Retired Team Member
 
Posts: 19261
Kudos: 69
Joined: 06 Oct 2002
Location: Guernsey, Channel Islands

Postby Kojack » Thu Jan 04, 2007 2:00 pm

Oh, and the Bullet docs say that a C# XNA version (ie. xbox live arcade kind of thing) is planned. It's also got gpu based physics as an addon.
User avatar
Kojack
OGRE Moderator
OGRE Moderator
 
Posts: 7127
Kudos: 516
Joined: 25 Jan 2004
Location: Brisbane, Australia

Postby detox » Thu Jan 04, 2007 2:56 pm

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.
User avatar
detox
Greenskin
 
Posts: 103
Kudos: 0
Joined: 07 Sep 2006
Location: Ohio, USA

Postby Zeal » Thu Jan 04, 2007 11:31 pm

Also forget PhysX. It's binary only, you can't port it. For about $50000 you can get an xbox 360 version though.


Ouch even under their 'new' license its still that bad?

I guess that leaves ODE or Bullet. I always wanted to use ODE, it seems like its been around forever and is pretty feature rich...
User avatar
Zeal
Ogre Magi
 
Posts: 1260
Kudos: 0
Joined: 07 Aug 2006
Location: Colorado Springs, CO USA

Postby JohnJ » Fri Jan 05, 2007 3:06 am

Ouch even under their 'new' license its still that bad?

No, you only have to pay if you are developing for a platform like xbox. Otherwise PhysX is free.

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)?
User avatar
JohnJ
OGRE Expert User
OGRE Expert User
 
Posts: 975
Kudos: 4
Joined: 04 Aug 2005
Location: Santa Clara, California

Postby Zeal » Fri Jan 05, 2007 3:45 am

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?
User avatar
Zeal
Ogre Magi
 
Posts: 1260
Kudos: 0
Joined: 07 Aug 2006
Location: Colorado Springs, CO USA

Postby JohnJ » Fri Jan 05, 2007 3:58 am

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?

According to Ageia, PhysX is free for:
* 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

So it looks like Ageia is also free for PS3.

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?

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.
User avatar
JohnJ
OGRE Expert User
OGRE Expert User
 
Posts: 975
Kudos: 4
Joined: 04 Aug 2005
Location: Santa Clara, California

Postby Kojack » Fri Jan 05, 2007 4:27 am

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).
User avatar
Kojack
OGRE Moderator
OGRE Moderator
 
Posts: 7127
Kudos: 516
Joined: 25 Jan 2004
Location: Brisbane, Australia

Postby irrdev » Fri Jan 05, 2007 6:55 am

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 :arrow: http://ox.slug.louisville.edu/~o0lozi01/opal_wiki/index.php/Main_Page

<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
User avatar
irrdev
Orc
 
Posts: 420
Kudos: 0
Joined: 15 Oct 2006

Postby Zeal » Sun Jan 07, 2007 1:00 am

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
User avatar
Zeal
Ogre Magi
 
Posts: 1260
Kudos: 0
Joined: 07 Aug 2006
Location: Colorado Springs, CO USA

Postby eugen » Sun Jan 07, 2007 9:28 am

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
User avatar
eugen
OGRE Expert User
OGRE Expert User
 
Posts: 1422
Kudos: 8
Joined: 22 May 2004
Location: Bucharest


Return to General Discussion

Who is online

Users browsing this forum: Bing [Bot] and 5 guests