Physics engines

Anything and everything that's related to OGRE or the wider graphics field that doesn't fit into the other forums.
CaptainPicard
Gnoblar
Posts: 14
Joined: Sun Jan 03, 2010 2:21 am

Physics engines

Post by CaptainPicard »

I'm at the point in my tinkering with Ogre that I'd like to do add some physics.

I used ODE some years back, and with a lot of work managed to get decent results. Back then it was ODE vs Newton. Not it seems that ODE is dead and it is now Newton vs Bullet vs PhysX vs Havok (I'm amazed the last two now have "free" versions). I've searched and searched these forums and elsewhere for a comparison, but I can't find any. So far I've decided that I don't want to mess with PhysX for a few reasons.

Does anyone have any advice for choosing between Havok, Newton, and Bullet? I know that it is suggested to test them all out, but I'm still hoping to hear from those with experience. I get the feeling that initial tests will show that all handle stacked boxes and rolling spheres very nicely and that I won't find out major problems until my application gets more complex.

Thank you,

Jean-Luc Picard
Captain, USS Enterprise
User avatar
jacmoe
OGRE Retired Moderator
OGRE Retired Moderator
Posts: 20570
Joined: Thu Jan 22, 2004 10:13 am
Location: Denmark
x 179
Contact:

Re: Physics engines

Post by jacmoe »

*sigh* :)

This *was* discussed recently, so you should be able to apply what was said in this topic:
http://www.ogre3d.org/forums/viewtopic. ... 07&start=0

This question is like a clock-work. It ticks each and every month (AFAIK) :wink:
/* Less noise. More signal. */
Ogitor Scenebuilder - powered by Ogre, presented by Qt, fueled by Passion.
OgreAddons - the Ogre code suppository.
CaptainPicard
Gnoblar
Posts: 14
Joined: Sun Jan 03, 2010 2:21 am

Re: Physics engines

Post by CaptainPicard »

I already saw that thread, and it is what helped me decide against PhysX. The thread was two months ago, and with Havok's new Indie program starting a month ago, I thought that the news might have raised awareness and influenced some people to try it over the past month. There was some positive info about Bullet, but I'm hoping for more information.
User avatar
xavier
OGRE Retired Moderator
OGRE Retired Moderator
Posts: 9481
Joined: Fri Feb 18, 2005 2:03 am
Location: Dublin, CA, US
x 22

Re: Physics engines

Post by xavier »

Havok's new indie program? Something I hadn't heard about?

