Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Cloth push-back and pass-through
#9
(17-07-2023, 11:04 AM)danazoid Wrote: Ok I think I can explain what I observe wrt mass.
The user experiences the displacement of the tool from the VR hand.
The displacement is proportional to the force/impulse on the tool from the cloth.
Based on the PBD equations, increasing either massA or massB (either cloth OR tool), increases theĀ impulse on the tool, so gives a larger displacement.
Does that sound right?

No, that's not at all how it any of it works. Otherwise by simply increasing the mass of objects you could impart arbitrarily large accelerations on them which is against momentum conservation. Two 10000 kilograms objects colliding with each other must react exactly as two 1 kg colliding objects would.

Substitute lambda in the position delta (displacement) calculations, you get this:

Code:
deltaA = gradient * constraint * invMassA / (invMassA + invMassB);
deltaB = gradient * constraint * invMassB / (invMassA + invMassB);

Let's say the mass of the cloth is 5 and the mass of the tool is also 5, so their inverse mass is 0.2. Ignoring the "gradient * constraint" term because it is the same for both objects, you get 0.2/(0.2+0.2) = 0.5 for both deltas, which means both the cloth and the tool are displaced by 50%. Since their mass is the same, displacement is the same for both. You would get the same result regardless of their mass, as long as both objects have the same mass.

If you increase the mass of the cloth to 10, you get 0.1/(0.1+0.2) = 33% displacement for the cloth and 0.2/(0.1+0.2) = 66% displacement for the tool. The tool is displaced more than the cloth, which makes sense since the cloth is heavier.

Conversely, if you increase the mass of the tool to 10, you get 0.2/(0.1+0.2) = 66% displacement for the cloth and 0.1/(0.1+0.2) = 33% displacement for the tool. Now the cloth is displaced more than the tool.

As you can see increasing the mass of the tool only increases the displacement on the cloth, and vice versa. The absolute mass values you use don't matter, only the mass ratio does.

(17-07-2023, 11:04 AM)danazoid Wrote: The other issue is the tool collider shape.
Changing the mass of the cloth / tool doesn't help all that much.
The forceps and the long thin cylinder tend to pass through the cloth without much force.
Any suggestions on preventing this? The forceps can't really change its dimensions.

Not really, the best you can get out of a particle-based engine is surface collisions which attempt to fake collisions against a continuous surface. However this doesn't guarantee zero penetration at all.

What's puzzling here is the behavior you're getting with respect to the relative mass of the tool and the cloth, as it doesn't behave like it should. I'll take a look at the project you sent asap, it will take a couple days though as I'm moving and don't have access to my development computer.
Reply


Messages In This Thread
Cloth push-back and pass-through - by danazoid - 14-07-2023, 06:21 AM
RE: Cloth push-back and pass-through - by josemendez - 17-07-2023, 11:35 AM