A Multi-Scale Model for Simulating Liquid-Hair Interactions
libWetHair is an open source project for the physical simulation of liquid and wet hairs. It has been compiled and tested on Mac OS X (with both Intel and Apple M1 chips), Ubuntu Linux, Windows, and licensed under the Mozilla Public License v. 2.0.
We would like to hear from you if you appreciate this work.
It is the original implementation of paper A Multi-Scale Model for Simulating Liquid-Hair Interactions (refer to our project page for more details). This code base contains the following parts:
libWetHair has several dependencies and by default it will fetch them through CMake's FetchContent
. Please make sure your internet is smooth before the first time of configuration.
Alternatively, if preferring a package manager, one can turn on the switch LIBWETHAIR_FIND_DEPENDENCIES
, which will have cmake to find those dependencies through a package manager.
libWetHair has been tested with AppleClang (under Mac OS X), GCC 4.8+ (under Linux), and Microsoft Visual Studio (under Windows 10).
To compile libWetHair, you'll need CMake or CMake-GUI (https://cmake.org).
For CMake:
cmake -G "Visual Studio 17 2022" -A x64
to generate a project for Visual Studio 2022 using x64 architecture.Similar (or more convenient) configuration can be done in CMake-GUI.
In addition, to configure for the demo on Windows, you'll need to have fxc.exe
contained in one of the directories specified through your system's PATH
environment variable. This executable is usually under your installation directory for Windows SDK (e.g., for Windows 10, it's in a directory named with a specific SDK version under C:\Program Files (x86)\Windows Kits\10\bin
).
To run the demo of libWetHair, you may simply use the command line argument -s [scene_file] to specify the scene to be loaded. For example, you may type
./libWetHair -s assets/unit_tests/cylinder_2.xml
to run the simulation of the scene containing two hairs being cohesive to each other.
All the parameters can be modified offline in the scene description XML files. Some can be changed online in the user interface provided by the demo program.
USAGE:
./libWetHair [-j
Where:
-j
-o
-d
-g
-p
-s
--, --ignore_rest Ignores the rest of the labeled arguments following this flag.
--version Displays version information and exits.
-h, --help Displays usage information and exits.
Please contact the author ([email protected]) for questions and bug report, or consulting for the usage of this code base.
@article{Fei:2017:liquidhair, title={A Multi-Scale Model for Simulating Liquid-Hair Interactions}, author={Fei, Yun (Raymond) and Maia, Henrique Teles and Batty, Christopher and Zheng, Changxi and Grinspun, Eitan}, journal={ACM Trans. Graph.}, volume={36}, number={4}, year={2017}, doi={10.1145/3072959.3073630}, }