Skip to content

CTP314/PBD-simulation

Repository files navigation

Collision Simulation

alt text

You can see all scens in demos.

Installation

pip install -r requirements.txt

Usage

Run simulation

Use customized config

python main.py --config-path configs\tests\<scene.yaml> --record --duration <duration>

For example,

  • Bunny trampoline
python main.py --config-path configs\tests\clothes_rigid.yaml --record --duration 3 --export

Export video

python -m scripts.frames2video --exp_dir <exp dir>

For example,

python -m scripts.frames2video --exp_dir .\exps\rigids_2024-11-29_143530\

Fluid Surface Reconstruction

python .\scripts\surface_reconstruction.py --input-dir <exp dir> --radius <fluid particle radius>

Blender Rendering

 python render.py --scene-file <scene file>--input-dir <exp dir> --num-workers 1 --device-type OPTIX --quality high    

References

  • The code framework in this project was based on code from PBD_Tachi. The original implementation is only supports for cpu and not support rigid body. To address this, we enhanced the system to allow the addition of multiple objects (add particle function) and implemented parallel computation for faster constraint solving (constraint solver in constraint class). We also add rigid body shape matching and fixed-point constraints, enabling the addition of rigid bodies and support for more customizable scenes.

  • The src/voxelization in this project references the implementation from PBD.

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Packages

No packages published

Contributors 2

  •  
  •  

Languages