Sign in to follow this  
favormm

How to simulate the cloth in game

Recommended Posts

I want to simulate the cloth in my demo, it likes in the water, the gravity just approximatively equal the floatage.I have search some materials with google, but most of them are the mode of mass-spring. The result that I want is that there is no spring between masses. I want rigid cloth. who have the materials about it please email me ,thks. My email is: topgiftie@hotmail.com Ares

Share this post


Link to post
Share on other sites
I'm impressed by the number of people trying to do gfx programming when they can't even ask a question right.

Quote:
I want to simulate the cloth in my demo

"THE" cloth? Which one?

Quote:
it likes in the water

It likes water? You mean IT'S IN the water?

Quote:
who have the materials about it please email me ,thks.

Materials as in documentation to read? You typically don't need to let your e-mail on a forum, just read the replies.

Anyway, sorry for the rude answers. If I were you, I would look into NVIDIA PHYSX api and use the cloths they provide, it works great. I can't help on any more complex physics to calculate the thing yourself though. Sorry for that.

Share this post


Link to post
Share on other sites
Quote:
Original post by Dunge
I'm impressed by the number of people trying to do gfx programming when they can't even ask a question right.

Quote:
I want to simulate the cloth in my demo

"THE" cloth? Which one?

Quote:
it likes in the water

It likes water? You mean IT'S IN the water?

Quote:
who have the materials about it please email me ,thks.

Materials as in documentation to read? You typically don't need to let your e-mail on a forum, just read the replies.

Anyway, sorry for the rude answers. If I were you, I would look into NVIDIA PHYSX api and use the cloths they provide, it works great. I can't help on any more complex physics to calculate the thing yourself though. Sorry for that.

I'm impressed (not really) by the number of people who go on insulting/questioning the programming ability of other people based on the fact that English CLEARLY isn't their first language. Show some respect.

That being said I'm really unsure of what you have in mind-- 'rigid cloth' seems an oxymoron. All cloth sims I'm aware of use this spring system exclusively. Are you referring to something along the lines of a thin sheet of metal you can dent, etc. using some other object? I'm fairly sure PhysX does support something like this so it still may be worth investigating.

Share this post


Link to post
Share on other sites
From my understanding of some common and simple forms of cloth simulation, there is no requirement to use spring physics, but not doing so can cause some pretty weird behavior.

The following article discusses a very lean and efficient method of cloth simulation that was used in Hitman:

http://72.14.205.104/search?q=cache:cNhtQgK60hwJ:www.teknikus.dk/tj/gdc2001.htm+http://teknikus.dk/tj/gdc2001.htm&hl=en&ct=clnk&cd=1&gl=us

Removing the spring equation from the "satisfyConstraints()" function and forcing the distance between the two vertices to be the desired length might accomplish what you wish, assuming that you are iterating through the constraints in the proper order (top to bottom of the mesh, for instance).

The relaxation used in this can also be made more accurate by increasing the number of times that you iterate over the mesh.

This has worked wonders for me in the past, even on embedded platforms.

Hope it helps. Best of luck even if it doesn't. :)

-Andrew

Share this post


Link to post
Share on other sites
I'm now impressed that even moderators tell me to cut it out, and even gives me a warning, when I'm trying to help them in their job. You don't want people writing thousands of hard to read posts, you should teach them to be more precise the next time around. Even if doing cloth programming is complex, judging from this guy history he seem to be still at the level to "use libraries to do my job" and that's why I mentioned PhysX. Also, a rigid cloth wasn't making much sense to me neither. I could only had written the last paragraph but it wouldn't have helped him as much. Andrew1P and MikeTacular answers are the correct ones if anyone else want to look into it.

InvalidPointer : English isn't my primary language neither.

Again sorry to hijack this thread or anything, but it's not the first time I get flamed here for helping when I though people would actually agree with me. I was indeed rude, but I acknowledged it and it's for his own good.

[Edited by - Dunge on November 12, 2008 2:57:30 PM]

Share this post


Link to post
Share on other sites
Quote:
Original post by Dunge
I'm now impressed that even moderators tell me to cut it out when I'm trying to help them in their job.
One can be helpful, and still be a dick about it. In order to post here, you must not only be helpful (or at least do your best to be), but additionally not be a dick. I understand that you were trying to give him both help and meta-help, and that's laudable. If you want to criticize his english, that's fine, and definitely warranted here, but please do it in a friendly and respectful manner.

Share this post


Link to post
Share on other sites
Quote:
Original post by Dunge
Again sorry to hijack this thread or anything, but it's not the first time I get flamed here for helping when I though people would actually agree with me.

And that should tell you something right there.

But we've derailed this thread enough.

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now

Sign in to follow this