Skip to content

Fek04/BlenderDeformableMeshesAddon

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

99 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

BlenderDeformableMeshesAddon

A Blender add-on, I developed for my bachelor's thesis, that enables the physically-based deformation of meshes based on different shape matching algorithms.

Installation

Tested on Linux and Blender versions 4.1.1 and 4.2.1

Works on Windows as well but with some caveats (see below)

  1. clone the repo
  2. Make sure you have cmake and eigen installed on your system.
  3. Go to /cpp_extension and change the CMakeLists.txt so that it will work for you:
    • In the line find_package(Python 3.11 COMPONENTS Interpreter ${DEV_MODULE} REQUIRED) modify the python version to match the python version of Blender
    • In the line INCLUDE_DIRECTORIES ( "/usr/include/eigen3" ) make sure the given path points to your eigen installation
  4. Run cmake -S . -B build in the /cpp_extension directory of the project (make sure you are in an environment with the same python version as blender and nanobind installed)
  5. To actually build the c file, run cmake --build build
  6. Execute makezip.py to build the addon zip that can be installed in Blender
    • This can fail if there are multiple or none "c_functions.*.so" files in the build directory

The Blender python version can be found in the console in the scripting environment of Blender

Notes for the installation on windows:

  • For some reason, the add-on is slower on Windows, so I recommend working with it on Linux
  • For the Neo-Hookean and the Hookean method, the precomputation throws many assertion errors which can be ignored. The first simulation step after the precomputation will then collapse the object but after resetting the mesh, it works as intended.
  • The Volume Conservation Constraint also throws an error which can be ignored without consequences
  • I had trouble getting cmake to find the C and C++ compilers. Installing Visual Studio 17 (2022) with the C++ development packages and then specifying this generator in the cmake command solved this issue.
  • When specifying paths in the CMakeLists.txt, backslashes need to be replaced by slashes
  • After step 5 the build files are not in build\ but rather in build\Debug and it isnt a *.so file, it is a *.pyd file.
  • Because of this makezip.py does not work. Please use makezipWindows.py instead.

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors