Physics Engine Interface

Introduce your project and write about your work.

Moderator: PPS-Leaders

User avatar
1337
Baron Vladimir Harkonnen
Posts: 521
Joined: Wed Oct 10, 2007 7:59 am

Physics Engine Interface

Post by 1337 » Mon Oct 13, 2008 4:26 pm

This thread is supposed to be a blog-like journal towards developing an interface to the Open Dynamics Engine (ODE).

I'll start by adding some information about library versions.
Checking ubuntu and debian packages gave the following results:
- Ubuntu uses v0.9 which is quite new
- Debian offers v0.5 which is about 4 years old.
- Current development is v0.10.1

Now if we want to use OgreODE, an interface to Ogre, we have no other choice but to use ODE v0.10 or later. Maybe 0.9 works, but there's no svn tag for that.

Furthermore I would like to add that OgreODE is well documented if you count the source code as documentation... No, seriously, if we want to use it, we'll have to reprogram some things and read a lot of code.
The alternative is using ODE directly. But I cannot give any information about theses version since checking it out thoroughly will take me another week or so. I'm not even sure what exactly OgreODE does.

About compiling: ODE was no problem. However I've still got 2 unresolved symbols with OgreODE, but that's because I haven't set the ODEConfig correctly yet. This also yields another problem: What options were use when building the debian/ubuntu packages?

So much about physics.
I'm sure Martin can tell you more soon ;)
http://www.xkcd.com/
A webcomic of romance, sarcasm, math, and language.

User avatar
1337
Baron Vladimir Harkonnen
Posts: 521
Joined: Wed Oct 10, 2007 7:59 am

Post by 1337 » Mon Oct 13, 2008 7:02 pm

A little Update:

It seems like OgreODE is only 64 bit compatible since April 08. But in the same commits they also updated to ODE v0.10 from a yet unknown version (probably of older date, the last rev before was Oct 07).
So if we want 64 bit compatibility, we need the up-to-date OgreODE version.

In the mean time I also checked tardis: v0.9 is installed.

Furthermore I strongly encourage to use the most up-to-date OgreODE version because even that may only be an alpha-version...

If anyone would like to write an interface to ODE on his own, that person is of course welcome to do so. It does sound very tempting... Martin?
Alternatively, we have to include both ODE and OgreODE into our repository. Whether you like it or not...
http://www.xkcd.com/
A webcomic of romance, sarcasm, math, and language.

User avatar
1337
Baron Vladimir Harkonnen
Posts: 521
Joined: Wed Oct 10, 2007 7:59 am

Post by 1337 » Mon Oct 13, 2008 7:49 pm

Blogging more:

Adi just told me, that debian also has version 0.9 of ODE. That of course diminishes our problems by a large factor.

To improve the good news I have to add that the current (HEAD - 2 because HEAD is for Ogre 1.6) OgreODE version can be built against ODE 0.9 too with a few lines of changes (should not be a problem). I'm going to try that tomorrow.

I also found the lost tag for v0.9: 19 Oct 2007 (r1290, 1558 is current). I should be able to have that version up and compiling very soon since I only need to update the trunk to the right revision. Then I can check. And when everything works, I shall start doing the same in CMake to be cross platform. Due to simplicity I'm currently only working with Visual Studio (which I know quite well..).
http://www.xkcd.com/
A webcomic of romance, sarcasm, math, and language.

User avatar
1337
Baron Vladimir Harkonnen
Posts: 521
Joined: Wed Oct 10, 2007 7:59 am

Post by 1337 » Tue Oct 14, 2008 4:06 pm

Very well: It compiles under tardis and on my home.
The OgreODE version in our repository is almost identical to the HEAD revision in the OgreAddons SVN. I had to modify the files a little bit so that they compiles with Ogre 1.4/1.6 and ODE 0.9/0.10, but that only yielded about 10 #defines. Shouldn't be too bad.
I also changed a few constructors to remove gcc warnings and inserted two or three explicit conversions...
http://www.xkcd.com/
A webcomic of romance, sarcasm, math, and language.

User avatar
beni
Baron Vladimir Harkonnen
Posts: 949
Joined: Tue Oct 03, 2006 9:15 am
Location: Zurich
Contact:

Post by beni » Tue Oct 14, 2008 5:56 pm

Very nice development of events I gotta say. Using OgreODE will probably give us some more insight into Ogre and we'll be able to benefit more from that engine. It's also very nice to see that OgreODE is well maintained, as far as I gather from your comments on this. With a very well maintained library it's like outsourcing our efforts. Open source is just great :D.
"I'm Commander Shepard and this is my favorite forum on the internet."

User avatar
1337
Baron Vladimir Harkonnen
Posts: 521
Joined: Wed Oct 10, 2007 7:59 am

Post by 1337 » Wed Oct 15, 2008 8:23 am

