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

Overview

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 ([email protected]). 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 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
Comments
  • Question about transAffine and transAffineNorm regularizers

    Question about transAffine and transAffineNorm regularizers

    Hi, I am really confused about the transAffine and transAffineNorm regularizers. I read the original SSDR paper and some following papers like the Robust SSDR in 2014, but can't find the reference for transAffineNorm regularizers.

    Would you please tell the reference about the transAffine and transAffineNorm regularizers? Thanks a lot!

    opened by pramanc 4
  • Infinite loop when initializing bones

    Infinite loop when initializing bones

    Occasionally I run in to cases where DemBones gets stuck in an infinite loop while trying to initialize the bones in DemBones.h init(). I've attached a sample fbx and abc that causes the issue.

    faceshapes.zip

    Any insight as to why?

    ../bin/DemBones.exe -i="neutral.fbx" -a="face_rom.abc" -b=64 -o="Decomposition_64.fbx"
    1 animated mesh sequence(s):
        "face_rom.abc" + "neutral.fbx" --> "Decomposition_64.fbx"
    Parameters:
        nBones (target)    = 64
        nInitIters         = 10 (default)
        nIters             = 30 (default)
        nTransIters        = 5 (default)
        nWeightsIters      = 3 (default)
        bindUpdate         = 0 (no update) (default)
        transAffine        = 10 (default)
        transAffineNorm    = 4 (default)
        nnz                = 8 (default)
        weightsSmooth      = 0.0001 (default)
        weightsSmoothStep  = 1 (default)
    Checking ABCs:
        "face_rom.abc": /Louise_asym/Louise_asymShape (57 frames)
    Reading ABCs......................................................... Done!
    Reading FBXs:
        "neutral.fbx"... Done!
        5034 vertices
    Initializing bones: 1>1>1>1>1>1>1>1>1>1>1>1>1>1>1>1>1>1>1>1>1>1>1>1>1>1>1>1>1>1>1>1>1>1>1>1>1>1>1>1>1>1>1>1>1>1>1>1>1>1>1>1>1>1>1>1>1>1>1>1>1>1>1>1>1>1>1>1>1>1>1>1>1>1>1>1>1>1>1>
    
    opened by chadmv 4
  • Can dem-bones work directly on a PLY or OBJ sequence?

    Can dem-bones work directly on a PLY or OBJ sequence?

    Is it possible for Dem-Bones to directly convert a sequence of PLY or OBJ files into a single animated and skinned FBX, instead of using an animated Alembic files?

    opened by aapatre 2
  • Question about rigid transformation from covariance matrix

    Question about rigid transformation from covariance matrix

    Hi, Thanks for your code! Really nice work! I have one question about Best Rigid Transformation from covariance matrix. From the paper here https://igl.ethz.ch/projects/ARAP/svd_rot.pdf or the SSDR paper

    in the function qpT2m:

    Eigen::JacobiSVD svd(...) d(2, 2) = (svd.matrixU()*svd.matrixV.transpose()).determinant(); m.rotMat(k, j) = svd.matrixU()dsvd.matrixV().transpose();

    should be ?

    d(2, 2) = (svd.matrixV()*svd.matrixU.transpose()).determinant(); m.rotMat(k, j) = svd.matrixV()dsvd.matrixU().transpose();

    =================================== but definitly from the result, your implementation is right. I'm really confused!

    Thanks!

    opened by pramanc 2
  • how to compile in debug mode

    how to compile in debug mode

    I compile in debug mode in VS2019, Win10. all configures are in debug mode when configure cmake-gui. FBXSDK is debug version lib.

    but it seems Alembic from Alembic (from Maya 2020 Update 2 DevKit) only contains release libs. How to get Debug version Alembic? Should I compile Alembic from https://github.com/alembic/alembic? Then how to organize the catalogue? Which version of Alembic (from Maya 2020 Update 2 DevKit) is?

    The compile error is: 1>Alembic.lib(DataTypeRegistry.obj) : error LNK2038: mismatch detected for 'RuntimeLibrary': value 'MD_DynamicRelease' doesn't match value 'MDd_DynamicDebug' in AbcReader.obj 1>Alembic.lib(SprImpl.cpp.obj) : error LNK2038: mismatch detected for '_ITERATOR_DEBUG_LEVEL': value '0' doesn't match value '2' in AbcReader.obj 1>Alembic.lib(SprImpl.cpp.obj) : error LNK2038: mismatch detected for 'RuntimeLibrary': value 'MD_DynamicRelease' doesn't match value 'MDd_DynamicDebug' in AbcReader.obj 1>Alembic.lib(AprImpl.cpp.obj) : error LNK2038: mismatch detected for '_ITERATOR_DEBUG_LEVEL': value '0' doesn't match value '2' in AbcReader.obj 1>Alembic.lib(AprImpl.cpp.obj) : error LNK2038: mismatch detected for 'RuntimeLibrary': value 'MD_DynamicRelease' doesn't match value 'MDd_DynamicDebug' in AbcReader.obj 1>Alembic.lib(ScalarPropertyWriter.obj) : error LNK2038: mismatch detected for '_ITERATOR_DEBUG_LEVEL': value '0' doesn't match value '2' in AbcReader.obj 1>Alembic.lib(ScalarPropertyWriter.obj) : error LNK2038: mismatch detected for 'RuntimeLibrary': value 'MD_DynamicRelease' doesn't match value 'MDd_DynamicDebug' in AbcReader.obj 1>Alembic.lib(ArrayPropertyWriter.obj) : error LNK2038: mismatch detected for '_ITERATOR_DEBUG_LEVEL': value '0' doesn't match value '2' in AbcReader.obj 1>Alembic.lib(ArrayPropertyWriter.obj) : error LNK2038: mismatch detected for 'RuntimeLibrary': value 'MD_DynamicRelease' doesn't match value 'MDd_DynamicDebug' in AbcReader.obj 1>Alembic.lib(ArrayPropertyReader.obj) : error LNK2038: mismatch detected for '_ITERATOR_DEBUG_LEVEL': value '0' doesn't match value '2' in AbcReader.obj 1>Alembic.lib(ArrayPropertyReader.obj) : error LNK2038: mismatch detected for 'RuntimeLibrary': value 'MD_DynamicRelease' doesn't match value 'MDd_DynamicDebug' in AbcReader.obj 1>Alembic.lib(ScalarSample.obj) : error LNK2038: mismatch detected for '_ITERATOR_DEBUG_LEVEL': value '0' doesn't match value '2' in AbcReader.obj 1>Alembic.lib(ScalarSample.obj) : error LNK2038: mismatch detected for 'RuntimeLibrary': value 'MD_DynamicRelease' doesn't match value 'MDd_DynamicDebug' in AbcReader.obj 1>AlembicHalf.lib(half.obj) : error LNK2038: mismatch detected for '_ITERATOR_DEBUG_LEVEL': value '0' doesn't match value '2' in AbcReader.obj 1>AlembicHalf.lib(half.obj) : error LNK2038: mismatch detected for 'RuntimeLibrary': value 'MD_DynamicRelease' doesn't match value 'MDd_DynamicDebug' in AbcReader.obj 1>AlembicIex.lib(IexBaseExc.obj) : error LNK2038: mismatch detected for '_ITERATOR_DEBUG_LEVEL': value '0' doesn't match value '2' in AbcReader.obj 1>AlembicIex.lib(IexBaseExc.obj) : error LNK2038: mismatch detected for 'RuntimeLibrary': value 'MD_DynamicRelease' doesn't match value 'MDd_DynamicDebug' in AbcReader.obj 1>LINK : warning LNK4098: defaultlib 'MSVCRT' conflicts with use of other libs; use /NODEFAULTLIB:library 1>D:\Projects\dem-bones\build_debug\Debug\DemBones.exe : fatal error LNK1319: 184 mismatches detected 1>Done building project "DemBonesCmd.vcxproj" -- FAILED. ========== Build: 0 succeeded, 1 failed, 1 up-to-date, 0 skipped ==========

    opened by tang1485 2
  • Question about lockW/lockM

    Question about lockW/lockM

    There are finished skin meshes and animations, and then I added some blend shapes. I added some new bones at the origin without animation, and set lockM to 0 for those new bones. (The original bone is set to 1) Set the lockW value of the deformation vertex to 0. (set Others to 1) Set matrix w and matrix m with original data,set w value of new bones to 0, and m value of new bones to Matrix4::Identity(). I want these bones to replace blend shapes,but it did not work. The result of the compute is that these bones are still at the origin, and there are no vertices with their weights. I don't know how to work properly

    opened by Space-Invader-GS 1
  • Could it be possible to transform joint scale?

    Could it be possible to transform joint scale?

    Hi and thanks a lot for this, it works very well !

    I was wondering if it could be possible to allow joint scale to better match the deformed geometry. I think, in some cases where scale is supported, it could help reduce the number of bone needed.

    Thanks again!

    opened by JonasOuellet 1
  • The translation data of bones are always the same! But it changes when view in Maya!

    The translation data of bones are always the same! But it changes when view in Maya!

    Hi, I recently used SSDR created a skeleton animation and write the animation into an .fbx file. Then I tried to use fbxsdk to extract the translation and rotation data of each bone from the animation.

    However, I found that the extracted translation or rotation(both Global or Local ) data are always the same as the initial value, but when I import the fbx file into Maya, the animation looks fine, and the local translation and rotation value of each bone varies over time. The data extraction code are shown below:

    One thing wierd is that I found the number of AnimStack in the .fbx which created by SSDR are always 2. I'm not sure whether this factor leads to my problem.

    bool readFbx(string file_path)
    {
    	FbxManager* Sdkmanager = NULL;
    	fbxsdk::FbxScene* Scene = NULL;
    	bool Result;
    	//prepare the FBX SDK
    	InitializeSdkObjects(Sdkmanager, Scene);
    	FbxString file(file_path.c_str());
    	Result = LoadScene(Sdkmanager, Scene, file.Buffer());
    	vector<FbxString>boneName;
    	vector<fbxsdk::FbxNode*>bone_Node;
    	if (Result == false)
    	{
    		FBXSDK_printf("\n\nAn error occurred while loading the scene...");
    		return Result;
    	}
            else
    	{
    		// get the name of each bones of the skeleton
    		fbxsdk::FbxNode* root = Scene->GetRootNode();
    		for (int i = 0; i < root->GetChildCount(); ++i)
    		{
    			fbxsdk::FbxNode* pNode = root->GetChild(i);
    			fbxsdk::FbxNodeAttribute::EType lAttributeType;
    			if (pNode->GetNodeAttribute() == NULL)
    			{
    				FBXSDK_printf("NULL Node Attribute\n\n");
    			}
    			else
    			{
    				lAttributeType = (pNode->GetNodeAttribute()->GetAttributeType());
    				switch (lAttributeType)
    				{
    				case fbxsdk::FbxNodeAttribute::eSkeleton:
    					GetSkeletonInformation(boneName, bone_Node, pNode);//遍历节点找到mesh节点
    					break;
    				case FbxNodeAttribute::eCamera:
    					break;
    				default:
    					break;
    				}
    			}
    		}
                    // read the global translation data over time
    		const int AnimStackCount = Scene->GetSrcObjectCount<fbxsdk::FbxAnimStack>();
    		for (int i = 0; i < AnimStackCount; ++i)
    		{
    			fbxsdk::FbxAnimStack* pstack = Scene->GetSrcObject<fbxsdk::FbxAnimStack>(i);
    			const char* stackname = pstack->GetName();
    			cout << "Stack: " << stackname << endl;
    
    			const int nLayerCount = pstack->GetMemberCount();
    			for (int j = 0; j < nLayerCount; ++j)
    			{
    				fbxsdk::FbxAnimLayer* pLayer = pstack->GetMember<fbxsdk::FbxAnimLayer>(j);
    				const char* layername = pLayer->GetName();
    				cout << "Layer: " << layername << endl;
    				fbxsdk::FbxAnimCurve* lCurveRX = bone_Node[0]->LclRotation.GetCurve(pLayer, FBXSDK_CURVENODE_COMPONENT_X, false);
    				if (lCurveRX == NULL)
    				{
    					continue;
    				}
    				int pRXCount = lCurveRX->KeyGetCount();
    				for (int s = 0; s < pRXCount; ++s)
    				{
    					FbxTime ktime = lCurveRX->KeyGetTime(s);
    					vector<float> bone_position;
    					for (int bone = 0; bone < bone_Node.size(); ++bone)
    					{
    						FbxAMatrix GLOBAL = bone_Node[bone]->EvaluateLocalTransform(ktime);
    						FbxVector4 T = GLOBAL.GetT();
    						
    						fbxsdk::FbxString tmpName("LiYuanQian_rig_v001:Root_M");
    						if (boneName[bone] == tmpName)
    						{
    							cout << tmpName.Buffer() << "frame: " << s << " trans:" << T[0] << "," << T[1] << "," << T[2] << "." << " ktime"  << endl;;
    						}
    						
    						for (int k = 0; k < 3; ++k)
    						{
    							bone_position.push_back(T[k]);
    							
    						}
    					}
    				}
    
    			}
    		}
    		return Result;
    	}
    }
    
    opened by ANYMS-A 1
  • Consultation about bone joints constraints

    Consultation about bone joints constraints

    Thanks sincerely for sharing your code on Github, But I still have a few confusion. I don't see any code implementing bone joints constraints. I don't know if I missed something or you have not updated it yet.

    opened by OvidZheng 1
  • Template error message in VS2019

    Template error message in VS2019

    Hello,

    I am getting the following error messages when I compile demBones in VS2019:

    Error: Dem::DemBones: use of class templates requires template argument list

    Error C2352 'Dem::DemBones<_Scalar,_AniMeshScalar>::clear': illegal call of non-static member function cmt C:\Users\max\source\repos\cmt\src\DemBones\DemBonesExt.h 108

    The line error is in bold text.

    DemBonesExt.h ... /** @brief Clear all data */ void clear() { fTime.resize(0); boneName.resize(0); parent.resize(0); bind.resize(0, 0); preMulInv.resize(0, 0); rotOrder.resize(0, 0); DemBones::clear(); }

    Any idea? Thx, Max

    opened by mmallmann 1
  • Returning reference to temporary(results in seg fault or undefined behavior)

    Returning reference to temporary(results in seg fault or undefined behavior)

    gcc 7.4.0 reports an warning to this line

    https://github.com/electronicarts/dem-bones/blob/2ab9b0447ad4b8bf4a141b9c65af717e7e2c2e0f/include/DemBones/DemBones.h#L297

    Returning reference to temporary triggers segmentation fault or undefined behavior. Work around is creating an variable.

            VectorX x0 = w.col(i).toDense().cwiseMax(0.0);
            x=indexing_vector(x0, idx.head(nnzi));
    

    Although it is better to fix not returning temp address in Indexing.h

    /home/syoyo/work/dem-bones/include/DemBones/Indexing.h: In instantiation of ‘const typename ArgType::Scalar& Dem::indexing_functor_vector<ArgType, IndexType>::operator()(Eigen::Index) const [with ArgType = Eigen::CwiseBinaryOp<Eigen::internal::scalar_max_op<double, double>, const Eigen::Matrix<double, -1, 1>, const Eigen::CwiseNullaryOp<Eigen::internal::scalar_constant_op<double>, Eigen::Matrix<double, -1, 1> > >; IndexType = Eigen::VectorBlock<Eigen::Array<int, -1, 1>, -1>; typename ArgType::Scalar = double; Eigen::Index = long int]’:
    /home/syoyo/work/dem-bones/ExtLibs/Eigen/Eigen/src/Core/CoreEvaluators.h:430:110:   required from ‘Scalar Eigen::internal::nullary_wrapper<Scalar, NullaryOp, false, true, false>::operator()(const NullaryOp&, IndexType) const [with IndexType = long int; Scalar = double; NullaryOp = Dem::indexing_functor_vector<Eigen::CwiseBinaryOp<Eigen::internal::scalar_max_op<double, double>, const Eigen::Matrix<double, -1, 1>, const Eigen::CwiseNullaryOp<Eigen::internal::scalar_constant_op<double>, Eigen::Matrix<double, -1, 1> > >, Eigen::VectorBlock<Eigen::Array<int, -1, 1>, -1> >]’
    /home/syoyo/work/dem-bones/ExtLibs/Eigen/Eigen/src/Core/CoreEvaluators.h:533:37:   required from ‘Eigen::internal::evaluator<Eigen::CwiseNullaryOp<NullaryOp, PlainObjectType> >::CoeffReturnType Eigen::internal::evaluator<Eigen::CwiseNullaryOp<NullaryOp, PlainObjectType> >::coeff(IndexType) const [with IndexType = long int; NullaryOp = Dem::indexing_functor_vector<Eigen::CwiseBinaryOp<Eigen::internal::scalar_max_op<double, double>, const Eigen::Matrix<double, -1, 1>, const Eigen::CwiseNullaryOp<Eigen::internal::scalar_constant_op<double>, Eigen::Matrix<double, -1, 1> > >, Eigen::VectorBlock<Eigen::Array<int, -1, 1>, -1> >; PlainObjectType = Eigen::Matrix<double, -1, 1>; Eigen::internal::evaluator<Eigen::CwiseNullaryOp<NullaryOp, PlainObjectType> >::CoeffReturnType = double]’
    /home/syoyo/work/dem-bones/ExtLibs/Eigen/Eigen/src/Core/AssignEvaluator.h:642:5:   required from ‘void Eigen::internal::generic_dense_assignment_kernel<DstEvaluatorTypeT, SrcEvaluatorTypeT, Functor, Version>::assignCoeff(Eigen::Index) [with DstEvaluatorTypeT = Eigen::internal::evaluator<Eigen::Matrix<double, -1, 1> >; SrcEvaluatorTypeT = Eigen::internal::evaluator<Eigen::CwiseNullaryOp<Dem::indexing_functor_vector<Eigen::CwiseBinaryOp<Eigen::internal::scalar_max_op<double, double>, const Eigen::Matrix<double, -1, 1>, const Eigen::CwiseNullaryOp<Eigen::internal::scalar_constant_op<double>, Eigen::Matrix<double, -1, 1> > >, Eigen::VectorBlock<Eigen::Array<int, -1, 1>, -1> >, Eigen::Matrix<double, -1, 1> > >; Functor = Eigen::internal::assign_op<double, double>; int Version = 0; Eigen::Index = long int]’
    /home/syoyo/work/dem-bones/ExtLibs/Eigen/Eigen/src/Core/AssignEvaluator.h:501:7:   required from ‘static void Eigen::internal::dense_assignment_loop<Kernel, 1, 0>::run(Kernel&) [with Kernel = Eigen::internal::generic_dense_assignment_kernel<Eigen::internal::evaluator<Eigen::Matrix<double, -1, 1> >, Eigen::internal::evaluator<Eigen::CwiseNullaryOp<Dem::indexing_functor_vector<Eigen::CwiseBinaryOp<Eigen::internal::scalar_max_op<double, double>, const Eigen::Matrix<double, -1, 1>, const Eigen::CwiseNullaryOp<Eigen::internal::scalar_constant_op<double>, Eigen::Matrix<double, -1, 1> > >, Eigen::VectorBlock<Eigen::Array<int, -1, 1>, -1> >, Eigen::Matrix<double, -1, 1> > >, Eigen::internal::assign_op<double, double>, 0>]’
    /home/syoyo/work/dem-bones/ExtLibs/Eigen/Eigen/src/Core/AssignEvaluator.h:767:37:   required from ‘void Eigen::internal::call_dense_assignment_loop(DstXprType&, const SrcXprType&, const Functor&) [with DstXprType = Eigen::Matrix<double, -1, 1>; SrcXprType = Eigen::CwiseNullaryOp<Dem::indexing_functor_vector<Eigen::CwiseBinaryOp<Eigen::internal::scalar_max_op<double, double>, const Eigen::Matrix<double, -1, 1>, const Eigen::CwiseNullaryOp<Eigen::internal::scalar_constant_op<double>, Eigen::Matrix<double, -1, 1> > >, Eigen::VectorBlock<Eigen::Array<int, -1, 1>, -1> >, Eigen::Matrix<double, -1, 1> >; Functor = Eigen::internal::assign_op<double, double>]’
    /home/syoyo/work/dem-bones/ExtLibs/Eigen/Eigen/src/Core/AssignEvaluator.h:926:31:   [ skipping 3 instantiation contexts, use -ftemplate-backtrace-limit=0 to disable ]
    /home/syoyo/work/dem-bones/ExtLibs/Eigen/Eigen/src/Core/AssignEvaluator.h:808:18:   required from ‘void Eigen::internal::call_assignment(Dst&, const Src&) [with Dst = Eigen::Matrix<double, -1, 1>; Src = Eigen::CwiseNullaryOp<Dem::indexing_functor_vector<Eigen::CwiseBinaryOp<Eigen::internal::scalar_max_op<double, double>, const Eigen::Matrix<double, -1, 1>, const Eigen::CwiseNullaryOp<Eigen::internal::scalar_constant_op<double>, Eigen::Matrix<double, -1, 1> > >, Eigen::VectorBlock<Eigen::Array<int, -1, 1>, -1> >, Eigen::Matrix<double, -1, 1> >]’
    /home/syoyo/work/dem-bones/ExtLibs/Eigen/Eigen/src/Core/PlainObjectBase.h:779:32:   required from ‘Derived& Eigen::PlainObjectBase<Derived>::_set(const Eigen::DenseBase<OtherDerived>&) [with OtherDerived = Eigen::CwiseNullaryOp<Dem::indexing_functor_vector<Eigen::CwiseBinaryOp<Eigen::internal::scalar_max_op<double, double>, const Eigen::Matrix<double, -1, 1>, const Eigen::CwiseNullaryOp<Eigen::internal::scalar_constant_op<double>, Eigen::Matrix<double, -1, 1> > >, Eigen::VectorBlock<Eigen::Array<int, -1, 1>, -1> >, Eigen::Matrix<double, -1, 1> >; Derived = Eigen::Matrix<double, -1, 1>]’
    /home/syoyo/work/dem-bones/ExtLibs/Eigen/Eigen/src/Core/Matrix.h:225:24:   required from ‘Eigen::Matrix<_Scalar, _Rows, _Cols, _Options, _MaxRows, _MaxCols>& Eigen::Matrix<_Scalar, _Rows, _Cols, _Options, _MaxRows, _MaxCols>::operator=(const Eigen::DenseBase<OtherDerived>&) [with OtherDerived = Eigen::CwiseNullaryOp<Dem::indexing_functor_vector<Eigen::CwiseBinaryOp<Eigen::internal::scalar_max_op<double, double>, const Eigen::Matrix<double, -1, 1>, const Eigen::CwiseNullaryOp<Eigen::internal::scalar_constant_op<double>, Eigen::Matrix<double, -1, 1> > >, Eigen::VectorBlock<Eigen::Array<int, -1, 1>, -1> >, Eigen::Matrix<double, -1, 1> >; _Scalar = double; int _Rows = -1; int _Cols = 1; int _Options = 0; int _MaxRows = -1; int _MaxCols = 1]’
    /home/syoyo/work/dem-bones/include/DemBones/DemBones.h:303:6:   required from ‘void Dem::DemBones<_Scalar, _AniMeshScalar>::computeWeights() [with _Scalar = double; _AniMeshScalar = float]’
    /home/syoyo/work/dem-bones/include/DemBones/DemBones.h:344:18:   required from ‘void Dem::DemBones<_Scalar, _AniMeshScalar>::compute() [with _Scalar = double; _AniMeshScalar = float]’
    /home/syoyo/work/dem-bones/src/command/mainCmd.cpp:171:16:   required from here
    /home/syoyo/work/dem-bones/include/DemBones/Indexing.h:106:30: warning: returning reference to temporary [-Wreturn-local-addr]
       return m_arg(m_indices[idx]);
    
    opened by syoyo 1
  • 20 bones are generated in the setting, but 1 bone is actually generated

    20 bones are generated in the setting, but 1 bone is actually generated

    企业微信截图_16717911703795

    Initializing bones: 1>1 Only 1 bone was generated in .fbx file Is there anything not set? How to generate 20 bones normally。 Looking forward to your reply

    opened by Wyhzxc 0
  • Patience & Tolerance values hard-coded to 3 and 1e-3 respectively

    Patience & Tolerance values hard-coded to 3 and 1e-3 respectively

    In class MyDemBones of mainCmd.cpp, the member variables tolerance and patience are initialized to (1e-3) and (3).

    However, these values are never updated to those passed in via the command line.

    It looks like the following lines must be added to the main function to ensure that the user-provided arguments are being respected:

    model.tolerance = dbOptions.tolerance;
    model.patience = dbOptions.patience;
    
    opened by RajatG-SideFX 0
  • Can it decompose multi sequences with the same initial pose in the meantime?

    Can it decompose multi sequences with the same initial pose in the meantime?

    I have some .abc files and the init pose .fbx.

    Do I need to concatenate all the motion sequences into one .abc file? or I can use some scripts to decompose multi sequences in the meantime?

    opened by kunkun0w0 0
  • Weird Composition Result

    Weird Composition Result

    image

    The script I used: call "../bin/Windows/DemBones.exe" -i="dress.fbx" -a="dress_shape00_01_01.abc" -b=40 -o="dress_40.fbx" -n=100 --nWeightsIters=3 -z=8

    The decomposition result looks terrible. Can you give some suggestions?

    image

    opened by kunkun0w0 0
  • Animation of the skeleton fitted to mesh animation with only rotation change in each keyframe

    Animation of the skeleton fitted to mesh animation with only rotation change in each keyframe

    Hi, First, I want to say that I'm very impressed with DemBones solution and its possibilities. I'm wondering if it is possible to obtain the output animation of the RIG with changed only the rotation in the joints (translation would be only applied to the root). From the documentation of the parameters, it is not obvious to me how to achieve this. There is a demLockparameter, but it seems to lock the whole transformation of the joint in the animation.

    opened by ArcaneShadow82 8
  • The dem bones llvm library  executable not working on M1 Macbooks

    The dem bones llvm library executable not working on M1 Macbooks

    The issue is as :

    mac@Ayushs-MacBook-Pro MacOS % ./dembones -a=a.abc -i=a.fbx -o=out.fbx -b=16 dyld: Library not loaded: /usr/local/opt/llvm/lib/libomp.dylib Referenced from: /Users/mac/Desktop/dem-bones-1.2.0/bin/MacOS/./dembones Reason: no suitable image found. Did find: /usr/local/opt/llvm/lib/libomp.dylib: mach-o, but wrong architecture /usr/local/opt/llvm/lib/libomp.dylib: mach-o, but wrong architecture zsh: abort ./dembones -a=a.abc -i=a.fbx -o=out.fbx -b=16

    opened by Tekh-ops 2
