mccdo / osgbullet

Bullet physics and OpenSceneGraph integration
65 stars 34 forks source link

Adding RagDoll sample (from Bullet Lib) #29

Open GoogleCodeExporter opened 9 years ago

GoogleCodeExporter commented 9 years ago
Hello !

I try to port the Ragdoll from Bullet lib to osgBullet.
I have some good results and problems (with btCapsule).

The project is in 'tests' directory.
It was build with the lastest osgBullet (from svn) and bullet (from svn).

Here a result : 
https://cloud.githubusercontent.com/assets/7001058/4864257/c8dd9aee-611a-11e4-87
b8-4c9dcdd4413a.jpg

Thx for your lib, it's a very good project !

Yoyo

ps: Sorry for my english ! ^^

Original issue reported on code.google.com by lionel.atty on 31 Oct 2014 at 4:46

Attachments:

GoogleCodeExporter commented 9 years ago
Re !

Here the source tree of osgBullet with Capsule handling (approximation) and 
Ragdoll sample.

I'm using a approximation for Capsule. I'm using cylinder bounding shape and 
compute (in this case) a 'tiny' capsule from cylinder bounding shape.
in CollisionShapes.cpp:147 :
const float     length = 2.0f*(cap.getLength() - radius);   // see in 
btCapsuleShape.cpp : btCapsuleShape(...)
If you want a 'safe' bounding shape, just remove the '- radius'

I add the result of diff command from svn and the archive of the source tree.

Happy coding ^^
YoYo

Original comment by lionel.atty on 3 Nov 2014 at 9:21

Attachments:

GoogleCodeExporter commented 9 years ago
Thanks. I'm kind of backlogged at the moment with other projects. But, assuming 
your diff is against current source, I should be able to commit this change in 
the near future.

Original comment by SkewMat...@gmail.com on 3 Nov 2014 at 9:20

GoogleCodeExporter commented 9 years ago
Welcome :)
In this archive, there is a dependancy to geometric tools engine (gte).
It's not use in the code (#ifdef) but present in a CMakeLists.
I send a clean version tomorrow if you want (with english commentaries, some 
french comments are present in sources code ^^).
I'm looking for a good strategy/algorithm to compute accurate & minimum 
bounding capsule. It's an interesting topic ! I've found a good solution with 
non-linear minimisation using Jacobian functions (optimisation on capsule and 
the volume of the bounding). It's a elegant solution, but there are work to 
clean the code (remove  dependancies/extern libs).
Keep in touch ^^
Lionel.

Original comment by lionel.atty on 3 Nov 2014 at 9:45