That said, I've been extremely happy with Havok, new indie program or not. I'd use Bullet but as yet it has nowhere near the features or integrated tools support that Havok has (sorry Erwin :().
Do you need help? What have you tried?

Image

Angels can fly because they take themselves lightly.
User avatar
Kojack
OGRE Moderator
OGRE Moderator
Posts: 7157
Joined: Sun Jan 25, 2004 7:35 am
Location: Brisbane, Australia
x 534

Re: Physics engines

Post by Kojack »

There's some debate on the indie-ness of the havok indie thing. The first indie to join the program is Krome Studios, Australia's largest game developer with 400 employees across 3 cities.

Discussion on it: http://www.rockpapershotgun.com/2009/12 ... programme/

From what I can find so far, basically an indie company can get free access to all the havok tools (destruction, behaviour, etc, the ones which aren't included in the intel sponsored free havok) to work on as many internal prototypes as they want. But before releasing a title, they have to go through the standard $$$$$$$$$$$$$$$$ licensing.
Similar to Fmod, where it's free until you actually release, then you have to pay for the license.
User avatar
xavier
OGRE Retired Moderator
OGRE Retired Moderator
Posts: 9481
Joined: Fri Feb 18, 2005 2:03 am
Location: Dublin, CA, US
x 22

Re: Physics engines

Post by xavier »

Hmm. Not sure the point, really, other than "my company may fold before we release so no point spending the money in advance"...that said, the program itself is rather short on public details, unless there is more info available beyond the press release...
Do you need help? What have you tried?

Image

Angels can fly because they take themselves lightly.
ecoumans
Kobold
Posts: 39
Joined: Mon Sep 12, 2005 10:07 am
Location: San Francisco
x 4
Contact:

Re: Physics engines

Post by ecoumans »

xavier wrote: That said, I've been extremely happy with Havok, new indie program or not. I'd use Bullet but as yet it has nowhere near the features or integrated tools support that Havok has (sorry Erwin :().
Bullet is under active development, is open source and its Zlib license is very similar to Ogre's new MIT license. We are eager to get more feedback.
xavier, what features would you like to see most? (I assume we stick to physics, and ignore other Havok products such as animation, artificial intelligence etc)

CaptainPicard, what modeler do you plan to use to author your physics?
Bullet has better Blender tools support than Havok (see http://gamekit.googlecode.com), and the upcoming .bullet file format should improve tool compatibility and support for other modelers.

If you are using Maya, we are currently improving our open source Dynamica plugin. Also for Max and Maya you can use the Havok tools in combination with the hkx2dae converter and import this using the BulletColladaConverter.

Thanks,
Erwin
User avatar
xavier
OGRE Retired Moderator
OGRE Retired Moderator
Posts: 9481
Joined: Fri Feb 18, 2005 2:03 am
Location: Dublin, CA, US
x 22

Re: Physics engines

Post by xavier »

ecoumans wrote: xavier, what features would you like to see most? (I assume we stick to physics, and ignore other Havok products such as animation, artificial intelligence etc)
The features to which I refer are animation, unfortunately, and the animation-physics integration (ragdoll integration for example).
Do you need help? What have you tried?

Image

Angels can fly because they take themselves lightly.
ecoumans
Kobold
Posts: 39
Joined: Mon Sep 12, 2005 10:07 am
Location: San Francisco
x 4
Contact:

Re: Physics engines

Post by ecoumans »

xavier wrote:The features to which I refer are animation, unfortunately, and the animation-physics integration (ragdoll integration for example).
We will provide some nice examples integrating Bullet ragdolls with Ogre animation. You can track progress in this GameKit issue.

Although more of an Ogre than Bullet topic, what are the most important features missing from the Ogre 1.7 animation system, compared to Havok Animation?
Thanks,
Erwin
CaptainPicard
Gnoblar
Posts: 14
Joined: Sun Jan 03, 2010 2:21 am

Re: Physics engines

Post by CaptainPicard »

xavier wrote:Havok's new indie program? Something I hadn't heard about?
Yeah, they started this indie program in early December, although, as Kojack said, 400 doesn't sound particularly indie.
ecoumans wrote:CaptainPicard, what modeler do you plan to use to author your physics?
I intend to use blender. This is a dumb question, but could I use Bullet as a general solution for collisions? I intend to have a world that is a terrain with a number of poly-soup type meshes that would be a pain to make into spheres/boxes. What about large interiors?
ecoumans
Kobold
Posts: 39
Joined: Mon Sep 12, 2005 10:07 am
Location: San Francisco
x 4
Contact:

Re: Physics engines

Post by ecoumans »

Blender has build-in Bullet, and you can assign collision properties to objects. For static environment, you can choose concave triangle mesh. The bParse .blend file reader in GameKit can extract this collision info, as well as rigid body constraints etc.

Bullet automatically builds acceleration structures (broadphase collision based on axis aligned bounding boxes, and tree structures for concave triangle meshes, btBvhTriangleMeshShape.

If you run into any issue with extracting info from a .blend file, file an issue in the GameKit tracker.
Cheers,
Erwin
User avatar
xavier
OGRE Retired Moderator
OGRE Retired Moderator
Posts: 9481
Joined: Fri Feb 18, 2005 2:03 am
Location: Dublin, CA, US
x 22

Re: Physics engines

Post by xavier »

ecoumans wrote:
xavier wrote:The features to which I refer are animation, unfortunately, and the animation-physics integration (ragdoll integration for example).
We will provide some nice examples integrating Bullet ragdolls with Ogre animation.
We find Havok's animation support much more complete than Ogre's. Features we use (not in order of importance):

* additive skeletal animation
* skeletal LoD
* IK targeting and blending
* motion extraction
* blended manual manipulation of individual bones in an animation (simply not possible in Ogre at present, to be able to let a bone be animated as well as add manual rotations to it)
* multiple types of compression choice in the pipeline
* tight integration with ragdolling setup in the toolchain
* Behavior support (for those that choose to license it)

You know as well as anyone that it's just as much about tools (if not more) as it is technical features, and when the tools are tightly integrated with the runtime you get not only productive artists, but correct exports (more productive "everyone else", in other words). I have to say that the number of moving parts involved in Bullet and tools and animation systems, is really a turnoff for me. With Havok I don't have to spend extra time supporting N different parts in a toolchain; the artists simply create and check in their exports and I don't have to touch a thing.
Do you need help? What have you tried?

Image

Angels can fly because they take themselves lightly.
User avatar
jacmoe
OGRE Retired Moderator
OGRE Retired Moderator
Posts: 20570
Joined: Thu Jan 22, 2004 10:13 am
Location: Denmark
x 179
Contact:

Re: Physics engines

Post by jacmoe »

[DISCLAIMER: The following is completely rubbish, should never have been written and is not representative of how Jacmoe, or the rest of the Ogre community for that matter, feels towards AlexJC and AiGameDev.com]
AlexJC from http://aigamedev.com/ did some modifications to Ogre to make it easier for Ogre animations to be used in AI.
Sadly, he's kept those changes to himself, due to the GameAI code being proprietary.
I should probably sue him on behalf of the Ogre team. He was using Shoggoth which is LGPL'ed. :wink:

Here's an overview of some of the features:
http://aigamedev.com/open/tutorials/har ... -insights/
I can't really remember *exactly* what those changes were, but is has something to do with scaling animations and blending them to make a convincing animation from one point to another.
/* Less noise. More signal. */
Ogitor Scenebuilder - powered by Ogre, presented by Qt, fueled by Passion.
OgreAddons - the Ogre code suppository.
User avatar
jacmoe
OGRE Retired Moderator
OGRE Retired Moderator
Posts: 20570
Joined: Thu Jan 22, 2004 10:13 am
Location: Denmark
x 179
Contact:

Re: Physics engines

Post by jacmoe »

[DISCLAIMER: The following is completely rubbish, should never have been written and is not representative of how Jacmoe, or the rest of the Ogre community for that matter, feels towards AlexJC and AiGameDev.com]
It's built on top of an open-source stack, but with key parts built from scratch (e.g. the MVC framework) or heavily customized (e.g. animation system, test framework).
The heavily customized animation system sounds like something he really should have contributed back, doesn't it?
/* Less noise. More signal. */
Ogitor Scenebuilder - powered by Ogre, presented by Qt, fueled by Passion.
OgreAddons - the Ogre code suppository.
ecoumans
Kobold
Posts: 39
Joined: Mon Sep 12, 2005 10:07 am
Location: San Francisco
x 4
Contact:

Re: Physics engines

Post by ecoumans »

I have to say that the number of moving parts involved in Bullet and tools and animation systems, is really a turnoff for me. With Havok I don't have to spend extra time supporting N different parts in a toolchain; the artists simply create and check in their exports and I don't have to touch a thing.
The original poster intends to use Blender, and as far as I know Havok doesn't provide any toolchain for that. Bullet does, without 'moving parts'.
Thanks for reporting the Ogre animation short comings. Are those reported in some issue tracker so that someone eventually improves the animation system?
I should probably sue him on behalf of the Ogre team. He was using Shoggoth which is LGPL'ed
Suing is a last resort, have you contacted him about his LGPL violation? If he doesn't repond after a while, just put the LGPL violation with his full name, email address/website on the Ogre frontpage.

Cheers,
Erwin
User avatar
jacmoe
OGRE Retired Moderator
OGRE Retired Moderator
Posts: 20570
Joined: Thu Jan 22, 2004 10:13 am
Location: Denmark
x 179
Contact:

Re: Physics engines

Post by jacmoe »

I was joking - but I think I'll contact him anyway. :)
Would be interesting to see if it could be incorporated into Ogre somehow.
[DISCLAIMER: The following is completely rubbish, should never have been written and is not representative of how Jacmoe, or the rest of the Ogre community for that matter, feels towards AlexJC and AiGameDev.com]
(But it seems to be a violation, yes).
/* Less noise. More signal. */
Ogitor Scenebuilder - powered by Ogre, presented by Qt, fueled by Passion.
OgreAddons - the Ogre code suppository.
User avatar
Kojack
OGRE Moderator
OGRE Moderator
Posts: 7157
Joined: Sun Jan 25, 2004 7:35 am
Location: Brisbane, Australia
x 534

Re: Physics engines

Post by Kojack »

GameAI has a customised version of ogre as an ai sandbox tool. To get the tool you have to pay.
But does the paid premium membership give you source as well? if it does, then he hasn't violated lgpl. The lgpl allows him to only give source code to people who pay him for a copy of the tool, but any of those people are then free to give out the modified ogre source to the rest of us. You can't demand the source code for something he hasn't distributed to you.
User avatar
jacmoe
OGRE Retired Moderator
OGRE Retired Moderator
Posts: 20570
Joined: Thu Jan 22, 2004 10:13 am
Location: Denmark
x 179
Contact:

Re: Physics engines

Post by jacmoe »

As a Premium Member (not anymore though, due to financial reasons), I have a copy of it. :wink:
Didn't see anything there.
/* Less noise. More signal. */
Ogitor Scenebuilder - powered by Ogre, presented by Qt, fueled by Passion.
OgreAddons - the Ogre code suppository.
User avatar
Kojack
OGRE Moderator
OGRE Moderator
Posts: 7157
Joined: Sun Jan 25, 2004 7:35 am
Location: Brisbane, Australia
x 534

Re: Physics engines

Post by Kojack »

So you got the ai sandbox thingy but no modified ogre source? Then you can request it, and if he doesn't give it out, it's naughty.

It's interesting that the premium membership page says that as a bonus for signing up, you'll get a copy of the Recast nav mesh library. Umm, Recast is already free under the MIT license, that's not exactly a good incentive to pay money.
User avatar
jacmoe
OGRE Retired Moderator
OGRE Retired Moderator
Posts: 20570
Joined: Thu Jan 22, 2004 10:13 am
Location: Denmark
x 179
Contact:

Re: Physics engines

Post by jacmoe »

It was only publicly released as such a long while after it was made available for Premium Members.
It was good money for early access to that fine lib. :)
/* Less noise. More signal. */
Ogitor Scenebuilder - powered by Ogre, presented by Qt, fueled by Passion.
OgreAddons - the Ogre code suppository.
User avatar
jacmoe
OGRE Retired Moderator
OGRE Retired Moderator
Posts: 20570
Joined: Thu Jan 22, 2004 10:13 am
Location: Denmark
x 179
Contact:

Re: Physics engines

Post by jacmoe »

Kojack wrote:So you got the ai sandbox thingy but no modified ogre source? Then you can request it, and if he doesn't give it out, it's naughty.
I checked: Precompiled Ogre dependencies, headers - no source.
I'll send him an email later.
This was the AI sandbox 0.9.
/* Less noise. More signal. */
Ogitor Scenebuilder - powered by Ogre, presented by Qt, fueled by Passion.
OgreAddons - the Ogre code suppository.
User avatar
madmarx
OGRE Expert User
OGRE Expert User
Posts: 1671
Joined: Mon Jan 21, 2008 10:26 pm
x 50

Re: Physics engines

Post by madmarx »

Strange, because I got the source of the aigamedev motion graph system. But never used it.
Tutorials + Ogre searchable API + more for Ogre1.7 : http://sourceforge.net/projects/so3dtools/
Corresponding thread : http://www.ogre3d.org/forums/viewtopic. ... 93&start=0
User avatar
tuan kuranes
OGRE Retired Moderator
OGRE Retired Moderator
Posts: 2653
Joined: Wed Sep 24, 2003 8:07 am
Location: Haute Garonne, France
x 4
Contact:

Re: Physics engines

Post by tuan kuranes »

@jacmoe: alexjc didn't change anything in Ogre. For he wrote a motion graph that directly drives each bone, in its own code.

@Erwin: "Ogre animation short comings" are well known. Problem is, Ogre is a 3d engine, not a Game Engine, and animation is a topic on its own.
Note that Ogre team tried several times to allocate resources on it (google summer of code), but that didn't give results as the subject too wide/complex forthat.

That said, I'm convinced now that Ogre should only be responsible to apply bone matrices to the mesh using skeleton data.
Animation of those matrices should be plugins outside of Ogre.
Everything else is to be moved into a "user-side" plugin that does motion graph, motion database, motion compression, motion quantisation, IK, procedural motion, physics handling etc...
Reading papers on the topic clearly enforce this, a good example is here.

That's what alexjc tries to do, using Bullet and Ogre but it's own motion graph code.
User avatar
jacmoe
OGRE Retired Moderator
OGRE Retired Moderator
Posts: 20570
Joined: Thu Jan 22, 2004 10:13 am
Location: Denmark
x 179
Contact:

Re: Physics engines

Post by jacmoe »

tuan kuranes wrote:@jacmoe: alexjc didn't change anything in Ogre. For he wrote a motion graph that directly drives each bone, in its own code..
You are linking to some old code. :)
I am referring to code from 2009, and I clearly remember him mentioning having to change some bits of Ogre to allow some features of the Sandbox 0.9 (IIRC) animation system.
But it's not important.

[DISCLAIMER: The following is completely rubbish, should never have been written and is not representative of how Jacmoe, or the rest of the Ogre community for that matter, feels towards AlexJC and AiGameDev.com]
What I really don't like about the stuff he's doing is that it's not really open. It's proprietary and closed, not open and sharing.
Sure, I enjoyed being a premium member, but I'd rather concentrate on less restricted communities.
The code in the sandbox is for your personal research and education only.
But, if you have the money, you can buy a commercial license.
That really left me disappointed.

(I wouldn't mind becoming a member again, it's not that, but it could be better.)

However, that Mikko Mononen released Recast navigation under the MIT license - that is sharing. :D
For the benefit of everyone.
Like what Erwin Coumanns, Pierre Terdiman and John Ratcliff and others are doing.
That's inspiring. :)

But I'll ask Alex if he really did make mods to Ogre - but I am not really sure if it's going to be useful for anyone. :wink:
/* Less noise. More signal. */
Ogitor Scenebuilder - powered by Ogre, presented by Qt, fueled by Passion.
OgreAddons - the Ogre code suppository.
cyrfer
Orc
Posts: 424
Joined: Wed Aug 01, 2007 8:13 pm
Location: Venice, CA, USA
x 7

Re: Physics engines

Post by cyrfer »

tuan kuranes wrote: That said, I'm convinced now that Ogre should only be responsible to apply bone matrices to the mesh using skeleton data.
Animation of those matrices should be plugins outside of Ogre.
Everything else is to be moved into a "user-side" plugin that does motion graph, motion database, motion compression, motion quantisation, IK, procedural motion, physics handling etc...
Reading papers on the topic clearly enforce this, a good example is here.

That's what alexjc tries to do, using Bullet and Ogre but it's own motion graph code.
I am trying to make steps toward having animations play along with ragdoll, or at least switch between the two concepts. I agree that things would be easier if the animation code was not buried in OGRE and a class that computed the blending was provided for the client code. To test ragdoll, I am looking at bridging Bullet with OGRE. I assume I will need to have code that assigns the orientation of each bone in the resulting Bullet skeleton pose to each bone in the OGRE skeleton. This seems like an ideal place to have the 2 systems share memory. I'm also wondering if I can pull off GPU skinning with bone orientations calculated by Bullet.
Post Reply