Releases(v1.2.1)
  • v1.2.1(Jun 17, 2021)

  • v1.2.0(Jul 21, 2020)

    • Add stop on convergence to cbIterEnd(), cbWeightsIterEnd(), cbTransformationsIterEnd()
    • Add --bindUpdate=2 flag in the command line tool to group joints
    • Add --tolerance and --patience flags in the command line tool using cbIterEnd()
    Source code(tar.gz)
    Source code(zip)
  • v1.1.0(Jul 9, 2020)

    • Add per-bone transformation hard-lock and per-vertex weights soft-lock
    • Fix initialization issue on cluster splitting
    • Support joint orientation in command line tools
    • Add command line tool for Linux
    • FBXSDK 2020, Alembic (from Maya 2020 DevKit)
    Source code(tar.gz)
    Source code(zip)
  • v1.0.1(Jun 18, 2020)

  • v1.0.0(Jun 18, 2020)

Owner
Electronic Arts
Electronic Arts
Official code release for ICCV 2021 paper SNARF: Differentiable Forward Skinning for Animating Non-rigid Neural Implicit Shapes.

Official code release for ICCV 2021 paper SNARF: Differentiable Forward Skinning for Animating Non-rigid Neural Implicit Shapes.

null 235 Dec 26, 2022
Genetic Algorithm, Particle Swarm Optimization, Simulated Annealing, Ant Colony Optimization Algorithm,Immune Algorithm, Artificial Fish Swarm Algorithm, Differential Evolution and TSP(Traveling salesman)

