Realtime CPU Cloth
Realtime CPU Cloth - 1
Ian Mallett (geometrian)
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 cloth.py. Press ESCAPE to exit, or any other key to restart the simulation. Mouse Left-Click and drag to rotate, scroll wheel zooms. Enjoy.
Pygame.org account Comments
If you wish to leave a comment with your pygame.org account, please sign in first.