Dem Bones
This repository contains an implementation of Smooth Skinning Decomposition with Rigid Bones, an automated algorithm to extract the Linear Blend Skinning (LBS) with bone transformations from a set of example meshes. Skinning Decomposition can be used in various tasks:
- converting any animated mesh sequence, e.g. geometry cache, to LBS, which can be replayed in popular game engines,
- solving skinning weights from shapes and skeleton poses, e.g. converting blendshapes to LBS,
- solving bone transformations for a mesh animation given skinning weights.
This project is named after "The Skeleton Dance" by Super Simple Songs.
Contents
include/DemBones
: C++ header-only core library using Eigen and OpenMP. Check out the documentations in docs/index.html.bin
: pre-compiled command line tools for Windows and MacOS that read and write FBX and Alembic files. Check out the usage by runningDemBones --help
.src/command
: source code for the command line tool. Check outAbcReader.cpp
,FbxReader.cpp
, andFbxWriter.cpp
for the usage of the core library.data
: input/output test data for the command line tool. Run and check out the scriptsrun.bat
(Windows) or./run.sh
(MacOS).
Compiling
Tested platforms:
- Visual Studio 2019 on Windows 10 x64,
- LLVM 9.0.0 (Homebrew) on MacOS 10.13.6 x64 (experimental).
Compiling steps:
- Install cmake 3.15
- Copy the following libraries to their respective folders in
ExtLibs
so that cmake can find these paths:- Eigen 3.3.7 with path
ExtLibs/Eigen/Eigen/Dense
, - Alembic (from Maya 2019 DevKit) with path
ExtLibs/Alembic/include/Alembic/Abc/All.h
, - FBXSDK 2019.0 with path
ExtLibs/FBXSDK/include/fbxsdk.h
, - tclap 1.2.2 with path
ExtLibs/tclap/include/tclap/CmdLine.h
, - For Windows only: zlib (from Maya 2019 DevKit) with path
ExtLibs/zlib/zlib.lib
.
- Eigen 3.3.7 with path
- Run:
mkdir build
cd build
cmake ..
- For Windows, launch and compile the solution
dem-bones.sln
with Visual Studio. For MacOS, run$ make install
Note for MacOS
- Apple Clang (default compiler) does not support OpenMP and Eigen. We recommend using LLVM. Assuming LLVM is installed in the default path:
/usr/local/opt/llvm/bin
, instead ofcmake ..
, you can run:$ cmake -DCMAKE_C_COMPILER=/usr/local/opt/llvm/bin/clang -DCMAKE_CXX_COMPILER=/usr/local/opt/llvm/bin/clang++ ..
- The pre-compiled tool
bin/DemBones
requires dynamic libomp for LLVM. If you have an error messeage related to OpenMP, please installlibomp
, e.g. with Homebrew using$ brew install libomp
.bin/DemBones
was compiled with the optimization flag-O3
. It looks like LLVM uses fast math so the results are slightly different with those generated by Windows version. Removing optimization flags (inCMakeLists.txt
) helps to reproduce the same results with Windows version but the tool will run 10x slower.
References
If you use the library or the command line tool, please cite the paper:
Binh Huy Le and Zhigang Deng. Smooth Skinning Decomposition with Rigid Bones. ACM Transactions on Graphics 31(6), Proceedings of ACM SIGGRAPH Asia 2012.
BibTeX:
@article{LeDeng2012,
author = {Le, Binh Huy and Deng, Zhigang},
title = {Smooth Skinning Decomposition with Rigid Bones},
journal = {ACM Trans. Graph.},
volume = {31},
number = {6},
year = {2012}
}
The skinning weights smoothing regularization was published in the paper:
Binh Huy Le and Zhigang Deng. Robust and Accurate Skeletal Rigging from Mesh Sequences. ACM Transactions on Graphics 33(4), Proceedings of ACM SIGGRAPH 2014.
Authors
We are a cross-disciplinary team within EA Worldwide Studios. Our mission is to explore, build and help define the future of interactive entertainment.
Search for Extraordinary Experiences Division (SEED) - Electronic Arts
http://seed.ea.com
Dem Bones was created by Binh Le (ble@ea.com).
The logo was designed by Phuong Le.
Contributing
Before you can contribute, EA must have a Contributor License Agreement (CLA) on file that has been signed by each contributor. You can sign here: http://bit.ly/electronic-arts-cla
Licenses
- The source code, including
include/DemBones
andsrc/command
, uses BSD 3-Clause License as detailed in LICENSE.md - The pre-compiled command line tool
bin/DemBones
(.exe
) uses third party libraries: Eigen, tclap, Alembic, FBXSDK, and zlib with licenses in 3RDPARTYLICENSES.md