Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Bullet3? #45

Open
danzeeeman opened this issue Apr 9, 2021 · 12 comments
Open

Bullet3? #45

danzeeeman opened this issue Apr 9, 2021 · 12 comments

Comments

@danzeeeman
Copy link

Any thoughts on upgrade to Bullet3?

@themancalledjakob
Copy link

in the meantime.... you might be able to replace libs/bullet2.8.9 with libs/bullet3.
afaik there are no breaking changes, and the examples I tested, are fine.

Just get the source directory from bullet3 repository:
https://github.com/bulletphysics/bullet3/tree/master/src

put it in ofxBullet/libs/bullet3/include

so it looks like this:

of_v0.11.0_linux64gcc6_release/addons/ofxBullet/libs/
└── bullet3
    └── include
        ├── Bullet3Collision
        │   ├── BroadPhaseCollision
        │   │   └── shared
        │   └── NarrowPhaseCollision
        │       └── shared
        ├── Bullet3Common
        │   └── shared
        ├── Bullet3Dynamics
        │   ├── ConstraintSolver
        │   └── shared
        ├── Bullet3Geometry
        ├── Bullet3Serialize
        │   └── Bullet2FileLoader
        │       └── autogenerated
        ├── BulletCollision
        │   ├── BroadphaseCollision
        │   ├── CollisionDispatch
        │   ├── CollisionShapes
        │   ├── Gimpact
        │   └── NarrowPhaseCollision
        ├── BulletDynamics
        │   ├── Character
        │   ├── ConstraintSolver
        │   ├── Dynamics
        │   ├── Featherstone
        │   ├── MLCPSolvers
        │   └── Vehicle
        ├── BulletInverseDynamics
        │   └── details
        ├── BulletSoftBody
        └── LinearMath
            └── TaskScheduler

Hint: I removed Bullet3OpenCL and clew. Otherwise you'd need appropriate compile flags.
At least for linux no precompiled binaries are necessary, but my guess is also on osx or windows you should be good to go :)

@NickHardeman
Copy link
Owner

Upgrading to bullet3 seems like a good idea to me especially since @themancalledjakob mentioned there are no breaking changes in the examples.
It's been a while since the libs were updated in ofxBullet. I can start compiling the static libs for OSX, iOS and Windows, but fairly busy so it will probably take me a couple of days. I am not very familiar with linux, what would be the best approach for the add-on regarding libs/src?

@themancalledjakob
Copy link

For linux it should just compile, if the source files are there :)

but, to possibly speed up the build process, I have all static libraries from the current master branch of bullet precompiled, tested with this addon and ready to go. As soon you're ready I can fork this, put them at the right place and send a PR.
I'm also fairly busy atm, but within the next days sounds doable. I use this addon all the time and am happy to contribute. :)

@themancalledjakob
Copy link

i have it now put into place here:
https://github.com/themancalledjakob/ofxBullet

oh, i just notice. i did compile from master... would you compile from the release 3.09 instead?

@NickHardeman
Copy link
Owner

NickHardeman commented Apr 12, 2021

I am working on compiling and testing for OSX on 3.08. Also building with the extras so the robot stuff will be in there and enabling VHACD. I had to also flag "BUILD_CLSOCKET" so that the robot extras would compile.
At the end of Extras/BulletRobotics/CMakeLists.txt, I had to add DESTINATION include/bullet_robotics here: https://github.com/bulletphysics/bullet3/blob/master/Extras/BulletRobotics/CMakeLists.txt#L312
and DESTINATION include/bullet_robotics_gui here:https://github.com/bulletphysics/bullet3/blob/master/Extras/BulletRoboticsGUI/CMakeLists.txt#L191

@danzeeeman
Copy link
Author

danzeeeman commented Apr 12, 2021 via email

@NickHardeman
Copy link
Owner

Been slowly updating the libs to bullet 3.08. As far as I can tell, examples still work. I included some of the bullet extras in the osx libs in case they are handy.
https://github.com/NickHardeman/ofxBullet/tree/dev-bullet3

@themancalledjakob
Copy link

hey Nick,
sorry for the late response. I've been trying to build it now for a while, but somehow it doesn't want to just compile with the sources anymore when I take the dev-bullet3 branch.
I noticed that there are less cpp files in the include directory now. Before, I usually just took the src directory from https://github.com/bulletphysics/bullet3/tree/master/src and put it in libs/bullet3/include and it worked.
Also with precompiled static libs using the adjusted CMakeLists.txt don't solve it.

I think that's all solvable and not a big issue, just I don't have time at the moment to get deep into it. The next weeks I'll be pretty packed with a project, but then should be able to find a calm day for some recreational bullet fiddling :) Just wanted to let you know I didn't forget about it

@NickHardeman
Copy link
Owner

Thank you! Been moving pretty slow on this myself. I believe I copied over the src and also the extras. The extras may be causing the problems. I can remove them since they aren't part of ofxBullet right now. And can be added later if needed.

@NickHardeman
Copy link
Owner

Actually, only the header files are in the includes since I am using static libs for the osx build.

@themancalledjakob
Copy link

do you still have the exact cmake flags that you used for building the static libs?

I used: cmake -DBUILD_CLSOCKET=ON -DENABLE_VHACD=ON -DBUILD_SHARED_LIBS=OFF -DB3_USE_CLEW=ON -DUSE_BULLET2_USE_OPEN_MP_MULTITHREADING=ON -DBT_THREADSAFE=ON -DUSE_DOUBLE_PRECISION=OFF -DCMAKE_BUILD_TYPE=Release ..

that should afaik also result in static libs with extras.. or do i miss something?

@NickHardeman
Copy link
Owner

Screen Shot 2021-04-12 at 1 09 04 PM
I believe these are the settings that I used in cmake. Happy to remove the extras if it makes it easier.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants