Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Help  Cloth to simulate slime
#6
(10-09-2018, 11:55 AM)arrnav96 Wrote: Thanks for the detailed response. As mentioned earlier, I could achieve the "deformation" of the cloth using the sphere using the same technique you mentioned. For now during testing, I'm just manually moving the sphere towards the cloth using gizmos in play mode. 

The cloth does react and get pressed. The issue is, after a certain point of the sphere pressing, the cloth simply lets the sphere pass through it and starts regaining it's shape. It's as if the sphere get's "swallowed" into the cloth. How do I avoid this behavior?

How do I set up the cloth such that it does not let any object pass through it now matter how deep an object is pressed into it? I have both rigidbody and collider components on the sphere as well as cloth.

After further testing, I've been dropping the sphere onto the cloth from a height. My observations are -

1. If sphere rigidbody mass is heavy (1 or 10), on dropping, it bends the cloth momentarily then just passes through and keeps falling into space.

2. If sphere mass is very light (0.01), on dropping, it bends cloth and cloth stops it from passing through. Sphere stays on top of cloth.

3. If sphere with light mass stays on cloth, then if I try moving the sphere with gizmos in scene view, it passes through cloth again and falls.

Why is the cloth not able to stop heavy weight or sudden movement objects?

Also, all particles on all four edges of the cloth plane are fixed.

You're describing how mass works in real life: when two objects of different mass collide, they push each other with the same force, but the resulting acceleration for each object depends on its mass:  

Code:
f = ma; a = f/m

In layman's terms: the heaviest object will "push" the lightest one.

In your case: when a heavy ball falls on top of light cloth, it will displace cloth vertices out of its way much more easily than a light ball would. Note that the "stiffness" of the cloth is the same in both cases, so the cloth can easily sustain a light ball, but not a heavy one. This is the reason why heavier objects will pass trough the cloth: it is simply not stiff enough to withstand the weight.

Note that you can set the mass of the cloth in a per-particle basis using the particle editor. So if you need the ball to be heavy, just make the cloth accordingly heavy so that it will resist the weight of the ball. If you really need light cloth to be able to withstand the weight of a very heavy ball, increase the amount of distance constraint iterations (and/or solver substeps) to allow the solver to spend more time on making the cloth stiff. See:
http://obi.virtualmethodstudio.com/tutor...olver.html

In the general case, pretty much all physics engines have trouble with high mass ratios. The typical practical limit is 1/10: no object should be more than 10 times heavier than the lightest one.

Also note that placing a ObiParticleRenderer on your cloth is a great way of debugging collisions, as it allows you to see cloth particles:
http://obi.virtualmethodstudio.com/tutor...ering.html
Reply


Messages In This Thread
Cloth to simulate slime - by arrnav96 - 09-09-2018, 06:06 AM
RE: Cloth to simulate slime - by josemendez - 09-09-2018, 11:32 AM
RE: Cloth to simulate slime - by arrnav96 - 10-09-2018, 11:17 AM
RE: Cloth to simulate slime - by josemendez - 10-09-2018, 11:41 AM
RE: Cloth to simulate slime - by arrnav96 - 10-09-2018, 11:55 AM
RE: Cloth to simulate slime - by josemendez - 10-09-2018, 01:45 PM
RE: Cloth to simulate slime - by arrnav96 - 10-09-2018, 03:47 PM
RE: Cloth to simulate slime - by josemendez - 10-09-2018, 03:56 PM
RE: Cloth to simulate slime - by arrnav96 - 10-09-2018, 04:03 PM
RE: Cloth to simulate slime - by josemendez - 10-09-2018, 04:05 PM
RE: Cloth to simulate slime - by josemendez - 10-09-2018, 04:27 PM
RE: Cloth to simulate slime - by arrnav96 - 11-09-2018, 09:25 AM
RE: Cloth to simulate slime - by josemendez - 11-09-2018, 10:32 AM
RE: Cloth to simulate slime - by arrnav96 - 11-09-2018, 10:25 PM
RE: Cloth to simulate slime - by josemendez - 12-09-2018, 08:09 AM
RE: Cloth to simulate slime - by arrnav96 - 12-09-2018, 01:01 PM
RE: Cloth to simulate slime - by josemendez - 12-09-2018, 02:26 PM
RE: Cloth to simulate slime - by arrnav96 - 12-09-2018, 03:44 PM
RE: Cloth to simulate slime - by josemendez - 12-09-2018, 04:45 PM
RE: Cloth to simulate slime - by arrnav96 - 19-09-2018, 10:29 PM
RE: Cloth to simulate slime - by josemendez - 22-09-2018, 02:17 PM
RE: Cloth to simulate slime - by arrnav96 - 30-09-2018, 03:35 PM
RE: Cloth to simulate slime - by arrnav96 - 06-10-2018, 03:47 AM
RE: Cloth to simulate slime - by akayashi1212 - 26-03-2021, 10:00 AM
RE: Cloth to simulate slime - by josemendez - 26-03-2021, 11:03 AM
RE: Cloth to simulate slime - by akayashi1212 - 27-03-2021, 04:24 AM
RE: Cloth to simulate slime - by josemendez - 29-03-2021, 09:59 AM
RE: Cloth to simulate slime - by akayashi1212 - 29-03-2021, 11:35 AM
RE: Cloth to simulate slime - by josemendez - 31-03-2021, 10:09 AM
RE: Cloth to simulate slime - by akayashi1212 - 31-03-2021, 02:47 PM
RE: Cloth to simulate slime - by josemendez - 31-03-2021, 06:21 PM
RE: Cloth to simulate slime - by akayashi1212 - 01-04-2021, 03:27 AM
RE: Cloth to simulate slime - by josemendez - 01-04-2021, 08:40 AM
RE: Cloth to simulate slime - by akayashi1212 - 01-04-2021, 09:57 AM
RE: Cloth to simulate slime - by josemendez - 05-04-2021, 12:06 PM
RE: Cloth to simulate slime - by akayashi1212 - 07-04-2021, 03:35 AM