scikit-opt Swarm Intelligence in Python (Genetic Algorithm, Particle Swarm Optimization, Simulated Annealing, Ant Colony Algorithm, Immune Algorithm,A

郭飞 3.7k Jan 3, 2023
potpourri3d - An invigorating blend of 3D geometry tools in Python.

A Python library of various algorithms and utilities for 3D triangle meshes and point clouds. Managed by Nicholas Sharp, with new tools added lazily as needed. Currently, mainly bindings to C++ tools from geometry-central.

Nicholas Sharp 295 Jan 5, 2023
Learning Skeletal Articulations with Neural Blend Shapes

This repository provides an end-to-end library for automatic character rigging and blend shapes generation as well as a visualization tool. It is based on our work Learning Skeletal Articulations with Neural Blend Shapes that is published in SIGGRAPH 2021.

Peizhuo 504 Dec 30, 2022
Automatically download the cwru data set, and then divide it into training data set and test data set

Automatically download the cwru data set, and then divide it into training data set and test data set.自动下载cwru数据集,然后分训练数据集和测试数据集

null 6 Jun 27, 2022
Voxel Set Transformer: A Set-to-Set Approach to 3D Object Detection from Point Clouds (CVPR 2022)

Voxel Set Transformer: A Set-to-Set Approach to 3D Object Detection from Point Clouds (CVPR2022)[paper] Authors: Chenhang He, Ruihuang Li, Shuai Li, L

Billy HE 141 Dec 30, 2022
Semi-Supervised 3D Hand-Object Poses Estimation with Interactions in Time

Semi Hand-Object Semi-Supervised 3D Hand-Object Poses Estimation with Interactions in Time (CVPR 2021).

null 96 Dec 27, 2022
A real-time motion capture system that estimates poses and global translations using only 6 inertial measurement units

TransPose Code for our SIGGRAPH 2021 paper "TransPose: Real-time 3D Human Translation and Pose Estimation with Six Inertial Sensors". This repository

Xinyu Yi 261 Dec 31, 2022
Some useful blender add-ons for SMPL skeleton's poses and global translation.

Blender add-ons for SMPL skeleton's poses and trans There are two blender add-ons for SMPL skeleton's poses and trans.The first is for making an offli

犹在镜中 154 Jan 4, 2023
An addon uses SMPL's poses and global translation to drive cartoon character in Blender.

Blender addon for driving character The addon drives the cartoon character by passing SMPL's poses and global translation into model's armature in Ble

犹在镜中 153 Dec 14, 2022
With this package, you can generate mixed-integer linear programming (MIP) models of trained artificial neural networks (ANNs) using the rectified linear unit (ReLU) activation function

With this package, you can generate mixed-integer linear programming (MIP) models of trained artificial neural networks (ANNs) using the rectified linear unit (ReLU) activation function. At the moment, only TensorFlow sequential models are supported. Interfaces to either the Pyomo or Gurobi modeling environments are offered.

ChemEngAI 40 Dec 27, 2022
Simple Linear 2nd ODE Solver GUI - A 2nd constant coefficient linear ODE solver with simple GUI using euler's method

Simple_Linear_2nd_ODE_Solver_GUI Description It is a 2nd constant coefficient li

:) 4 Feb 5, 2022
Hitters Linear Regression - Hitters Linear Regression With Python