beni wrote:Very nice development of events I gotta say. Using OgreODE will probably give us some more insight into Ogre and we'll be able to benefit more from that engine. It's also very nice to see that OgreODE is well maintained, as far as I gather from your comments on this. With a very well maintained library it's like outsourcing our efforts. Open source is just great :D.
That thing about "well maintained" is not exactly true. Twice a year someone seems to work on it. I don't call that well maintained. But we can be glad to have OgreOde since otherwise it would be a lot more work to have physics.
But basically it only works with Ogre::Entity, SceneManager and SceneNode for the public interface. So we won't learn a lot about Ogre with OgreOde.


Some more blogging:

There was quite a chaos with the header files (Ogre.h was included everywhere per default for instance). I was able to reduce tardis compile time (with one thread) by 45%! And that's just because I only included the necessary header files.

And of course I was very tempted to test the physics engine. So had a look at the first tutorial, inserted the code and media files, and it actually worked. It's only a crate falling "in" a ground because there is no collision detection yet. But there's also a tutorial on that. The rest is up to reading the source code...
First Basic Tutorial
Collision Tutorial
http://www.xkcd.com/
A webcomic of romance, sarcasm, math, and language.

User avatar
1337
Baron Vladimir Harkonnen
Posts: 521
Joined: Wed Oct 10, 2007 7:59 am

Post by 1337 » Fri Oct 17, 2008 9:42 am

While looking into the Bullet engine after all, I found this:
http://www.motorsport-sim.org/index.php ... iew&tsk=43

There's also some other mentioning of ODE vs. Bullet. The main conclusion is that the ODE code is more mature and probably more stable. On the other side, Bullet evolves faster and already has more features than ODE.

In the ogreaddons SVN I found an interface to Ogre called OgreBullet.
The Bullet library itself however cannot be found either as debian nor as ubuntu package. So we would be forced to integrate it into the svn repository directly..

When I've got time, I shall look into Bullet too.
http://www.xkcd.com/
A webcomic of romance, sarcasm, math, and language.

User avatar
beni
Baron Vladimir Harkonnen
Posts: 949
Joined: Tue Oct 03, 2006 9:15 am
Location: Zurich
Contact:

Post by beni » Fri Oct 17, 2008 11:04 am

Contact Christoph (Chrigi) Renner about Bullet. You'll find his email address easily. As you may know he himself works on a game of his own. He just dropped ODE and changed to Bullet and is now working on the integration of Bullet into his engine. He may be able to tell you stuff that helps you.
"I'm Commander Shepard and this is my favorite forum on the internet."

User avatar
1337
Baron Vladimir Harkonnen
Posts: 521
Joined: Wed Oct 10, 2007 7:59 am

Post by 1337 » Fri Oct 17, 2008 12:57 pm

ok, thanks very much. That could help us to make a leap towards choosing the physics engine. I've just sent him an email.
http://www.xkcd.com/
A webcomic of romance, sarcasm, math, and language.

User avatar
1337
Baron Vladimir Harkonnen
Posts: 521
Joined: Wed Oct 10, 2007 7:59 am

Post by 1337 » Sat Oct 18, 2008 7:11 am

a little Update on Bullet:
I've managed to compile the demo suite (just hit "build" ^^).
And the scenes are quite impressive when you look at the physics, especially the soft body simulations.

What I wanted to say was something about the library itself: It does not support dynamic linking for windows (maybe mingw). But as far as I can say, this shouldn't matter at all, static linking works too.
http://www.xkcd.com/
A webcomic of romance, sarcasm, math, and language.

User avatar
1337
Baron Vladimir Harkonnen
Posts: 521
Joined: Wed Oct 10, 2007 7:59 am

Post by 1337 » Mon Oct 20, 2008 7:10 pm

Good news: Bullet and OgreBullet compile both on my box and tardis. I've cautiously used static linking to avoid circular dependency problems that might occur (I've had a look at the heades).

The real problem now is to get an example working.
http://www.xkcd.com/
A webcomic of romance, sarcasm, math, and language.


MartinS
Human Space Navy Private
Posts: 3
Joined: Tue Sep 30, 2008 12:05 pm

Post by MartinS » Tue Oct 28, 2008 11:08 am

Was working on that HelloWorld thing for quite moment, can't bring it down to a good error-free compile. Any suggestions?

User avatar
1337
Baron Vladimir Harkonnen
Posts: 521
Joined: Wed Oct 10, 2007 7:59 am

Post by 1337 » Tue Oct 28, 2008 3:45 pm

I shall have a look into it this evening. I might have time between 9pm and 2am. However I cannot promise success.

I'm sorry that I couldn't yet look into your code, but I had some other work on my shoulder.

EDIT: I've just tried to compile HelloWorld.cc. No problem at all. Have you committed your current work?
http://www.xkcd.com/
A webcomic of romance, sarcasm, math, and language.

MartinS
Human Space Navy Private
Posts: 3
Joined: Tue Sep 30, 2008 12:05 pm

Post by MartinS » Wed Oct 29, 2008 3:01 pm

Okay, was a very productive afternoon. Bullet can now be used out of Ogre, and a small test works good. Just a falling box, but nevertheless a small success.

Next step is creating the physical object.

Post Reply

Who is online

Users browsing this forum: No registered users and 4 guests