09-09-2024, 09:12 AM
(09-09-2024, 08:45 AM)josemendez Wrote: Hi!Hello,
This behavior you're talking about is called restitution, and is a result of an object being compressed upon collision. This stores potential energy in the object, which is then released when the object decompresses making it bounce off the surface. This is also related to the material's elasticity and plasticity, but it is often implemented separately for ease of authoring.
Most fluids in the real world have zero or very close to zero restitution under regular conditions (meaning they don't bounce off surfaces). Same can be said for cloth and ropes, so Obi does not implement an explicit restitution model.
In realtime engines restitution is often implemented by simply calculating the collision impulse in the normal direction such that instead of bringing the colliding objects to a position where they just touch each other without penetration, it causes the objects to separate (bounce).
The following article contains a very simple implementation of restitution for PBD solvers, it should be easy to add this to Obi:
https://matthias-research.github.io/page...Bodies.pdf
kind regards,
First of all, thank you very much for your response. I believe I can use the MaxDepenetration value and reduce the collision iteration count to approximate the rebound effect. However, I'm not quite clear on the relationship between the MaxDepenetration value and the rebound effect.
When particles are born inside the collider, the MaxDepenetration value can effectively limit the speed at which particles leave the collider. But when particles are born outside the collider and move towards it, a lower MaxDepenetration value seems to cause the particles to rebound quickly and violently. Why is that? Why does this behavior not align with the former case and the phenomenon described in the user documentation where cloth bounces off the ground?
I would greatly appreciate any clarification you could provide on this matter.
Thank you in advance for your time and assistance.