OgreBullet with the CVS Head Ogre and Bullet 2.63...

Chaster

19-09-2007 12:11:42

UPDATE: OgreBullet works with Bullet 2.63 (I just tested yesterday).

UPDATE: I have updated OgreBullet working with Shoggoth (CVS Head) and Bullet 2.62. I am e-mailing new .cpp & .h files to tuan so he can integrate into CVS (& release new SDK).

It seems to me that OgreBullet is not being actively maintained (at least, not in the CVS). Since I am planning on using Bullet (unless it proves to not be up to the task) for my project, and I want to use the latest Bullet (2.61 as of this writing) I am going to attempt to tackle updating OgreBullet to work with both the latest CVS Head source for Ogre and Bullet 2.61.

If it all works out okay, I will also add in the patches I see scattered about here in the Ogrebullet forum.

If all of THAT works out okay, would it be okay for me to have CVS commit access to the OgreBullet CVS so I could share these updates/changes?

Chaster

tuan kuranes

19-09-2007 15:33:54

I would gladly give you CVS access.

But if using ogre HEAD, try to make sure you place "ifdef" on incompatible code, as it should compile out of the box on both Eihort AND Shoggoth.

I would not recommend CVSbranching as lot of user has hard time to handle that... (talking from experience here.)

Chaster

20-09-2007 03:50:26

I would gladly give you CVS access.

But if using ogre HEAD, try to make sure you place "ifdef" on incompatible code, as it should compile out of the box on both Eihort AND Shoggoth.

I would not recommend CVSbranching as lot of user has hard time to handle that... (talking from experience here.)


Hmmm, that may be a bit difficult since I work exclusively with Shoggoth (crazy, I know..)... Well, let's just wait until I actually get something working before we talk about CVS access... It's still premature... But thanks for being open to the idea!

Chaster

Chaster

21-09-2007 04:49:25

*Update*

Well, that wasn't so bad. I got it to compile and run successfully using the latest Ogre CVS Head (and I mean LATEST - did a full update yesterday) and version 2.61 of Bullet. So far, I have #ifdef'd all my changes so it will not break older stuff (fingers crossed). I am now proceeding to add 6 of the patches/improvements that were given on this forum by other people. I am not adding the multi-threading code that someone posted because I'm not sure it's a good idea...

Some notes:

The CVS VC8 .SLN/project files were a bit incomplete (missing some .cpp references necessary) and I did a bit of wrangling to get it to compile (had to create a few directories, copy paste some files, eidt some .cfg files)... Nothing terrible, but you might want to look into it Tuan... It's definitely not a compile right outta the box situation for the CVS code as is..

The demo code has some graphical problems - but they're mostly because of out-of-date shaders (I get lots of shader compile errors) and some other minor errors.. Everything works, it just doesn't look as nice as it should..

I'll post an update when I've finished integrating all the patches/improvements, which should be quite soon.

Chaster

beaugard

21-09-2007 12:35:20

Great news! First the PZCSM and now this - you are becoming quite a cornerstone of the Ogre community.

... and yes, don't add the multithreading patches. It would be a major change, plus we don't know how well Bullets own multicore tech will work - maybe there's no need. At the level it's written I think it's best to integrate into ones own framework anyhow.

Chaster

21-09-2007 18:50:57

UPDATE:

It's done. I have OgreBullet now working with Bullet 2.61 and Shoggoth (CVS Head). All changes to make OgreBullet work with Shoggoth were encapsulated in #if/#endif blocks which check that the OGRE_VERSION define is 1.5.0 or greater (shoggoth) so it should still work for all of you who are using Eihort without having to change anything.

I have also applied the following patches/fixes/changes to OgreBullet:

1) Added Severin's fix for ray casting and using that fix in the constructor of
btCollisionWorld::ClosestRayResultCallback and OgreBulletCollisions::CollisionsWorld when the ray is launched.

2) Added rTi's implementation of ConeTwistConstraints.

3) Added fix for HingeConstraint compilation on Mac/MinGW from gugus & rti...

4) Added fix for Ogre::Quaternion to(const btQuaternion &Q) function as submitted by Gunwizard

5) Added fix for transformation of line coordinates in CollisionShape::drawConvexWireFrame() function as submitted by Gunwizard

6) Added Beaugard's fix for object destructor leaving a reference (added removeObject() function).

7) Added Beaugard's constructor for MeshToShapeConverter to create using a Renderable instead of an Entity.