Hitters_Linear_Regression Kullanacağımız veri seti Carnegie Mellon Üniversitesi'

AyseBuyukcelik 2 Jan 26, 2022
Neon-erc20-example - Example of creating SPL token and wrapping it with ERC20 interface in Neon EVM

Example of wrapping SPL token by ERC2-20 interface in Neon Requirements Install

null 7 Mar 28, 2022
Example-custom-ml-block-keras - Custom Keras ML block example for Edge Impulse

Custom Keras ML block example for Edge Impulse This repository is an example on

Edge Impulse 8 Nov 2, 2022
Python-kafka-reset-consumergroup-offset-example - Python Kafka reset consumergroup offset example

Python Kafka reset consumergroup offset example This is a simple example of how

Willi Carlsen 1 Feb 16, 2022
This is our ARTS test set, an enriched test set to probe Aspect Robustness of ABSA.

This is the repository for our 2020 paper "Tasty Burgers, Soggy Fries: Probing Aspect Robustness in Aspect-Based Sentiment Analysis". Data We provide

null 35 Nov 16, 2022
Open-Set Recognition: A Good Closed-Set Classifier is All You Need

Open-Set Recognition: A Good Closed-Set Classifier is All You Need Code for our paper: "Open-Set Recognition: A Good Closed-Set Classifier is All You

null 194 Jan 3, 2023