This is the code of 2023 TVCG paper entitled "A Unified Particle-Based Solver for non-Newtonian Behaviors Simulation".
Authors: Chunlei Li, Yang Gao , Jiayi He, Tianwei Cheng, Shuai Li, Aimin Hao, Hong Qin
System: Windows 10
arxiv: https://arxiv.org/abs/2312.04814
DOI: 10.1109/TVCG.2023.3341453
Paper, Latex and presentation: https://github.com/chunleili/nonNewtonPaper
Code: https://github.com/chunleili/nonNewtonCode
bibtex:
@article{nonNewton,
Author = {Li, Chunlei and Gao, Yang and He, Jiayi and Cheng, Tianwei and Li, Shuai
and Hao, Aimin and Qin, Hong},
Title = {A Unified Particle-Based Solver for Non-Newtonian Behaviors Simulation},
Journal = {IEEE TRANSACTIONS ON VISUALIZATION AND COMPUTER GRAPHICS},
Year = {2024},
Volume = {30},
Number = {4},
Pages = {1998-2010},
Month = {APR},
DOI = {10.1109/TVCG.2023.3341453},
ISSN = {1077-2626},
EISSN = {1941-0506},
Unique-ID = {WOS:001173975500002},
}
You only need to run the auto.py
if you want to verify the replicability.
python auto.py
It will generate the results of Honey case(Fig.8).
The following sections are for those who want to fully reproduce the paper's reuslts.
Requirements:
- Visual Studio 2022
- VS Code
- cmake 3.25
Follow the steps:
- config
cmake --preset vs2022
- build
cmake --build --preset vs2022-Rel
Suppose you are in project directory.
- Armadillo scene(Fig.14)
./bin/SPHSimulator --scene-file ../data/MyScenes/ramp1.json --no-initial-pause
A visualizer will prompt out. Use mouse wheel to scale up and down. Use middle button to pan.
- Honey scene(Fig.8)
./bin/SPHSimulator --scene-file ../data/MyScenes/strawberry_honey.json --no-initial-pause
- Cut melting bunny scene(Fig.9)
./bin/SPHSimulator --scene-file ../data/MyScenes/hotcut.json --no-initial-pause
- Ice cream scene(Fig.10)
./bin/SPHSimulator --scene-file ../data/MyScenes/ice-cream.json --no-initial-pause
- Cow scene(Fig.7)
./bin/SPHSimulator --scene-file ../data/MyScenes/cow.json --no-initial-pause
- Golf falls into cornstarch-water mixture scene(Fig.12)
./bin/SPHSimulator --scene-file ../data/MyScenes/bowl2.json --no-initial-pause
- Ketchup scene(Fig.13)
./bin/SPHSimulator --scene-file ../data/MyScenes/bowl_ketchup.json --no-initial-pause
Because the rendering using houdini involves non-free CG assets and softwares, the authors are not responsible for any questions in replicating the rendering results.
Output files locate in ./bin/<scene_name>/mypartio/. Load them with Houdini 19.5 for rendering.
The Houdini hip files locate in data/Houdini_scenes
Some may encounter the compiling issues when using the latest vs2022(version 17.8.3), which are related to partio and antTweakBar. But do not worry about that, these will not interfere with the normal running of the code.
This code is based on the Jan Bender's: https://github.com/InteractiveComputerGraphics/SPlisHSPlasH
Ubuntu 22.04(WSL1) is tested.
cmake -B build -DCMAKE_BUILD_TYPE=Release
cmake --build build -j 8
./bin/SPHSimulator --no-gui --scene-file ../data/MyScenes/ramp1.json --no-initial-pause