Cloth simulation

Feel like posting Off Topic? Do it here.

Moderator: MaxCoderz Staff

Post Reply
CoBB
MCF Legend
Posts: 1601
Joined: Mon 20 Dec, 2004 8:45 am
Location: Budapest, Absurdistan
Contact:

Cloth simulation

Post by CoBB »

I made this one from the previous rope program, check it out:

http://www.hszk.bme.hu/~pg429/rongyocska/

Needs glut, windows users can get it here if the program doesn't work (just put glut32.dll in the same dir):

http://www.xmission.com/~nate/glut.html

You should be able to compile it under Debian after installing the freeglut3-dev package.
Kozak
Maxcoderz Staff
Posts: 791
Joined: Fri 17 Dec, 2004 5:33 pm
Location: On the dark side of the moon.
Contact:

Post by Kozak »

It looks cool, what can I say..keep up the good work!
"They say that sea was created by a man named Maarten Zwartbol, a long time ago...." - Duck, an old Corbin version
Duck
Sir Posts-A-Lot
Posts: 231
Joined: Sat 18 Dec, 2004 3:38 am

Post by Duck »

Looks nice! What strikes me is that the cloth has thickness. I havent seen that in other cloth simulations before. Also, the cloth seems to have hit detection on itself?
User avatar
tr1p1ea
Maxcoderz Staff
Posts: 4141
Joined: Thu 16 Dec, 2004 10:06 pm
Location: I cant seem to get out of this cryogenic chamber!
Contact:

Post by tr1p1ea »

WOW CoBB ... THATS AWESOME!

And fast too. Do you think you could stop being a genius for just a few seconds? :).
Last edited by tr1p1ea on Sat 01 Jan, 2005 3:04 am, edited 1 time in total.
"My world is Black & White. But if I blink fast enough, I see it in Grayscale."
Image
Image
CoBB
MCF Legend
Posts: 1601
Joined: Mon 20 Dec, 2004 8:45 am
Location: Budapest, Absurdistan
Contact:

Post by CoBB »

Yes, that's what I'm quite happy with: it has quite fast self-collision detection and cloths can collide with each other too (just release the red one on top of the blue to see it pour down slowly after being shot with a ball). Actually, that's almost the same thing. It also performs surface subdivision on the fly, quadrupling the resolution of the cloth at almost zero cost. Stability is fine as well, I could double the time step at this point without the simulation exploding.

The code is really a big blob of mess, but at least it's fast. :) In fact, this was made as an assignment for my Computer Graphics class.
coelurus
Calc Wizard
Posts: 585
Joined: Sun 19 Dec, 2004 9:02 pm
Location: Sweden
Contact:

Post by coelurus »

Nice stuff, I liked the thing with thick cloths too :)

EDIT: Ah, I thought it looked weird when I disabled subdivision... I thought the answer would eventually pop up so I didn't dare to ask.
Last edited by coelurus on Fri 31 Dec, 2004 7:35 pm, edited 1 time in total.
CoBB
MCF Legend
Posts: 1601
Joined: Mon 20 Dec, 2004 8:45 am
Location: Budapest, Absurdistan
Contact:

Post by CoBB »

Actually, the thickness is just visual, with the sole aim of hiding the inaccuracy of collisions. :) The real simulated system is revealed by disabling the subdivision.
Post Reply