RE: [Algorithms] cloth and animation

 RE: [Algorithms] cloth and animation From: Willmott, Andrew - 2002-04-30 18:25:44 ```>=20 > - Cloth and animation... the character bone system animates=20 > through key > frames and sometimes physically simulated cloth is being=20 > penetrated by key > framed bone. We tried some simple "fake" solutions but they=20 > solved some > particular problems and are not applicable in general. > Anybody solved this? Any ideas? This is a hard problem, and I don't know of any good solutions other = than trying to address things on a case-by-case basis. (There's no = silver bullet.) I can tell you that even when doing this stuff for film = work, e.g., Pixar and some of the cloth stuff in Monsters Inc., this is = the number one problem with cloth modelling. In their case, they can get = away with tweaks, and simply patch up the remaining problems by hand on = a frame by frame basis. (This includes touching up the final frame.) Not = a solution for real-time! =3D) A. ```

 RE: [Algorithms] cloth and animation From: David Lam - 2002-04-30 11:00:04 ```Have you had a look at Thomas Jakobsen's Advanced Character Physics paper? The Verlet particle integration scheme couple with solving constraints by relaxation should produce an efficient cloth animation. Using your character animation's keyframe should give you a good initial velocity estimate for the cloth particles. http://www.ioi.dk/Homepages/tj/publications/gdc2001.htm -----Original Message----- From: Yordan Gyurchev [mailto:yordan@...] Sent: 30 April 2002 11:32 To: gdalgorithms-list@... Subject: [Algorithms] cloth and animation We were considering some real-time physically simulated cloth for characters. Alas, we have encountered some problems. - Cloth and animation... the character bone system animates through key frames and sometimes physically simulated cloth is being penetrated by key framed bone. We tried some simple "fake" solutions but they solved some particular problems and are not applicable in general. Anybody solved this? Any ideas? - Are there any games that use physically simulated cloth for characters? Alternative solutions? Or hybrid (physiscs/animated/tweened) solutions? Thanks, Yordan _______________________________________________ GDAlgorithms-list mailing list GDAlgorithms-list@... https://lists.sourceforge.net/lists/listinfo/gdalgorithms-list Archives: http://sourceforge.net/mailarchive/forum.php?forum_id=6188 -Virus scanned and cleared ok ```
 RE: [Algorithms] cloth and animation From: David Lam - 2002-04-30 16:37:53 ```If I understand you correct, your problem is a general collision detection problem, where the frequency you sample for collision is too low to catch fast moving objects. What you suggested, ie, restricting the bones' moving between sampling for collision, should work. This should catch the particle near the surface of the capsule and thereby giving you a meaningful projection. Note that your collision detection frequency doesn't need to match frame rate, and would usually need be higher than your frame rate. David Lam Reflections -----Original Message----- From: Yordan Gyurchev [mailto:yordan@...] Sent: 30 April 2002 17:16 To: gdalgorithms-list@... Subject: RE: [Algorithms] cloth and animation > If you mix the bounding capsule collision stuff used in the rag-doll > animation of characters with the projection for collision handling stuff, > you end up getting what you need. Many people already handle basic cloth > collision this way. I'm using this as well. It is part of the solution but not sufficient. A problem arises: the cloth is physics simulation and that is continuous thing while key framed animations aren't continuous. (in the same way) So at time T1 character's leg was "behind" the cloth point P. At time T2, P moves closer to the leg bone than the capsule radius - so we just project it ... but what if at time T2 the cloth point P has gone longer way and the bone (it is also moving... driven by the key framed animation) is already "in front of" the cloth point - it will then be projected in the wrong direction making all further physics calculations absurd. In fact this happens all the time. (This (I haven't tried this) might be resolved by calculating the bones world space and adjusting the time step not allowing them to travel more than the radius + plus the cloth point velocity....) > Note, the collision isn't perfect and in some cases you can get > penetrations. However, the capsule isn't a perfect fit to the geometry and > you can always increase its size to prevent penetration if need be. May be I'm not getting it right. Are you talking for "one" body capsule or capsule per bone? Because increasing bone capsules won't solve the problem. Imagine a skirt (in fact I got a short one working) if you increase the bone capsules the springs will try to keep the size and in the best case it will look restless. Thanks, Yordan _______________________________________________ GDAlgorithms-list mailing list GDAlgorithms-list@... https://lists.sourceforge.net/lists/listinfo/gdalgorithms-list Archives: http://sourceforge.net/mailarchive/forum.php?forum_id=6188 -Virus scanned and cleared ok ```
 RE: [Algorithms] cloth and animation From: Tom Forsyth - 2002-04-30 17:15:36 ```We're doing a similar thing - long leather coats. And we get the same popping-through problem. A solution we used was to run the cloth simulator more often in difficult cases, so between each step the bones move less far. Seems to work. Another trick would be to spot where cloth points are resting on a bone's bounding volume. Then when the bone moves, move the cloth point to the same position w.r.t. the bone (which its new position). Then run the cloth sim. This might stop cloth points popping through to the other side in most cases. Tom Forsyth - purely hypothetical Muckyfoot bloke. This email is the product of your deranged imagination, and does not in any way imply existence of the author. > -----Original Message----- > From: David Lam [mailto:dlam@...] > Sent: 30 April 2002 17:35 > To: gdalgorithms-list@... > Subject: RE: [Algorithms] cloth and animation > > > If I understand you correct, your problem is a general > collision detection > problem, where the frequency you sample for collision is too > low to catch > fast moving objects. > > What you suggested, ie, restricting the bones' moving between > sampling for > collision, should work. This should catch the particle near > the surface of > the capsule and thereby giving you a meaningful projection. > Note that your > collision detection frequency doesn't need to match frame > rate, and would > usually need be higher than your frame rate. > > David Lam > Reflections ```
 RE: [Algorithms] cloth and animation From: Willmott, Andrew - 2002-04-30 18:25:44 ```>=20 > - Cloth and animation... the character bone system animates=20 > through key > frames and sometimes physically simulated cloth is being=20 > penetrated by key > framed bone. We tried some simple "fake" solutions but they=20 > solved some > particular problems and are not applicable in general. > Anybody solved this? Any ideas? This is a hard problem, and I don't know of any good solutions other = than trying to address things on a case-by-case basis. (There's no = silver bullet.) I can tell you that even when doing this stuff for film = work, e.g., Pixar and some of the cloth stuff in Monsters Inc., this is = the number one problem with cloth modelling. In their case, they can get = away with tweaks, and simply patch up the remaining problems by hand on = a frame by frame basis. (This includes touching up the final frame.) Not = a solution for real-time! =3D) A. ```
 RE: [Algorithms] cloth and animation From: Melax, Stan - 2002-04-30 21:53:15 ```At the risk of looking like a complete idiot... Where does the "stability" come in? The "verlet" integration looks exactly the same (mathematically) as forward euler integration. Its only a minor implementation detail that is different. Instead of storing v, you store x_old. (which is more efficient to implement since you can double buffer, but, as mentioned, deltaTime must be the same each frame.) I'd believe that stability could result from the way one applies their constraints, but I dont see that coming from this verlet approach alone (even with a damping term (the 0.99 and 1.99 that are mentioned in the paper)). Am I missing something? Jakobsen's means of solving contraints looks pretty good, and it probably works well for most things. But if something is both stiff/tight AND flexable (under extreme forces), such as a trampoline with a fat kid on it, or something intended to absorb the impact of a hockey puck, then the fixed length contraint may not always be ideal. I dont want to push any unwanted technology ideas on anyone, so feel free to ignore this paragraph. But if a CEO (hi paul) of a successful video game company asks you to help develop his "Table Cloth Dropping Video Game", that has a multi-million dollar production budget, then you might want to take a look at implicit integration. Good, robust cloth simulation might help you actually sell 30-40 copies of your particular be-a-waiter-at-a-restaurant RPG. :-) thanks stan > -----Original Message----- > From: Yordan Gyurchev [mailto:yordan@...] > Sent: Tuesday, April 30, 2002 5:03 AM > To: gdalgorithms-list@... > Subject: RE: [Algorithms] cloth and animation > > > > Have you had a look at Thomas Jakobsen's Advanced Character > Physics paper? > Indeed, that is how I do cloth... it works perfectly. It is > the interaction > of the cloth with the bones that couses problems not the > cloth itself. (Btw > Verlet approach as explained in the article is more frame > rate dependent > than time dependent which can be a disadvantage... although you gain > stability) > ```
 RE: [Algorithms] cloth and animation From: David Lam - 2002-05-01 10:05:53 ```Yes, I see what you are saying. The stability of simulating an infinitly stiff and infinitly damped spring doesn't come from the verlet integration. It comes from the way the constrain is solved. In regards to stability and verlet, I think the author of the paper was stating that in general Verlet is more stable than Euler as it relate the position directly to time and not via velocity. David Lam Reflections -----Original Message----- From: Melax, Stan [mailto:melax@...] Sent: 30 April 2002 22:53 To: gdalgorithms-list@... Subject: RE: [Algorithms] cloth and animation At the risk of looking like a complete idiot... Where does the "stability" come in? The "verlet" integration looks exactly the same (mathematically) as forward euler integration. Its only a minor implementation detail that is different. Instead of storing v, you store x_old. (which is more efficient to implement since you can double buffer, but, as mentioned, deltaTime must be the same each frame.) I'd believe that stability could result from the way one applies their constraints, but I dont see that coming from this verlet approach alone (even with a damping term (the 0.99 and 1.99 that are mentioned in the paper)). Am I missing something? Jakobsen's means of solving contraints looks pretty good, and it probably works well for most things. But if something is both stiff/tight AND flexable (under extreme forces), such as a trampoline with a fat kid on it, or something intended to absorb the impact of a hockey puck, then the fixed length contraint may not always be ideal. I dont want to push any unwanted technology ideas on anyone, so feel free to ignore this paragraph. But if a CEO (hi paul) of a successful video game company asks you to help develop his "Table Cloth Dropping Video Game", that has a multi-million dollar production budget, then you might want to take a look at implicit integration. Good, robust cloth simulation might help you actually sell 30-40 copies of your particular be-a-waiter-at-a-restaurant RPG. :-) thanks stan > -----Original Message----- > From: Yordan Gyurchev [mailto:yordan@...] > Sent: Tuesday, April 30, 2002 5:03 AM > To: gdalgorithms-list@... > Subject: RE: [Algorithms] cloth and animation > > > > Have you had a look at Thomas Jakobsen's Advanced Character > Physics paper? > Indeed, that is how I do cloth... it works perfectly. It is > the interaction > of the cloth with the bones that couses problems not the > cloth itself. (Btw > Verlet approach as explained in the article is more frame > rate dependent > than time dependent which can be a disadvantage... although you gain > stability) > _______________________________________________________________ Have big pipes? SourceForge.net is looking for download mirrors. We supply the hardware. You get the recognition. Email Us: bandwidth@... GDAlgorithms-list mailing list GDAlgorithms-list@... https://lists.sourceforge.net/lists/listinfo/gdalgorithms-list Archives: http://sourceforge.net/mailarchive/forum.php?forum_id=6188 -Virus scanned and cleared ok ```
 Re: [Algorithms] cloth and animation From: Justin Heyes-Jones - 2002-05-01 11:04:50 Attachments: Message as HTML ```Euler integration becomes unstable with large time steps when velocity = and position gets out of sync. In verlet integration since the velocity is implicit and not stored and updated each step, it can not get out of = sync. Adding damping increases stability by the loss of energy from the = system. ----- Original Message ----- From: "Melax, Stan" To: Sent: Tuesday, April 30, 2002 10:53 PM Subject: RE: [Algorithms] cloth and animation > > At the risk of looking like a complete idiot... > > Where does the "stability" come in? > The "verlet" integration looks exactly the same > (mathematically) as forward euler integration. > Its only a minor implementation detail that is different. > Instead of storing v, you store x_old. > (which is more efficient to implement since > you can double buffer, but, as mentioned, deltaTime > must be the same each frame.) > > I'd believe that stability could result from > the way one applies their constraints, but > I dont see that coming from this verlet approach > alone (even with a damping term (the 0.99 and 1.99 > that are mentioned in the paper)). > Am I missing something? ```
 RE: [Algorithms] cloth and animation From: Yordan Gyurchev - 2002-04-30 12:03:38 ```> Have you had a look at Thomas Jakobsen's Advanced Character Physics paper? Indeed, that is how I do cloth... it works perfectly. It is the interaction of the cloth with the bones that couses problems not the cloth itself. (Btw Verlet approach as explained in the article is more frame rate dependent than time dependent which can be a disadvantage... although you gain stability) I've been working on it for some time now. It works perfectly (or at least good aprox) when there are two bones involved (like the two "thigh" bones) where I can make same simple convex hull (like minkovski sum of two triangles made from two bones and sphere) and keep the cloth out of it (distance of a mass point to triangle and check with a radius). This also has some problems... (as explained later) I'm seeking for a more general solution that would involve more than two bones. Somehting like a long dress or suit. Even in some cases piece of cloth that wraps the whole character (with all its bones). Our first (and only) approach (we have so far) is a hull wrapped around bones and keeping cloth out of this hull (verlet interpolation does the rest). However sometimes this has multiple solutions and can be tricky to achieve visually pleasing effect. (For example once determined that a point is in the hull we should decide where on the surface of the hull it should go?) Any ideas? Thanks, Yordan ```
 Re: [Algorithms] cloth and animation From: Conor Stokes - 2002-04-30 15:07:54 ```Actually, you can handle this mixing parts of Thomas Jakobsen's stuff together. If you mix the bounding capsule collision stuff used in the rag-doll animation of characters with the projection for collision handling stuff, you end up getting what you need. Many people already handle basic cloth collision this way. So all you need to do is project your cloth particles out of the capsules. Note, the collision isn't perfect and in some cases you can get penetrations. However, the capsule isn't a perfect fit to the geometry and you can always increase its size to prevent penetration if need be. Conor Stokes ```
 RE: [Algorithms] cloth and animation From: Yordan Gyurchev - 2002-04-30 16:18:43 ```> If you mix the bounding capsule collision stuff used in the rag-doll > animation of characters with the projection for collision handling stuff, > you end up getting what you need. Many people already handle basic cloth > collision this way. I'm using this as well. It is part of the solution but not sufficient. A problem arises: the cloth is physics simulation and that is continuous thing while key framed animations aren't continuous. (in the same way) So at time T1 character's leg was "behind" the cloth point P. At time T2, P moves closer to the leg bone than the capsule radius - so we just project it ... but what if at time T2 the cloth point P has gone longer way and the bone (it is also moving... driven by the key framed animation) is already "in front of" the cloth point - it will then be projected in the wrong direction making all further physics calculations absurd. In fact this happens all the time. (This (I haven't tried this) might be resolved by calculating the bones world space and adjusting the time step not allowing them to travel more than the radius + plus the cloth point velocity....) > Note, the collision isn't perfect and in some cases you can get > penetrations. However, the capsule isn't a perfect fit to the geometry and > you can always increase its size to prevent penetration if need be. May be I'm not getting it right. Are you talking for "one" body capsule or capsule per bone? Because increasing bone capsules won't solve the problem. Imagine a skirt (in fact I got a short one working) if you increase the bone capsules the springs will try to keep the size and in the best case it will look restless. Thanks, Yordan ```