A Multi-Scale Model for Coupling Strands with Shear-Dependent Liquid
CreamyStrand is an open source project for the physical simulation of the coupling between hairs and shear-dependent liquid. It supports Linux and 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 Coupling Strands with Shear-Dependent Liquid ( refer to our project page for more details: http://www.cs.columbia.edu/cg/creamystrand/ ). This code base contains the following parts:
CreamyStrand depends on following libraries (some of them have been included in the code base, marked with asterisk):
On Linux-based systems, most of the dependencies are either included, or can be easily installed with the APT package handling utility. For Intel MKL, you may download and install from the link provided above. For GLUT on Windows, you may acquire the binaries from the NVIDIA Cg Toolkit (https://developer.nvidia.com/cg-toolkit)
For parallelization, CreamyStrand uses the OpenMP library.
On Windows you may need manually download and compile some of the dependencies. More details refer to the compilation section below.
CreamyStrand has been tested with GCC 4.8+ (under Linux), and MSVC (under Windows 10 and Visual Studio 2019).
To compile CreamyStrand, you’ll need CMake or CMake-GUI (https://cmake.org).
Before the following process, you’d make sure the environment variable BOOST_ROOT
has been set to the installation location of Boost (the directory that contains include
and lib
folders of Boost).
Command Line:
CMake-GUI:
To run the demo of CreamyStrand, you may simply use the command line argument -f [scene_file] to specify the scene to be loaded. For example, you may type
./StrandSimulatorApp -f assets/unit_tests/drag/default_strand_cream.xml
to run the simulation of shaving cream poured onto seven pinned strands.
All the parameters can be modified offline in the scene description XML files.
NOTE: For running on Windows, please set the Working Directory to be the directory containing the assets folder. Some examples may read data from the files in this folder.
USAGE:
./StrandSimulatorApp [-l <0-2>] [-d
Where:
-l <0-2>, —statlog <0-2>
Log runtime stats: 0: no stats, 1: timestep stats, 2: all stats
-d
Run the simulation with display enabled if 1, without if 0
-c
Between # steps several binary files are written to cache simulation state to
-o
Between # steps several PLY files are written to save simulation state to
-f
(required) XML file for a problem
—, —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.
Our simulator can generate PLY files that can be read back by SideFX Houdini.
You may run the demo with the “-o” option. For example, you may type
./StrandSimulatorApp -f assets/unit_tests/drag/default_strand_cream.xml -o 4
to generate data per 4 time steps (for this example we use 0.001s for the simulation time step, and 0.004s for the rendering time step. Hence 4 time steps is taken for the data generation). The simulation code will create a folder with the name of the scene file and timestamp, which contains all the generated data.
For more information and tutorials of Houdini, please visit the SideFX website (https://www.sidefx.com/).
Please contact the author (fyun@acm.org) for questions and bug report, or consulting for the usage of this code base.
@article{fei2019mmc,
author = {Fei, Yun (Raymond) and Batty, Christopher and Grinspun, Eitan and Zheng, Changxi},
title = {A Multi-scale Model for Coupling Strands with Shear-Dependent Liquid},
journal = {ACM Trans. Graph.},
issue_date = {November 2019},
volume = {38},
number = {6},
month = nov,
year = {2019},
pages = {1:1—1:20},
articleno = {1},
numpages = {20},
url = {http://doi.acm.org/10.1145/},
doi = {10.1145/3355089.3356532},
acmid = {3356532},
publisher = {ACM},
address = {New York, NY, USA}
}