Some notes:

Shoggoth has a new pure virtual for Movables called "visitRenderables(Renderable::Visitor* visitor, bool debugRenderables)". I had to implement this function in a couple objects of OgreBullet, but right now, the function does nothing as I don't know/understand what it is supposed to do. As far as I can tell, things work okay as is, but perhaps someone who knows more about this function can shed light on it (and apply any fixes necessary)..

So, where/how do I submit this to get it back into the CVS? I'm not going to include my VC8 .sln or .project files because I had to change those significantly to get them to work with my directory structure (and actually, they still don't work 100%, I have to do some manual copying/pasting...blech).. I will just submit the modified .h and .cpp files (which include a couple new ones for the ConeTwistConstraint interface).

Chaster

erwincoumans

21-09-2007 22:40:12

Hi,

Cool to hear you are trying to use Ogre+Bullet.

UPDATE:

It's done. I have OgreBullet now working with Bullet 2.61 and Shoggoth (CVS Head).


Are there any changes you made inside Bullet that need to be integrated in the main Bullet source code repository? If so, please report the fixes on the Bullet forums, and I will consider integrating them. By the way, there are some minor fixes in the new Bullet 2.62 release that you might want to consider.

... and yes, don't add the multithreading patches. It would be a major change, plus we don't know how well Bullets own multicore tech will work - maybe there's no need. At the level it's written I think it's best to integrate into ones own framework anyhow.

Some background on BulletMultiThreading: this originates from Playstation 3 and XBox 360 parallel optimizations. But it should improve the Win32 Threads and future pthreads versions too. The idea is to allow to share the multi-threaded collision detection and solver between all the platforms. Support for Win32 Threads, pthreads and libspe2 is work in progress, and some game developers are using BulletMultiThreaded with their own custom thread manager, by deriving from btThreadSupportInterface.

If anyone created something fun/interesting using OgreBullet, can you please share a link on the Bullet Gallery?

Thanks,
Erwin Coumans
http://bulletphysics.com

Chaster

21-09-2007 23:05:40

Hello Erwin,

I made absolutely NO changes to bullet itself. All my changes are to OgreBullet (which is the Bullet wrapper for using with Ogre3D). Feature-wise, OgreBullet is not up-to-date with all the features of Bullet itself (although the version I just made has support for the ConeTwistConstraint). I will see about downloading and building Bullet 2.62 for the bug fixes and integrate with OgreBullet.

Thanks!

Chaster

tuan kuranes

24-09-2007 13:24:48

Great work !

About visitor renderables :

Applications can now do the same sort of thing, but provide a visitor of their own, which gets called back with all of the potential Renderables that might get added if the object ends up being visible, including all the LODs and potentially the debug renderables depending on the params

from sinbad blog

You can either send me a patch or post in in sourceforge Ogre tracker system.

Chaster

24-09-2007 19:21:08

I'm going to update to Bullet 2.62 (for those bug fixes Erwin mentioned), recompile to make sure nothing breaks, and I'll send you a zip file via your gmail account.

Chaster
p.s. I don't suppose you are interested in adding heightfieldTerrain collision shape to OgreBullet any time soon?

tuan kuranes

25-09-2007 15:52:11

Received mail. I'll commit asap.
Thanks a lot !

I'm interested, but sadly does not have any time currently... but still welcome patch as usual ;)

Chaster

25-09-2007 20:18:57

Received mail. I'll commit asap.
Thanks a lot !

I'm interested, but sadly does not have any time currently... but still welcome patch as usual ;)


I wish I had time too... :lol:

But, great work on the current version. I'm really liking it so far.

Chaster

tuan kuranes

27-09-2007 14:12:35

It's now in CVS.

Thanks a Lot !

Fixed media too so that demo have a better look.

Seems ray doesn't work anymore (in demo at least), I committed anyway as it didn't work well before anyway.

Chaster

27-09-2007 15:27:53

It's now in CVS.

Thanks a Lot !


No problem. Thanks for making OgreBullet in the first place! :D


Fixed media too so that demo have a better look.


Ah, I'll have to go check that out. Getting a little tired of the grey boxes/cones/cylinders.. heh.


Seems ray doesn't work anymore (in demo at least), I committed anyway as it didn't work well before anyway.


Oh, darn. I thought that one of the patches I added would have fixed that, but I guess not...

Chaster