Position Based Dynamics with Unity GPU

April 25, 2023 ยท View on GitHub

This project implemented "Position Based Dynamics" using Unity Compute Shader. It shows faster calculation speed when only CPU operation is used.

  • Changing the xSize and ySize of the Cloth Inspector changes the number of nodes.
  • Changing the width and height of the Cloth Inspector changes the size of the cloth.
  • Changing the stiffness and damp values in the Cloth Inspector changes the deformation strength of the cloth.

Environement

  • Unity 2019.4.1f1
  • C#
  • Compute Shader

The results of the implementation can be seen in the following video.

Cloth Simulation Videos