OgreBullet Physic Wrapper [Source + Binary Release.]
-
- OGRE Retired Team Member
- Posts: 19269
- Joined: Sun Oct 06, 2002 11:19 pm
- Location: Guernsey, Channel Islands
- x 66
Good stuff - I've had my eye on Bullet for a while and met Erwin Coumans (Bullet author and Sony physics chap) at Siggraph last year where he was demoing Echo (the Blender Bullet&Ogre combo plugin) - not his project but obviously he had an interest in it.
@tuan: obviously you can have a spot in ogreaddons for this if you want, drop me an email to organise it..
@tuan: obviously you can have a spot in ogreaddons for this if you want, drop me an email to organise it..
-
- Goblin
- Posts: 279
- Joined: Sun Feb 19, 2006 1:08 am
-
- OGRE Contributor
- Posts: 2087
- Joined: Thu Mar 03, 2005 7:11 am
- Location: WA, USA
- x 16
-
- Hobgoblin
- Posts: 523
- Joined: Fri Jan 06, 2006 6:35 pm
Re: OgreBullet Physic Wrapper [Source + Binary Release.]
yes I know. From the original post:
tuan kuranes wrote:So here is a Ogre wrapper for it. primtives, trimesh and ray vehicle only for now.
-
- OGRE Contributor
- Posts: 2087
- Joined: Thu Mar 03, 2005 7:11 am
- Location: WA, USA
- x 16
I ask because, correct me if I'm wrong, PhysX also supports Trimesh, but on static entities only, which also means it doesn't support trimesh vs trimesh collisions. Supporting trimesh is one thing, but trimesh of dynamic, scaleable entities and trimesh to trimesh collision is another. I just wanted some additional clarification on this, and couldn't find it easily from the Bullet wiki or forums.
KungFooMasta
KungFooMasta
-
- Greenskin
- Posts: 103
- Joined: Thu Sep 07, 2006 1:13 am
- Location: Ohio, USA
It supports trimesh to trimesh collisions. Check out the Bullet demos on the Bullet website.KungFooMasta wrote:Does anybody know if Bullet supports trimesh, trimesh vs trimesh collisions, and trimesh of dynamic(animated) entities?
KungFooMasta
If by dynamic entities you mean deformable meshes, I don't think it does that out of the box. You could certainly add it. If you mean animated bodies i.e. ragdolls, then yes, using groups of collision objects and joints.
You can import collada physic entities too, from Blender or the PhysX utility for instance.
There is working C code and examples of how to do convex decomposition of trimeshes too. Great stuff.
Bullet users are working on a GPU physics system. Working examples.
There are a lot of reasons to like Bullet. The zlib license certainly helps. It's fast. It's stable. It works.
-
- Goblin
- Posts: 245
- Joined: Mon Nov 22, 2004 11:56 pm
- Location: New York, NY, USA
-
- Silver Sponsor
- Posts: 2703
- Joined: Mon Aug 29, 2005 3:24 pm
- Location: Kuala Lumpur, Malaysia
- x 51
But you can have trimesh on heightmap shape or convex on trimesh.KungFooMasta wrote:I ask because, correct me if I'm wrong, PhysX also supports Trimesh, but on static entities only, which also means it doesn't support trimesh vs trimesh collisions. Supporting trimesh is one thing, but trimesh of dynamic, scaleable entities and trimesh to trimesh collision is another. I just wanted some additional clarification on this, and couldn't find it easily from the Bullet wiki or forums.
KungFooMasta
-
- OGRE Contributor
- Posts: 2087
- Joined: Thu Mar 03, 2005 7:11 am
- Location: WA, USA
- x 16
By dynamic I just meant scaleable and animated entities. Sounds like it supports everything I want! I'm using OgreOpcode right now.. had some really bad problems with it and PLSM2, on PLSM2's side. Tempted to switch to Bullet... maybe I will look into it more sometime soon.
Thanks for the info everybody!
KungFooMasta
Thanks for the info everybody!
KungFooMasta
-
- OGRE Retired Moderator
- Posts: 2653
- Joined: Wed Sep 24, 2003 8:07 am
- Location: Haute Garonne, France
- x 4
-
- Halfling
- Posts: 74
- Joined: Wed Apr 12, 2006 4:38 pm
- Location: Weinstadt / Germany
I uploaded a first patch for the Dynamics part. For the Collisions part i am stil l missing the EmptyShape header file.
Patch File
and the
Premake file
The premake file for the Collisions lib is almost the same. You would only need to change the names and remove one include dir.
The fix for the HingeConstraint is only a dirty hack .. i dont really know how to fix it in another way .. g++ is complaining cause you supply btVector3 instead of const btVector3& and btVector3& (both two times in the first constructor and one of each in the second constructor).
Patch File
and the
Premake file
The premake file for the Collisions lib is almost the same. You would only need to change the names and remove one include dir.
The fix for the HingeConstraint is only a dirty hack .. i dont really know how to fix it in another way .. g++ is complaining cause you supply btVector3 instead of const btVector3& and btVector3& (both two times in the first constructor and one of each in the second constructor).
-
- OGRE Retired Moderator
- Posts: 2060
- Joined: Thu Feb 26, 2004 12:11 am
- Location: Toronto, Canada
- x 3
I also get the error "The application has failed to start because the application configuration is incorrect".
I initially didn't have Visual C++ Express installed (including the Platform SDK) but now I do and get the same problem.
I tried following some workarounds that I found on the net but they didn't work either.
The "OK, due to popular demand" post below is what I tried.
http://forums.microsoft.com/MSDN/ShowPo ... 5&SiteID=1
I haven't tried compiling from source yet, just wanted to look at the demos.
Does the binary demo have everything I need in order to run it? For example, I don't see any bullet dlls, are they statically linked? Do I need to download and compile bullet?
Thoughts?
I initially didn't have Visual C++ Express installed (including the Platform SDK) but now I do and get the same problem.
I tried following some workarounds that I found on the net but they didn't work either.
The "OK, due to popular demand" post below is what I tried.
http://forums.microsoft.com/MSDN/ShowPo ... 5&SiteID=1
I haven't tried compiling from source yet, just wanted to look at the demos.
Does the binary demo have everything I need in order to run it? For example, I don't see any bullet dlls, are they statically linked? Do I need to download and compile bullet?
Thoughts?
-
- OGRE Retired Moderator
- Posts: 2653
- Joined: Wed Sep 24, 2003 8:07 am
- Location: Haute Garonne, France
- x 4
@rUmbl3: thanks for patch, I'll update asap.
@falagard: bullet is statically linked. It may miss the right msvc dll, even if i tried to put them right aside the exe... Have to find the missing one, even if depends.exe do not tell me which one I miss.
Anyway, Did you install vs sp 1 ?
@falagard: bullet is statically linked. It may miss the right msvc dll, even if i tried to put them right aside the exe... Have to find the missing one, even if depends.exe do not tell me which one I miss.
Anyway, Did you install vs sp 1 ?
-
- OGRE Retired Moderator
- Posts: 2060
- Joined: Thu Feb 26, 2004 12:11 am
- Location: Toronto, Canada
- x 3
-
- Halfling
- Posts: 74
- Joined: Wed Apr 12, 2006 4:38 pm
- Location: Weinstadt / Germany
-
- OGRE Retired Moderator
- Posts: 2653
- Joined: Wed Sep 24, 2003 8:07 am
- Location: Haute Garonne, France
- x 4
-
- Silver Sponsor
- Posts: 413
- Joined: Wed Feb 11, 2004 11:44 am
- Location: Austin (that's kept wierd :))
Tuan,
May I ask you a favor as the OgreBullet author? I would like to know what is the time to insert/remove a simple collider entity like simple sphere into Bullet world sim? I'm not talking about the rendering part, but just the physics world itself.
Unfortunatly, I dont have much free time on my hand to get familiar with OgreBullet, that's why I'm asking this (I really appreciate if you can find some time to do this!), it may take just 10-20 mins to take the time in the demo app on your setup dev system.
Why do I want to know this? I'm thinking about Bullet sim worlds/baskets to run on separate CPU or even different machines(read distributed physics system), so when an object is going out of one sim world scope, it will be moved to another Bullet sim (based on the sim border coords), and will participate in collision detection there. I just want to know if this idea introduce a lot of lag while moving objects from one sim to another... Would be interesting to know average for 1000 insert/remove operations to draw the median for 1 operation in msecs or nsecs.
I appreciate the help! Thank you!
May I ask you a favor as the OgreBullet author? I would like to know what is the time to insert/remove a simple collider entity like simple sphere into Bullet world sim? I'm not talking about the rendering part, but just the physics world itself.
Unfortunatly, I dont have much free time on my hand to get familiar with OgreBullet, that's why I'm asking this (I really appreciate if you can find some time to do this!), it may take just 10-20 mins to take the time in the demo app on your setup dev system.
Why do I want to know this? I'm thinking about Bullet sim worlds/baskets to run on separate CPU or even different machines(read distributed physics system), so when an object is going out of one sim world scope, it will be moved to another Bullet sim (based on the sim border coords), and will participate in collision detection there. I just want to know if this idea introduce a lot of lag while moving objects from one sim to another... Would be interesting to know average for 1000 insert/remove operations to draw the median for 1 operation in msecs or nsecs.
I appreciate the help! Thank you!
-
- OGRE Retired Moderator
- Posts: 2653
- Joined: Wed Sep 24, 2003 8:07 am
- Location: Haute Garonne, France
- x 4
@tau: you really may ask that on Bullet Forums instead.
-
- Silver Sponsor
- Posts: 413
- Joined: Wed Feb 11, 2004 11:44 am
- Location: Austin (that's kept wierd :))
-
- Bugbear
- Posts: 806
- Joined: Fri Feb 03, 2006 7:08 am
For those without the VC++ 2005 SP1, I found that installing this:
http://www.apachelounge.com/download/vc ... 86-sp1.exe
let me run the demo.
http://www.apachelounge.com/download/vc ... 86-sp1.exe
let me run the demo.
-
- Gnoblar
- Posts: 23
- Joined: Sun Mar 04, 2007 11:11 pm
- Location: Heidelberg, Germany
Link in original post corrupt?
@Tuan
the following link in your original post leads to an empty archive:
Bullet Source with vc8 compatible with Ogre (dll thing)
Regards,
znarf
the following link in your original post leads to an empty archive:
Bullet Source with vc8 compatible with Ogre (dll thing)
Regards,
znarf
-
- OGRE Retired Moderator
- Posts: 2653
- Joined: Wed Sep 24, 2003 8:07 am
- Location: Haute Garonne, France
- x 4
-
- Gnoblar
- Posts: 23
- Joined: Sun Mar 04, 2007 11:11 pm
- Location: Heidelberg, Germany
@Tuan,
sorry for the false alarm, you are completely correct, the archive contains the data. My Windows explorer did not show the zip file contents before the download was completed, and for some strange reasons I did not get an entry in my Firefox's download window. But after a while just the content of the archive "appeared", so please excuse my impatience...
sorry for the false alarm, you are completely correct, the archive contains the data. My Windows explorer did not show the zip file contents before the download was completed, and for some strange reasons I did not get an entry in my Firefox's download window. But after a while just the content of the archive "appeared", so please excuse my impatience...
-
- Gnoblar
- Posts: 4
- Joined: Mon Apr 09, 2007 5:10 pm
callback?
Hi, I was recently checking out available physics "engines" for use with OGRE. I tried ODE and it was very unstable (due to OPCODE). I moved on to Bullet. I saw the ogrebullet addon and, after some minor code fixes, got it built on AMD64 running Ubuntu Linux.
BTW it looks like a very nice wrapper so far!
OK...
So, granted I'm a [Ogre]Bullet newbie but I don't see any obvious place where one can be notified of a collision between rigid bodies. Am I blind?
I'm looking for something like:
Thanks!
Brian
BTW it looks like a very nice wrapper so far!
OK...
So, granted I'm a [Ogre]Bullet newbie but I don't see any obvious place where one can be notified of a collision between rigid bodies. Am I blind?
I'm looking for something like:
Code: Select all
class MyCollisionHandler : public OgreBullet::CollisionCallback
{
public:
virtual ~MyCollisionHandler() {}
virtual void onCollision(OgreBullet::CollisionEvent& evt) {
// evt.body0, evt.body1, normal, etc.
}
} myHandler;
body->addCollisionCallback(&myHandler);
// blah blah ...
Brian
-
- OGRE Retired Moderator
- Posts: 2653
- Joined: Wed Sep 24, 2003 8:07 am
- Location: Haute Garonne, France
- x 4
Sorry missed the post.
Feel free to add that and more (a collision only demo)... or if you don't feel implementing it, I can add it to my todo-list (which is huge, but if I find it simple and fast to implement, I'll do it.).
Would be interested by a patch against latest cvs.after some minor code fixes, got it built on AMD64 running Ubuntu Linux.
It seems I just missed implementing that one, as I use it as a physic engine, not collision engine, even if I paid much attention making it seperated.So, granted I'm a [Ogre]Bullet newbie but I don't see any obvious place where one can be notified of a collision
Feel free to add that and more (a collision only demo)... or if you don't feel implementing it, I can add it to my todo-list (which is huge, but if I find it simple and fast to implement, I'll do it.).