Notes for compiling Milan Suk's Bullet SOP for Houdini.
The initial build testing was done with these versions of software:
- Mac OS X 10.10.2
- Xcode 6.1.1 (6A2008a)
- MacPorts 2.3.3
- Cmake 3.1.3
- Houdini 14.0.201.13
- Bullet 2.82 r2704
Make sure you've got the latest Xcode installed. Under Mavericks, to get the command line tools installed, you have to run xcode-select --install
, and choose Install
from the pop-up window.
Install Macports [from here][https://www.macports.org/install.php], then in a new shell install Cmake with sudo port install cmake
.
After installing Houdini, you need to run it in a shell with all the Houdini environment variables setup correctly. If you don't have one you've created yourself, you can run /Applications/Houdini 13.0.385/Houdini Shell.terminal
.
Lastly, run this command in a Terminal, to create our working directory: mkdir ~/bullet_sop_dev
. Then cd
into that directory, and we're ready to get started.
- Download the Bullet library and Bullet SOP:
curl -o ~/bullet_sop_dev https://bullet.googlecode.com/files/bullet-2.82-r2704.tgz
cd ~/bullet_sop_dev; tar xvfz bullet-2.82-r2704.tgz; cd bullet-2.82-r2704
- Download the Bullet SOP code to
~bullet_sop_dev
, and unzip/untar.
- Patch
btSolverBody.h
1, though there may be a compiler flag to do this as well 2:cd ~/bullet_sop_dev/bullet-2.82-r2704/src/BulletDynamics/ConstraintSolver; cp ~/bullet_sop_dev/BulletSOP-master/source/macosx_x86_64_clang/btSolverBody.patch .
- Run the patch with
patch < btSolverBody.patch
, and answerY
in response toReversed (or previously applied) patch detected! Assume -R?
- Configure Bullet with Cmake (omits Demos, build static libs, etc...)
cd ~/bullet_sop_dev/bullet-2.82-r2704; cmake . -G "Unix Makefiles" -DBUILD_DEMOS:BOOL=OFF -DBUILD_SHARED_LIBS:BOOL=OFF -DCMAKE_OSX_ARCHITECTURES='x86_64' -DBUILD_MULTITHREADING=1 -DCMAKE_CXX_FLAGS="-fPIC" -DCMAKE_C_FLAGS="-fPIC"
- Build and install with
make -j4; sudo make install
(set-j
to as many threads as you have/want to use) - Verify that the
/usr/local/bullet/
has properly populatedlib
andinclude
dirs. This is where thebuild.sh
script will look for the Bullet libraries and headers.
- Download the Bullet SOP code to
~bullet_sop_dev
, and unzip/untar. cd ~/bullet_sop_dev/BulletSOP-master/source/macosx_x86_64_clang
- Build it with
sh build.sh
. Ignore any errors that sayld: library not found for -lc.o
- Verify the plugin was installed via
ls -ltr /Users/$USER/Library/Preferences/houdini/13.0/dso/bulletSOP.dylib
- You can also verify the library is not dynamically linked to the bullet library with
otool -L /Users/$USER/Library/Preferences/houdini/13.0/dso/bulletSOP.dylib
- You can also verify the library is not dynamically linked to the bullet library with
- Install the icons via
cp ~/bullet_sop_dev/BulletSOP-master/icons /Users/$USER/Library/Preferences/houdini/13.0/config/Icons
(or any location included in$HOUDINI_UI_ICON_PATH
, which isn't setup by default; just use your home dir preferences, unless you've got a reason to use another and add it to the icon path)