/dem-bones

An automated algorithm to extract the linear blend skinning (LBS) from a set of example poses

Primary LanguageC++OtherNOASSERTION

Dem Bones

BSD3 Clause Version

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, Linux, and MacOS that read and write FBX and Alembic files. Check out the usage by running DemBones --help.
  • src/command: source code for the command line tool. Check out AbcReader.cpp, FbxReader.cpp, and FbxWriter.cpp for the usage of the core library.
  • data: input/output test data for the command line tool. Run and check out the scripts run.bat (Windows) or ./run.sh (Linux/MacOS).

Compiling

Tested platforms:

  • Visual Studio 2019 on Windows 10 x64
  • g++ 9.3.0 on Ubuntu Linux 20.14
  • LLVM 10.0.0 (Homebrew) on MacOS 10.13.6

Compiling steps:

  1. Install cmake
  2. Copy the following libraries to their respective folders in ExtLibs so that cmake can find these paths:
  3. Run cmake:
mkdir build
cd build
cmake ..
  1. Build:
cmake --build . --config Release --target install

Notes for Linux

Notes 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 of cmake .., 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 install libomp, e.g. with Homebrew using $ brew install libomp.

  • bin/MacOS/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 (in CMakeLists.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


Search for Extraordinary Experiences Division (SEED) - Electronic Arts
http://seed.ea.com

We are a cross-disciplinary team within EA Worldwide Studios.
Our mission is to explore, build and help define the future of interactive entertainment.

Dem Bones was created by Binh Le (binh.graphics). The logo was designed by Phuong Le (phuongle.com).

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 and src/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