Skip to content

jspdown/cloth

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

37 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Cloth Simulation

This is a cloth simulation project that uses extended position based dynamic (XPBD) and small step techniques. The project is implemented using WebGPU and the simulation runs entirely on the GPU.

Demo

You can see a live demo of this project at this link.

Installation

To run this project locally, follow these steps:

  1. Clone the repository to your local machine:
git clone https://github.com/your-username/cloth-simulation-project.git
  1. Navigate to the project directory:
cd cloth-simulation-project
  1. Install the dependencies:
yarn install
  1. Start the development server:
yarn start
  1. Open Google Chrome and go to localhost:3000 to see the project in action.

If you are on a Linux machine you need to install the latest google-chrome-unstable version. Then, chrome will have to be started using the following parameters:

google-chrome-unstable \
        --enable-features=Vulkan,UseSkiaRenderer \
        --enable-unsafe-webgpu

Tested on Google Chrome (dev) >= Version 104.0.5083.0

Usage

To use the project, you can interact with the cloth simulation by clicking and dragging on the cloth surface. You can also adjust various parameters such as the bend and stretch compliance using the control panel on the right side of the screen.

Implementation

This project is based on the following papers:

The simulation runs on the GPU using a parallel Gauss-Seidel (constraint graph coloring).

About

WebGPU XPBD based cloth simulation

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published