Skip to main content

Realtime CPU Cloth

A modest OpenGL demo demonstrating cloth running on the CPU.

Ian Mallett
I'm working on a new game, and the characters need clothes! So, I've been looking into ways for simulating cloth. A great method is to consider the cloth as a grid, with each point being linked to neighboring points by mathematical "springs".

The CPU is rather slow at massively parallel tasks like this, and so the resolution of the grid must be fairly small. I'm currently working on improving a GPU cloth implementation that can run much more detailed grids, though it is currently suffering from precision errors. In addition, the cloth can be rendered solid much more easily. When it is complete, it will be included in my new OpenGL Library (sneak peak included here) standard--you'll only need a few calls.

The demo is very straightforward. Run Press ESCAPE to exit, or any other key to restart the simulation. Mouse Left-Click and drag to rotate, scroll wheel zooms. Enjoy.



Home Page


Realtime CPU Cloth 1 — 28 Jul, 2009

Realtime CPU Cloth 2 — 27 Dec, 2012 account Comments