[Bf-committers] Bullet integration

Andrey Liakhovets liakh at dol.ru
Wed Dec 11 20:49:33 CET 2013


On Wed, 11 Dec 2013 07:02:01 -0800 Jacob Merrill wrote:
>Hello, and thank you all for your amazing contributions,
>
>I have some questions,
>
>*Q1.p1*-Is there anyone working on integrating the newest builds of bullet?
>
>*p2*-If not is there any documentation for what commands, links and
>connections blender and the BGE use to interact with bullet, so I may try
>and add support for bullet 3.x or even a custom bullet blend?

Hello.

For last months I experimented with new cloth model inside blender,
using the rest of blender code as a feature rich framework (big thanks!)

One of my steps was building bullet2 with double precision (in blender 2.68a).
For this purpose I had to patch some blender sources interacting with bullet2.

Here is the relevant commit with statistics:

commit e16f5931f45605fc5b0c1b407a6f0040161c5394
Author: Andrey Liakhovets <aoliakh at altlinux.org>
Date:   Thu Oct 17 11:37:02 2013 +0400

    build bullet2 library with double precision (BT_USE_DOUBLE_PRECISION)
    
    - "float instead btScalar usage" errors corrected
      ("btScalar mass" in gameengine/Ketsji/KX_BulletPhysicsController.cpp and
       gameengine/Ketsji/KX_ConvertPhysicsObjects.cpp can be reverted to float)
    - duplicate definitions in gameengine/Physics/Bullet/CcdPhysicsController.cpp
    - TODO: right bullet2 include in gameengine/Physics/common/PHY_IMotionState.h

 blender/extern/bullet2/CMakeLists.txt                             |  2 ++
 blender/intern/rigidbody/CMakeLists.txt                           |  2 ++
 blender/source/gameengine/Ketsji/CMakeLists.txt                   |  1 +
 blender/source/gameengine/Ketsji/KX_BulletPhysicsController.cpp   |  6 +++---
 blender/source/gameengine/Ketsji/KX_ConvertPhysicsObjects.cpp     |  4 ++--
 blender/source/gameengine/Ketsji/KX_MotionState.cpp               | 20 ++++++++++++++++++--
 blender/source/gameengine/Ketsji/KX_MotionState.h                 |  6 ++++--
 blender/source/gameengine/Ketsji/KX_NearSensor.cpp                |  2 +-
 blender/source/gameengine/Ketsji/KX_RadarSensor.cpp               |  2 +-
 blender/source/gameengine/Physics/Bullet/CMakeLists.txt           |  1 +
 blender/source/gameengine/Physics/Bullet/CcdGraphicController.cpp |  2 +-
 blender/source/gameengine/Physics/Bullet/CcdPhysicsController.cpp | 30 ++++++++++++++++++++++--------
 blender/source/gameengine/Physics/Bullet/CcdPhysicsController.h   |  8 +++++---
 blender/source/gameengine/Physics/Dummy/CMakeLists.txt            |  3 +++
 blender/source/gameengine/Physics/common/PHY_IMotionState.h       |  8 ++++++--
 blender/source/gameengine/SceneGraph/SG_Spatial.h                 |  6 ++++++
 16 files changed, 78 insertions(+), 25 deletions(-)   

The full diff is attached.

This is not all interfaces with bullet2, only incorrect or incomplete
ones (relative to bullet2 types). But may be it helps somehow.

Andrey Liakhovets

PS.
Meantime I've encountered errors and flaws in cloth collisions.
I agree that this part (and cloth model) needs major redesign.
Nevetheless I will soon report these bugs.


More information about the Bf-committers mailing list