Cloth Simulation
A GPU-accelerated cloth simulation.

Key Features
- GPU-accelerated cloth simulation
- Air resistance / wind interaction
- Collision handling
- Self-collision handling
Description
This was my submission for a class project in CSCI 5611: Animation & Planning in Games. The goal of this project was to create a realistic cloth simulation by building off of the underlying physical model that defines cloth's behavior. I expanded on this by parallelizing my simulation and running it on the GPU using compute shaders, allowing for higher density cloth and even real-time cloth self-collisions to be simulated.
The cloth was modeled using a 2D mass-spring chain consisting of structural, shear, and bending spring connections between nodes. Each node is simulated using Hooke's law, with additional damping from an air-resistance factor, as well as wind effects introduced by taking into account the facing direction of each node based on the triangles it is a part of.
Demo




Tools Used
Languages: C#, HLSL
Software: Unity