113 lines
3.2 KiB
Plaintext
113 lines
3.2 KiB
Plaintext
This is a small program that illustrates how to compute Bounded Biharmonic
|
|
Weights (BBW) for a given surface mesh and skeleton description. This only
|
|
supports point handles and skeleton trees (bones). Cages are not supported.
|
|
This program only computes and outputs the weight function values. You should
|
|
be able to load them into matlab or maya or whatever.
|
|
|
|
This demo (main.cpp) is really just a skeleton of function calls that load the
|
|
input and writes the output. The real "meat" of the bbw demo is conducted in
|
|
the bbw function of libigl. If you only want to look at that implementation,
|
|
then download libigl and jump to libigl/include/igl/mosek/bbw.h and
|
|
libigl/include/igl/mosek/bbw.cpp
|
|
|
|
= Dependencies =
|
|
|
|
The dependencies are:
|
|
libigl
|
|
eigen3
|
|
tetgen
|
|
mosek
|
|
libigl_tetgen
|
|
libigl_mosek
|
|
|
|
= libigl =
|
|
libigl is our groups internal library. The library functions as an inlined
|
|
header library and simultaneously a static library.
|
|
http://igl.ethz.ch/projects/libigl/
|
|
|
|
This demo depends on the libigl_tetgen and libigl_mosek extras that come with
|
|
libigl. You will have to edit your libigl Makefile.conf accordingly: set
|
|
IGL_WITH_TETGEN=1 and IGL_WITH_MOSEK=1 and then build the main libigl library
|
|
and the extras with:
|
|
|
|
make lib
|
|
make extras
|
|
|
|
= Eigen3 =
|
|
The libigl dependencies rely on a depracted version of the Sparse Matrix
|
|
suite in eigen 3. Thus you need the correct version of eigen. It's not
|
|
clear how much longer this will work with the current version of Eigen.
|
|
|
|
= Mosek =
|
|
Mosek is free for academics and has its own installation instructions.
|
|
Adjust the makefile accordingly.
|
|
|
|
= Tetgen =
|
|
Tetgen is also free and easy to install. Be sure to compile the library
|
|
version, i.e.:
|
|
make tetlib
|
|
|
|
To make life a little easier, libigl include a working version of tetgen in
|
|
libigl/external/tetgen/. You can go there and compile libtet.a or download
|
|
the tetgen source and do that on your own. Whatever.
|
|
|
|
= COMPILE =
|
|
|
|
First install the dependencies (eigen, tetgen, mosek, libigl). If your on a
|
|
mac, and why wouldn't you be, then you *should* with any luck and by the grace
|
|
of God be able to compile with:
|
|
|
|
make
|
|
|
|
= RUN =
|
|
|
|
Then run an example with:
|
|
|
|
./bbw_demo examples/brick.obj examples/brick.tgf
|
|
|
|
This will produce at least 2 files:
|
|
|
|
examples/brick-volume.mesh Tetrahedral mesh over which weights were computed
|
|
examples/brick-volume.dmat Coefficients of weights defined over .mesh
|
|
|
|
= File Formats =
|
|
|
|
See libigl/file-formats/index.html
|
|
|
|
= Zip =
|
|
Package up this demo using:
|
|
|
|
zip -9 -r -x=*/.hg/* -x=*un~ bbw_demo_3d.zip ../bbw
|
|
|
|
= Contact =
|
|
|
|
You can try to email Alec Jacobson (alecjacobson@gmail.com) with questions.
|
|
Especially regarding the algorithm described in "Bounded biharmonic weights for
|
|
real-time deformation" by [Jacobson et al. 2011]. However, please
|
|
please
|
|
please
|
|
please
|
|
please
|
|
please
|
|
please
|
|
please
|
|
please
|
|
please
|
|
please
|
|
please
|
|
please
|
|
please
|
|
please
|
|
please
|
|
please
|
|
please
|
|
try to solve compilation troubles on your own. I didn't intend for this code to
|
|
be machine independent or even necessarily easy to compile. This is a quick and
|
|
dirty demo because so many people requested it.
|
|
|
|
Sometime in the not too distant future I still plan to release a *nice* 3d, C++
|
|
demo.
|
|
|
|
Love,
|
|
Alec
|