Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Suggestion / Idea  How to Achieve Realistic Specular Reflection in PBD Particle Collisions?
#1
Bombilla 
Dear Developers,

I hope this message finds you well. Recently, I have been thoroughly studying the articles on PBD simulations and came across an issue related to the rebound behavior of simulated particles, which I have illustrated in some images.https://www.bilibili.com/opus/975052950303932425

In the first scenario, which reflects real-world physics, when an object collides with a flat surface, the rebound is similar to specular reflection of light. In the second scenario, within PBD, when a high Maxdepenetration value is used, the particles tend to slide along the surface after the collision. In the third scenario, with a low Maxdepenetration value, the particles are ejected perpendicularly from the surface due to the depenetration velocity limitation.

I understand that this behavior is a result of how PBD calculates velocity based on position adjustment and the previous frame’s position. My question is: how can I achieve a rebound that mimics the real-world reflection angle after a collision? Could it be possible to apply impulses to the particles, similar to how Obi rigid body impulses are applied in fluid-solid coupling, to achieve this?

In my research, achieving this type of specular reflection upon collision is crucial, rather than having only the options of surface sliding or vertical rebound. Is there a feasible way to modify the Obi code to implement this?

Thank you very much for your time and assistance!

Best regards.
Reply
#2
Hi!

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,
Reply
#3
(09-09-2024, 08:45 AM)josemendez Wrote: Hi!

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,
Hello,
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.
Reply
#4
(09-09-2024, 09:12 AM)GuoliZheng Wrote: I believe I can use the MaxDepenetration value and reduce the collision iteration count to approximate the rebound effect.

You can't. Restitution depends on the particle's velocity (a fast moving particle will bounce a lot more than a slow moving one, since it has more energy), while max depenetration does not: it just sets a maximum velocity for particles moving out of a collider.

(09-09-2024, 09:12 AM)GuoliZheng Wrote: 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?

If particle CCD is set to 0, particles will be allowed to penetrate the collider when moving towards it (otherwise their approach velocity would be modified to prevent them from penetrating the collider in the first place).

Since a small max depenetration value does not allow their velocity to change sufficiently fast to resolve penetration in a single simulation step, they "sink" into the collider and are launched out of it over multiple steps. This is what causes the "bouncing" effect.

(09-09-2024, 09:12 AM)GuoliZheng Wrote: Why does this behavior not align with the former case and the phenomenon described in the user documentation where cloth bounces off the ground?

It does, the cloth in the documentation starts inside the floor and is projected out of it at the speed specified by max depenetration.

kind regards,
Reply